]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: add QB_GRAPHICS
authorJon Mason <jdmason@kudzu.us>
Wed, 10 Mar 2021 23:05:31 +0000 (18:05 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 11 Mar 2021 13:59:35 +0000 (13:59 +0000)
Add a new runqemu field for VGA devices.  Currently, these are being set
in QB_OPT_APPEND, which can make them difficult to override if importing
the config file into another one.

Signed-off-by: Jon Mason <jon.mason@arm.com>
Change-Id: I8cb9527954c5b06c083c42fe2466cb3338584b7d
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/qemuboot.bbclass
meta/conf/machine/include/qemuboot-mips.inc
meta/conf/machine/qemuarm.conf
meta/conf/machine/qemuarm64.conf
scripts/runqemu

index 4b7532b3043d7c744603cff5e631a80690719cac..8798ad80e68b7bf1c1264f35879fd1468a127497 100644 (file)
@@ -72,6 +72,9 @@
 #                      Can be used to automatically determine the image from the other variables
 #                      but define things link 'bootindex' when booting from EFI or 'readonly' when using squashfs
 #                      without the need to specify a dedicated qemu configuration
+#
+# QB_GRAPHICS: QEMU video card type (e.g. "-vga std")
+#
 # Usage:
 # IMAGE_CLASSES += "qemuboot"
 # See "runqemu help" for more info
@@ -86,6 +89,7 @@ QB_NETWORK_DEVICE ?= "-device virtio-net-pci,netdev=net0,mac=@MAC@"
 QB_CMDLINE_IP_SLIRP ?= "ip=dhcp"
 QB_CMDLINE_IP_TAP ?= "ip=192.168.7.@CLIENT@::192.168.7.@GATEWAY@:255.255.255.0"
 QB_ROOTFS_EXTRA_OPT ?= ""
+QB_GRAPHICS ?= ""
 
 # This should be kept align with ROOT_VM
 QB_DRIVE_TYPE ?= "/dev/sd"
index 230f032c5303cea5300f8561b9ad3355e5298a83..4954f3068c9c39709259bd8983f86c03548d7159 100644 (file)
@@ -5,4 +5,4 @@ QB_KERNEL_CMDLINE_APPEND = "console=ttyS0 console=tty"
 QB_OPT_APPEND = "-usb -device usb-tablet"
 
 # For graphics to work we need to define the VGA device as well as the necessary USB devices
-QB_OPT_APPEND += "-vga std"
+QB_GRAPHICS = "-vga std"
index 257cfa3e63eaed7b35a3e63ff3dbfdfb887ecc2a..37dae8c86353432b85996161225638cd75886731 100644 (file)
@@ -19,8 +19,8 @@ QB_CPU = "-cpu cortex-a15"
 # Standard Serial console
 QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0 vmalloc=256"
 # For graphics to work we need to define the VGA device as well as the necessary USB devices
-QB_OPT_APPEND = "-device VGA,edid=on"
-QB_OPT_APPEND += "-device qemu-xhci -device usb-tablet -device usb-kbd"
+QB_GRAPHICS = "-device VGA,edid=on"
+QB_OPT_APPEND = "-device qemu-xhci -device usb-tablet -device usb-kbd"
 # Virtio Networking support
 QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no"
 QB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@"
index 2f61eb0aed5f3407efce46df25227b6fa9318083..05fd1f749b0f0a8d1598c8cb7a0e43dc7f1fefcb 100644 (file)
@@ -20,8 +20,8 @@ QB_CPU_KVM = "-cpu host -machine gic-version=3"
 # Standard Serial console
 QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0"
 # For graphics to work we need to define the VGA device as well as the necessary USB devices
-QB_OPT_APPEND = "-device VGA,edid=on"
-QB_OPT_APPEND += "-device qemu-xhci -device usb-tablet -device usb-kbd"
+QB_GRAPHICS = "-device VGA,edid=on"
+QB_OPT_APPEND = "-device qemu-xhci -device usb-tablet -device usb-kbd"
 # Virtio Networking support
 QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no"
 QB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@"
index cf64ca149c53f4df929d48c19ffb74f7af94d3b8..4c8358e9de7982683390088efaeaf00fee2aba72 100755 (executable)
@@ -1341,7 +1341,7 @@ class BaseConfig(object):
         if not os.access(qemu_bin, os.X_OK):
             raise OEPathError("No QEMU binary '%s' could be found" % qemu_bin)
 
-        self.qemu_opt = "%s %s %s %s %s" % (qemu_bin, self.get('NETWORK_CMD'), self.get('QB_RNG'), self.get('ROOTFS_OPTIONS'), self.get('QB_OPT_APPEND'))
+        self.qemu_opt = "%s %s %s %s %s %s" % (qemu_bin, self.get('NETWORK_CMD'), self.get('QB_RNG'), self.get('QB_GRAPHICS'), self.get('ROOTFS_OPTIONS'), self.get('QB_OPT_APPEND'))
 
         for ovmf in self.ovmf_bios:
             format = ovmf.rsplit('.', 1)[-1]