From: Alexander Kanavin <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 11/13] runqemu: add options for enabling virgl GL acceleration
Date: Fri, 1 Feb 2019 14:05:52 +0100 [thread overview]
Message-ID: <20190201130554.90094-11-alex.kanavin@gmail.com> (raw)
In-Reply-To: <20190201130554.90094-1-alex.kanavin@gmail.com>
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
scripts/runqemu | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/scripts/runqemu b/scripts/runqemu
index c4a0ca811d9..50888a532e8 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -74,6 +74,9 @@ 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
+ gl - enable virgl-based GL acceleration
+ gl-es - enable virgl-based GL acceleration, using OpenGL ES
+ 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)
slirp - enable user networking, no root privileges is required
@@ -433,6 +436,26 @@ class BaseConfig(object):
elif arg == 'nographic':
self.qemu_opt_script += ' -nographic'
self.kernel_cmdline_script += ' console=ttyS0'
+ elif arg == 'gl':
+ self.qemu_opt_script += ' -vga virtio -display gtk,gl=on'
+ elif arg == 'gl-es':
+ self.qemu_opt_script += ' -vga virtio -display gtk,gl=es'
+ 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),
+ # we need to ensure that we run host pkg-config, and that it does not
+ # get mis-directed to native build paths set by bitbake.
+ try:
+ del os.environ['PKG_CONFIG_PATH']
+ del os.environ['PKG_CONFIG_DIR']
+ del os.environ['PKG_CONFIG_LIBDIR']
+ except KeyError:
+ pass
+ try:
+ dripath = subprocess.check_output("PATH=/bin:/usr/bin:$PATH pkg-config --variable=dridriverdir dri", shell=True)
+ except subprocess.CalledProcessError as e:
+ raise RunQemuError("Could not determine the path to dri drivers on the host via pkg-config.\nPlease install Mesa development files (particularly, dri.pc) on the host machine.")
+ os.environ['LIBGL_DRIVERS_PATH'] = dripath.decode('utf-8').strip()
elif arg == 'serial':
self.kernel_cmdline_script += ' console=ttyS0'
self.serialconsole = True
--
2.17.1
next prev parent reply other threads:[~2019-02-01 13:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-01 13:05 [PATCH 01/13] virglrenderer: add a recipe Alexander Kanavin
2019-02-01 13:05 ` [PATCH 02/13] qemu: enable virglrenderer and glx options for native/nativesdk builds Alexander Kanavin
2019-02-01 13:05 ` [PATCH 03/13] qemu: drop --with-gtkabi option, as it is no longer supported Alexander Kanavin
2019-02-01 13:05 ` [PATCH 04/13] local.conf.sample: adjust the qemu config to enable gtk+ instead of sdl Alexander Kanavin
2019-02-01 13:05 ` [PATCH 05/13] qemu: build target variant with gtk+, and nativesdk variant without sdl Alexander Kanavin
2019-02-01 13:05 ` [PATCH 06/13] qemu: remove support for building against host sdl Alexander Kanavin
2019-02-01 13:05 ` [PATCH 07/13] qemu: add a gettext-native dependency to gtk option Alexander Kanavin
2019-02-01 13:05 ` [PATCH 08/13] qemu: add a patch to avoid a missing definition error Alexander Kanavin
2019-02-01 13:05 ` [PATCH 09/13] qemu: add environment variable wrappers to make qemu look good with gtk frontend Alexander Kanavin
2019-02-01 13:05 ` [PATCH 10/13] qemu: add a backported patch to fix egl-headless support Alexander Kanavin
2019-02-01 13:05 ` Alexander Kanavin [this message]
2019-02-01 13:05 ` [PATCH 12/13] runqemu: do not check for GL libraries Alexander Kanavin
2019-02-01 13:05 ` [PATCH 13/13] selftest: add tests for virgl GL acceleration Alexander Kanavin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190201130554.90094-11-alex.kanavin@gmail.com \
--to=alex.kanavin@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox