summaryrefslogtreecommitdiff
path: root/start-qemu.sh
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2026-05-30 09:58:45 +0200
committerSébastien Dailly <sebastien@dailly.me>2026-05-30 09:58:45 +0200
commit8b2420f74367e4973be0dd9556c021588abfe591 (patch)
treeb95fbf8d5aefc51f619b2506d8ae75ee9f29b75b /start-qemu.sh
Initial commit
Diffstat (limited to 'start-qemu.sh')
-rwxr-xr-xstart-qemu.sh22
1 files changed, 22 insertions, 0 deletions
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}
+)