summaryrefslogtreecommitdiffstats
path: root/ArmVirtPkg
diff options
context:
space:
mode:
authorOliver Smith-Denny <osde@linux.microsoft.com>2023-08-18 11:17:51 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-09-06 09:35:59 +0000
commit9b3d4f28f03a6b709736c67884305e33c8f16c78 (patch)
tree1e3e449e873edb6d852d2926d55e4b98d00e6932 /ArmVirtPkg
parentd1e4a16f868fb1ccfa8bed8eaba5f9617ec8382d (diff)
downloadedk2-9b3d4f28f03a6b709736c67884305e33c8f16c78.tar.gz
edk2-9b3d4f28f03a6b709736c67884305e33c8f16c78.tar.bz2
edk2-9b3d4f28f03a6b709736c67884305e33c8f16c78.zip
ArmVirtPkg: ArmVirtQemu: Add Graphics and Input
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. Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'ArmVirtPkg')
-rw-r--r--ArmVirtPkg/PlatformCI/PlatformBuildLib.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ArmVirtPkg/PlatformCI/PlatformBuildLib.py b/ArmVirtPkg/PlatformCI/PlatformBuildLib.py
index 405817cae7..0ddaccf9c2 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")