From 16cc62db836611212d597df4491a79cd8facd49a Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Fri, 3 Feb 2023 08:44:01 +0100 Subject: Provide a script to start the qemu image --- start-qemu.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 start-qemu.sh diff --git a/start-qemu.sh b/start-qemu.sh new file mode 100755 index 0000000..f241f42 --- /dev/null +++ b/start-qemu.sh @@ -0,0 +1,21 @@ +#!/bin/sh +( +BINARIES_DIR="${0%/*}/" +cd ${BINARIES_DIR} + +if [ "${1}" = "serial-only" ]; then + EXTRA_ARGS='-nographic' +else + EXTRA_ARGS='-serial stdio' +fi + +export PATH="output/qemu_x86_64/host/bin:${PATH}" +qemu-system-x86_64 -M pc \ + -kernel output/qemu_x86_64/images/bzImage \ + -drive \ + file=output/qemu_x86_64/images/rootfs.ext2,if=virtio,format=raw \ + -append "rootwait root=/dev/vda console=tty1 console=ttyS0" \ + -net nic,model=virtio \ + -net user,hostfwd=tcp::6600-:6600,hostfwd=tcp::2222-:22 \ + ${EXTRA_ARGS} +) -- cgit v1.2.3