38 lines
720 B
Bash
Executable File
38 lines
720 B
Bash
Executable File
#!/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
|
|
;;
|
|
--debug)
|
|
QEMU_EXTRA+=" -s -S "
|
|
shift
|
|
;;
|
|
*)
|
|
POSITIONAL_ARGS+=("$1")
|
|
shift
|
|
;;
|
|
esac
|
|
done
|
|
|
|
qemu-system-x86_64 -M pc -m 4G -serial stdio -enable-kvm \
|
|
-cdrom mop3.iso -smp 4 -boot d $QEMU_EXTRA "${POSITIONAL_ARGS[@]}"
|