]> git.lizzy.rs Git - rust.git/blob - src/ci/docker/scripts/qemu-bare-bones-rcS
Rollup merge of #94247 - saethlin:chunksmut-aliasing, r=the8472
[rust.git] / src / ci / docker / scripts / qemu-bare-bones-rcS
1 #!/bin/sh
2 mount -t proc none /proc
3 mount -t sysfs none /sys
4 /sbin/mdev -s
5
6 # fill up our entropy pool, if we don't do this then anything with a hash map
7 # will likely block forever as the kernel is pretty unlikely to have enough
8 # entropy.
9 /addentropy < /addentropy
10 cat /dev/urandom | head -n 2048 | /addentropy
11
12 # Set up IP that qemu expects. This confgures eth0 with the public IP that QEMU
13 # will communicate to as well as the loopback 127.0.0.1 address.
14 ifconfig eth0 10.0.2.15
15 ifconfig lo up
16
17 # Configure DNS resolution of 'localhost' to work
18 echo 'hosts:      files dns' >> /ubuntu/etc/nsswitch.conf
19 echo '127.0.0.1    localhost' >> /ubuntu/etc/hosts
20
21 # prepare the chroot
22 mount -t proc proc /ubuntu/proc/
23 mount --rbind /sys /ubuntu/sys/
24 mount --rbind /dev /ubuntu/dev/
25
26 # Execute our `testd` inside the ubuntu chroot
27 cp /testd /ubuntu/testd
28 chroot /ubuntu /testd &