From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- src/ci/docker/scripts/qemu-bare-bones-rcS | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/ci/docker/scripts/qemu-bare-bones-rcS (limited to 'src/ci/docker/scripts/qemu-bare-bones-rcS') diff --git a/src/ci/docker/scripts/qemu-bare-bones-rcS b/src/ci/docker/scripts/qemu-bare-bones-rcS new file mode 100644 index 000000000..3c29bedc1 --- /dev/null +++ b/src/ci/docker/scripts/qemu-bare-bones-rcS @@ -0,0 +1,28 @@ +#!/bin/sh +mount -t proc none /proc +mount -t sysfs none /sys +/sbin/mdev -s + +# fill up our entropy pool, if we don't do this then anything with a hash map +# will likely block forever as the kernel is pretty unlikely to have enough +# entropy. +/addentropy < /addentropy +cat /dev/urandom | head -n 2048 | /addentropy + +# Set up IP that qemu expects. This confgures eth0 with the public IP that QEMU +# will communicate to as well as the loopback 127.0.0.1 address. +ifconfig eth0 10.0.2.15 +ifconfig lo up + +# Configure DNS resolution of 'localhost' to work +echo 'hosts: files dns' >> /ubuntu/etc/nsswitch.conf +echo '127.0.0.1 localhost' >> /ubuntu/etc/hosts + +# prepare the chroot +mount -t proc proc /ubuntu/proc/ +mount --rbind /sys /ubuntu/sys/ +mount --rbind /dev /ubuntu/dev/ + +# Execute our `testd` inside the ubuntu chroot +cp /testd /ubuntu/testd +chroot /ubuntu /testd & -- cgit v1.2.3