From 8b2420f74367e4973be0dd9556c021588abfe591 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Sat, 30 May 2026 09:58:45 +0200 Subject: Initial commit --- start-qemu.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 start-qemu.sh (limited to 'start-qemu.sh') diff --git a/start-qemu.sh b/start-qemu.sh new file mode 100755 index 0000000..299b324 --- /dev/null +++ b/start-qemu.sh @@ -0,0 +1,22 @@ +#!/bin/sh +( +BINARIES_DIR="${0%/*}/" +cd ${BINARIES_DIR} + +if [ "${1}" = "serial-only" ]; then + EXTRA_ARGS='-nographic' + echo "Press ^A- h to access to the console" +else + EXTRA_ARGS='-serial stdio' +fi + +#export PATH="/home/sebastien/pi0/bastion/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::5555-:22 \ + ${EXTRA_ARGS} +) -- cgit v1.2.3