public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel][PATCH v1 1/1] ArmVirtPkg: ArmVirtQemu: Add Graphics and Input
@ 2023-08-18 18:17 Oliver Smith-Denny
  2023-08-18 21:05 ` Ard Biesheuvel
  2023-08-19 19:39 ` Marcin Juszkiewicz
  0 siblings, 2 replies; 8+ messages in thread
From: Oliver Smith-Denny @ 2023-08-18 18:17 UTC (permalink / raw)
  To: devel; +Cc: Leif Lindholm, Ard Biesheuvel, Sami Mujawar, Gerd Hoffmann

Currently, unlike OVMF, ArmVirtQemu does not display any graphics,
only the QEMU monitor. Graphics are helpful to confirm booting into
an OS is successful, interacting with the EFI shell while getting
separate logging messages, etc.

This patch adds the QEMU parameters to launch a graphical window
and add a USB keyboard and mouse, which is modeled as a tablet as
it tracks better in QEMU than a generic mouse. virtio-gpu-pci is
chosen as the graphics device as it is recommended by QEMU for the
ARM virtual platform.

The graphics and USB input devices will only be added to QEMU when
QEMU_HEADLESS == FALSE, so CI builds will not attempt to use the
graphics and if a user does not want graphics, they can add
QEMU_HEADLESS=TRUE to the build cmdline.

GitHub PR: https://github.com/tianocore/edk2/pull/4750

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>

Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
---
 ArmVirtPkg/PlatformCI/PlatformBuildLib.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ArmVirtPkg/PlatformCI/PlatformBuildLib.py b/ArmVirtPkg/PlatformCI/PlatformBuildLib.py
index 405817cae785..0ddaccf9c21f 100644
--- a/ArmVirtPkg/PlatformCI/PlatformBuildLib.py
+++ b/ArmVirtPkg/PlatformCI/PlatformBuildLib.py
@@ -244,6 +244,11 @@ class PlatformBuilder(UefiBuilder, BuildSettingsManager):
         # Conditional Args
         if (self.env.GetValue("QEMU_HEADLESS").upper() == "TRUE"):
             args += " -display none"  # no graphics
+        else:
+            args += " -device virtio-gpu-pci"                         # add recommended QEMU graphics device
+            args += " -device qemu-xhci,id=usb"                       # add USB support for below devices
+            args += " -device usb-tablet,id=input0,bus=usb.0,port=1"  # add a usb mouse
+            args += " -device usb-kbd,id=input1,bus=usb.0,port=2"     # add a usb keyboard
 
         if (self.env.GetValue("MAKE_STARTUP_NSH").upper() == "TRUE"):
             f = open(os.path.join(VirtualDrive, "startup.nsh"), "w")
-- 
2.40.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107853): https://edk2.groups.io/g/devel/message/107853
Mute This Topic: https://groups.io/mt/100826022/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-09-06  9:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-18 18:17 [edk2-devel][PATCH v1 1/1] ArmVirtPkg: ArmVirtQemu: Add Graphics and Input Oliver Smith-Denny
2023-08-18 21:05 ` Ard Biesheuvel
2023-09-05 16:05   ` Oliver Smith-Denny
2023-09-06  9:15     ` Ard Biesheuvel
2023-08-19 19:39 ` Marcin Juszkiewicz
2023-08-19 22:10   ` Pedro Falcato
2023-08-21 14:38     ` Gerd Hoffmann
2023-08-21 14:51     ` Leif Lindholm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox