19 lines
423 B
Bash
Executable File
19 lines
423 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
debug_flags=()
|
|
if [[ ${1:-} == '--debug' ]] || [[ ${1:-} == '-d' ]]; then
|
|
debug_flags+=(-s -S)
|
|
fi
|
|
|
|
qemu-system-x86_64 \
|
|
"${debug_flags[@]}" \
|
|
-monitor stdio \
|
|
-drive file=build/os.img,format=raw,if=none,id=nvme0 \
|
|
-device nvme,drive=nvme0,serial=foo \
|
|
-device qemu-xhci,id=xhci,msi=off,msix=off \
|
|
-device usb-kbd,bus=xhci.0 \
|
|
-no-reboot \
|
|
-trace "*xhci*" \
|
|
-d int
|