Unverified Commit c6dc58ef authored by Kroese's avatar Kroese Committed by GitHub
Browse files

feat: Make USB controller configurable (#386)

parent 40bfe0d3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ case "${BOOT_MODE,,}" in
    VARS="OVMF_VARS_4M.ms.fd"
    ;;
  windows_legacy)
    USB="usb-ehci"
    BOOT_OPTS=""
    ;;
  legacy)
+2 −1
Original line number Diff line number Diff line
#!/usr/bin/env bash
set -Eeuo pipefail

: "${USB:="qemu-xhci"}"
: "${SERIAL:="mon:stdio"}"
: "${MONITOR:="telnet:localhost:7100,server,nowait,nodelay"}"

DEF_OPTS="-nodefaults"
SERIAL_OPTS="-serial $SERIAL"
MON_OPTS="-monitor $MONITOR"
USB_OPTS="-device qemu-xhci -device usb-tablet"
USB_OPTS="-device $USB -device usb-tablet"
RAM_OPTS=$(echo "-m $RAM_SIZE" | sed 's/MB/M/g;s/GB/G/g;s/TB/T/g')
CPU_OPTS="-cpu $CPU_FLAGS -smp $CPU_CORES,sockets=1,dies=1,cores=$CPU_CORES,threads=1"
MAC_OPTS="-machine type=q35${SECURE},graphics=off,vmport=off,dump-guest-core=off,hpet=off${KVM_OPTS}"