@@ -66,21 +66,30 @@ def run_qemu():
66
66
67
67
qemu_flags = [
68
68
# Disable default devices.
69
+ # QEMU by defaults enables a ton of devices which slow down boot.
69
70
'-nodefaults' ,
71
+
70
72
# Use a standard VGA for graphics.
71
73
'-vga' , 'std' ,
74
+
72
75
# Use a modern machine, with acceleration if possible.
73
76
'-machine' , 'q35,accel=kvm:tcg' ,
77
+
74
78
# Allocate some memory.
75
79
'-m' , '128M' ,
80
+
76
81
# Set up OVMF.
77
82
'-drive' , f'if=pflash,format=raw,file={ ovmf_code } ,readonly=on' ,
78
83
'-drive' , f'if=pflash,format=raw,file={ ovmf_vars } ,readonly=on' ,
84
+
79
85
# Create AHCI controller.
80
86
'-device' , 'ahci,id=ahci,multifunction=on' ,
87
+
81
88
# Mount a local directory as a FAT partition.
82
89
'-drive' , f'if=none,format=raw,file=fat:rw:{ ESP_DIR } ,id=esp' ,
83
90
'-device' , 'ide-drive,bus=ahci.0,drive=esp' ,
91
+
92
+ # OVMF debug builds can output information to a serial `debugcon`.
84
93
# Only enable when debugging UEFI boot:
85
94
#'-debugcon', 'file:debug.log', '-global', 'isa-debugcon.iobase=0x402',
86
95
]
0 commit comments