busybox version

master
LEdoian 2 weeks ago
commit 0d66c59676

2
.gitignore vendored

@ -0,0 +1,2 @@
/initrd/
/initrd.img

@ -0,0 +1,15 @@
#!/bin/bash
# LEdoian's absurdly simple initrd generator (benchmark arc)
set -eu
mkdir "initrd"
cp "./init" "initrd/"
busybox="$(which busybox)"
cp "$busybox" "initrd/busybox"
pushd "./initrd"
find . | cpio -o -H newc > ../initrd.img
popd

@ -0,0 +1,2 @@
#!/busybox ash
/busybox poweroff -f

@ -0,0 +1,7 @@
#!/bin/bash
set -eu
arch=x86_64
kernel=/boot/vmlinuz-linux
time qemu-system-"$arch" -m 100M -net none -kernel "$kernel" -initrd "./initrd.img" -serial none -vga none -display none "$@"
Loading…
Cancel
Save