From e8880c199b83bf70445b03e1b385d2fba823ffa5 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Tue, 27 Sep 2022 14:06:39 +0100 Subject: [PATCH] allow overriding init --- scripts/run-qemu.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/run-qemu.sh b/scripts/run-qemu.sh index 9ec9458..c94c7bc 100755 --- a/scripts/run-qemu.sh +++ b/scripts/run-qemu.sh @@ -11,10 +11,12 @@ else flags="-serial mon:stdio" fi +INIT=${INIT-/bin/init} + qemu-system-mips \ -M malta -m 256 \ -echr 16 \ - -append "default console=ttyS0,38400n8 panic=10 oops=panic init=/bin/init loglevel=8 root=/dev/vda" \ + -append "default console=ttyS0,38400n8 panic=10 oops=panic init=$INIT loglevel=8 root=/dev/vda" \ -drive file=$2,format=raw,readonly=on,if=virtio \ -netdev socket,id=access,mcast=230.0.0.1:1234 \ -device virtio-net-pci,disable-legacy=on,disable-modern=off,netdev=access,mac=ba:ad:1d:ea:21:02 \