Skip to content

Commit a6f0596

Browse files
committed
Enable display device on the aarch64 architecture
The virtio-vga device is not available, but virtio-gpu is. However, there are still some stability issues on QEMU 4.2.1 Signed-off-by: Anders F Björklund <[email protected]>
1 parent 4802c50 commit a6f0596

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

pkg/qemu/qemu.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -790,11 +790,16 @@ func Cmdline(cfg Config) (string, []string, error) {
790790
args = append(args, "-device", "virtio-mouse-pci")
791791
args = append(args, "-device", "qemu-xhci,id=usb-bus")
792792
case limayaml.AARCH64, limayaml.ARMV7L:
793-
// QEMU does not seem to support virtio-vga for aarch64 and arm
794-
args = append(args, "-vga", "none", "-device", "ramfb")
793+
if features.VersionGEQ7 {
794+
args = append(args, "-device", "virtio-gpu")
795+
args = append(args, "-device", "virtio-keyboard-pci")
796+
args = append(args, "-device", "virtio-mouse-pci")
797+
} else { // kernel panic with virtio and old versions of QEMU
798+
args = append(args, "-vga", "none", "-device", "ramfb")
799+
args = append(args, "-device", "usb-kbd,bus=usb-bus.0")
800+
args = append(args, "-device", "usb-mouse,bus=usb-bus.0")
801+
}
795802
args = append(args, "-device", "qemu-xhci,id=usb-bus")
796-
args = append(args, "-device", "usb-kbd,bus=usb-bus.0")
797-
args = append(args, "-device", "usb-mouse,bus=usb-bus.0")
798803
}
799804

800805
// Parallel

0 commit comments

Comments
 (0)