2019-09-20 14:19:57 -06:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
MODEL="qemu"
|
|
|
|
|
2022-03-10 08:41:16 -07:00
|
|
|
qemu-system-x86_64 \
|
|
|
|
-enable-kvm \
|
2023-03-06 15:02:33 -07:00
|
|
|
-M q35 \
|
|
|
|
-m 4096 \
|
|
|
|
-cpu Skylake-Client \
|
|
|
|
-vga std \
|
2020-04-08 13:32:25 -06:00
|
|
|
-bios "build/${MODEL}/firmware.rom" \
|
2019-09-25 14:07:05 -06:00
|
|
|
-chardev stdio,mux=on,id=debug \
|
2019-10-03 13:40:13 -06:00
|
|
|
-device isa-serial,index=2,chardev=debug \
|
2019-09-25 14:07:05 -06:00
|
|
|
-device isa-debugcon,iobase=0x402,chardev=debug \
|
2019-10-10 16:15:51 -06:00
|
|
|
-device pcie-root-port,bus=pcie.0,id=rp1 \
|
|
|
|
-device pcie-pci-bridge,id=br1,bus=rp1 \
|
|
|
|
-net none \
|
2019-09-20 14:19:57 -06:00
|
|
|
"$@"
|
2019-09-26 09:56:52 -06:00
|
|
|
|
2019-10-03 13:40:13 -06:00
|
|
|
# COM1: -device isa-serial,index=0,chardev=debug
|
|
|
|
# COM2: -device isa-serial,index=1,chardev=debug
|
|
|
|
# COM3: -device isa-serial,index=2,chardev=debug
|
|
|
|
# COM4: -device isa-serial,index=3,chardev=debug
|
2019-10-10 10:34:33 -06:00
|
|
|
|
|
|
|
# PCIe hotplugging (https://github.com/qemu/qemu/blob/master/docs/pcie_pci_bridge.txt):
|
|
|
|
# Root port: -device pcie-root-port,bus=pcie.0,id=rp1
|
|
|
|
# PCIe bridge: -device pcie-pci-bridge,id=br1,bus=rp1
|