summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2019-09-12 17:36:42 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-16 09:54:21 +0100
commit922eb5012364b1603338cfa617712b941e892bbf (patch)
tree4c3f488309870b0d4d5a7083af4876005d094c17
parent70cb0c87a9e1d1001320d771fb84b5d8541591a3 (diff)
downloadopenembedded-core-922eb5012364b1603338cfa617712b941e892bbf.tar.gz
openembedded-core-922eb5012364b1603338cfa617712b941e892bbf.tar.bz2
openembedded-core-922eb5012364b1603338cfa617712b941e892bbf.zip
runqemu: decouple gtk and gl options
This will allow not having to multiply these options for the sdl frontend, instead combining them as needed. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/lib/oeqa/selftest/cases/runtime_test.py2
-rwxr-xr-xscripts/runqemu21
2 files changed, 15 insertions, 8 deletions
diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
index 20969d2c48..3f212bd0ea 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -191,7 +191,7 @@ class TestImage(OESelftestTestCase):
features += 'TEST_SUITES = "ping ssh virgl"\n'
features += 'IMAGE_FEATURES_append = " ssh-server-dropbear"\n'
features += 'IMAGE_INSTALL_append = " kmscube"\n'
- features += 'TEST_RUNQEMUPARAMS = "gtk-gl"\n'
+ features += 'TEST_RUNQEMUPARAMS = "gtk gl"\n'
self.write_config(features)
bitbake('core-image-minimal')
bitbake('-c testimage core-image-minimal')
diff --git a/scripts/runqemu b/scripts/runqemu
index 4415e9b69f..68ba7dcfb9 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -65,9 +65,10 @@ of the following environment variables (in any order):
MACHINE - the machine name (optional, autodetected from KERNEL filename if unspecified)
Simplified QEMU command-line options can be passed with:
nographic - disable video console
- sdl - choose the SDL frontend instead of the Gtk+ default
- gtk-gl - enable virgl-based GL acceleration using Gtk+ frontend
- gtk-gl-es - enable virgl-based GL acceleration, using OpenGL ES and Gtk+ frontend
+ sdl - choose the SDL UI frontend
+ gtk - choose the Gtk UI frontend
+ gl - enable virgl-based GL acceleration (also needs gtk option)
+ gl-es - enable virgl-based GL acceleration, using OpenGL ES (also needs gtk option)
egl-headless - enable headless EGL output; use vnc or spice to see it
serial - enable a serial console on /dev/ttyS0
serialstdio - enable a serial console on the console (regardless of graphics mode)
@@ -436,10 +437,16 @@ class BaseConfig(object):
self.kernel_cmdline_script += ' console=ttyS0'
elif arg == 'sdl':
self.qemu_opt_script += ' -display sdl'
- elif arg == 'gtk-gl':
- self.qemu_opt_script += ' -vga virtio -display gtk,gl=on'
- elif arg == 'gtk-gl-es':
- self.qemu_opt_script += ' -vga virtio -display gtk,gl=es'
+ elif arg == 'gtk':
+ if 'gl' in sys.argv[1:]:
+ self.qemu_opt_script += ' -vga virtio -display gtk,gl=on'
+ elif 'gl-es' in sys.argv[1:]:
+ self.qemu_opt_script += ' -vga virtio -display gtk,gl=es'
+ else:
+ self.qemu_opt_script += ' -display gtk'
+ elif arg == 'gl' or arg == 'gl-es':
+ # These args are handled inside sdl or gtk blocks above
+ pass
elif arg == 'egl-headless':
self.qemu_opt_script += ' -vga virtio -display egl-headless'
# As runqemu can be run within bitbake (when using testimage, for example),