QEMU dev script add option parsing
All checks were successful
Build ISO image / build-and-deploy (push) Successful in 2m45s
Build documentation / build-and-deploy (push) Successful in 2m47s

This commit is contained in:
2026-03-22 15:16:31 +01:00
parent 5492b564dd
commit 72715d19e0

View File

@@ -2,4 +2,36 @@
set -x set -x
qemu-system-x86_64 -M pc -m 4G -serial stdio -enable-kvm -cdrom mop3.iso -smp 4 -boot d $@ POSITIONAL_ARGS=()
QEMU_EXTRA=""
while [[ $# -gt 0 ]]; do
case $1 in
--test-usb-stick-xhci)
QEMU_EXTRA="-drive if=none,id=usbstick,format=raw,file=$2 \
-usb \
-device qemu-xhci,id=xhci \
-device usb-storage,bus=xhci.0,drive=usbstick"
shift
shift
;;
--test-pci-ide)
QEMU_EXTRA="-hda $2"
shift
shift
;;
-*|--*)
echo "Unknown option $1"
exit 1
;;
*)
POSITIONAL_ARGS+=("$1")
shift
;;
esac
done
set -- "${POSITIONAL_ARGS[@]}"
qemu-system-x86_64 -M pc -m 4G -serial stdio -enable-kvm -cdrom mop3.iso -smp 4 -boot d $QEMU_EXTRA $@