Compare commits
No commits in common. '9bc6ab076cc7c27379445aad8788a0b84c71ff3c' and '2ee68a9d9213e3e1e1b57ea016e136fa676db4bb' have entirely different histories.
9bc6ab076c
...
2ee68a9d92
@ -1,2 +1,2 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
unshare -rnmpf --mount-proc ./init.sh
|
unshare -rnm ./init.sh
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# LEdoian's absurdly simple initrd generator (ad-hoc arc)
|
|
||||||
|
|
||||||
here="$(dirname "$0")"
|
|
||||||
|
|
||||||
set -eu
|
|
||||||
outdir="$1"
|
|
||||||
|
|
||||||
mkdir "$outdir/initrd"
|
|
||||||
cp "$here/init" "$outdir/initrd/"
|
|
||||||
|
|
||||||
busybox="$(which busybox)"
|
|
||||||
cp "$busybox" "$outdir/initrd/busybox"
|
|
||||||
|
|
||||||
# TODO: get kernel version from /boot/vmlinuz-linux (which we use)
|
|
||||||
kver="$(uname -r)"
|
|
||||||
zstdcat /usr/lib/modules/$kver/kernel/drivers/net/ethernet/intel/e1000/e1000.ko.zst > "$outdir/initrd/e1000.ko"
|
|
||||||
|
|
||||||
pushd "$outdir/initrd"
|
|
||||||
find . | cpio -o -H newc > ../initrd.img
|
|
||||||
popd
|
|
@ -1,13 +0,0 @@
|
|||||||
#!/busybox ash
|
|
||||||
|
|
||||||
/busybox echo START
|
|
||||||
#/busybox mdev -s
|
|
||||||
# we know the modules, lol :-)
|
|
||||||
/busybox insmod /e1000.ko
|
|
||||||
/busybox ip link set lo up
|
|
||||||
/busybox ip addr add 2a01:4f8:c0c:36b8:ff01:8000:0:3/128 dev eth0
|
|
||||||
/busybox ip addr add fe80:ff01:8000::3 dev eth0 scope link
|
|
||||||
/busybox ip link set eth0 up
|
|
||||||
/busybox ip route add default via fe80:ff01:8000::2 dev eth0
|
|
||||||
|
|
||||||
/busybox ash
|
|
@ -1,10 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
arch=x86_64
|
|
||||||
kernel=/boot/vmlinuz-linux
|
|
||||||
initrd_dir="$1"
|
|
||||||
sockpath="$2"
|
|
||||||
shift 2
|
|
||||||
qemu-system-"$arch" -m 1G -nic tap,id=net0,ifname=tap-vm1,script=no,downscript=no -kernel "$kernel" -initrd "$initrd_dir/initrd.img" -chardev socket,id=sock0,path="$sockpath",mux=on,server=off -serial chardev:sock0 -mon chardev=sock0,mode=readline -daemonize -display none -append console=ttyS0,115200n1 "$@"
|
|
@ -1,9 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
. ./lib.shs
|
|
||||||
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
mkdir state/$mach/initdir
|
|
||||||
machines/$mach/vm1/create.sh state/$mach/initdir
|
|
||||||
machines/$mach/vm1/run.sh state/$mach/initdir state/$mach/vm1.sock
|
|
Loading…
Reference in New Issue