From 032c5f71bd2cf9f501c3a0247de06af1d66eafab Mon Sep 17 00:00:00 2001 From: kamkow1 Date: Thu, 26 Mar 2026 20:40:20 +0100 Subject: [PATCH] Improve qemu_amd64.sh script --- aux/qemu_amd64.sh | 17 ++++++++--------- aux/qemu_amd64_debug.sh | 38 -------------------------------------- 2 files changed, 8 insertions(+), 47 deletions(-) delete mode 100755 aux/qemu_amd64_debug.sh diff --git a/aux/qemu_amd64.sh b/aux/qemu_amd64.sh index e22cb47..502b66a 100755 --- a/aux/qemu_amd64.sh +++ b/aux/qemu_amd64.sh @@ -9,22 +9,22 @@ QEMU_EXTRA="" while [[ $# -gt 0 ]]; do case $1 in --test-usb-stick-xhci) - QEMU_EXTRA="-drive if=none,id=usbstick,format=raw,file=$2 \ + 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 \ - -trace usb_xhci_* -D qemu-xhci-log.txt" + -trace usb_xhci_* -D qemu-xhci-log.txt " shift shift ;; --test-pci-ide) - QEMU_EXTRA="-hda $2" + QEMU_EXTRA+=" -hda $2 " shift shift ;; - -*|--*) - echo "Unknown option $1" - exit 1 + --debug) + QEMU_EXTRA+=" -s -S " + shift ;; *) POSITIONAL_ARGS+=("$1") @@ -33,6 +33,5 @@ while [[ $# -gt 0 ]]; do 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 $@ +qemu-system-x86_64 -M pc -m 4G -serial stdio -enable-kvm \ + -cdrom mop3.iso -smp 4 -boot d $QEMU_EXTRA "${POSITIONAL_ARGS[@]}" diff --git a/aux/qemu_amd64_debug.sh b/aux/qemu_amd64_debug.sh deleted file mode 100755 index 6a23073..0000000 --- a/aux/qemu_amd64_debug.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -set -x - -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 \ - -trace usb_xhci_* -D qemu-xhci-log.txt" - 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 -cdrom mop3.iso -smp 1 -boot d -s -S $QEMU_EXTRA $@