From: Alexander Kanavin <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 3/8] qemu: enable virglrenderer and glx options subject to 'opengl' DISTRO_FEATURE
Date: Wed, 27 Mar 2019 18:16:28 +0100 [thread overview]
Message-ID: <20190327171633.34697-3-alex.kanavin@gmail.com> (raw)
In-Reply-To: <20190327171633.34697-1-alex.kanavin@gmail.com>
Note that to actually use accelerated GL passthrough, there are two options
1) a suitable frontend need to be also enabled - gtk+ seems to work well,
sdl was found to be buggy.
2) it is also possible to render off-screen with -display egl-headless option,
and see the output with a VNC viewer (for which, qemu needs to be started
with a VNC server):
$ runqemu kvm egl-headless publicvnc
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
meta/lib/oeqa/selftest/cases/runtime_test.py | 15 ++++++---------
.../qemu/qemu-system-native_3.1.0.bb | 4 +++-
meta/recipes-devtools/qemu/qemu_3.1.0.bb | 5 ++++-
3 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
index 6c25bb901d1..fca803ffbc5 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -185,13 +185,12 @@ class TestImage(OESelftestTestCase):
self.skipTest('virgl isn\'t working with Debian 8')
qemu_packageconfig = get_bb_var('PACKAGECONFIG', 'qemu-system-native')
+ qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native')
features = 'INHERIT += "testimage"\n'
if 'gtk+' not in qemu_packageconfig:
features += 'PACKAGECONFIG_append_pn-qemu-system-native = " gtk+"\n'
- if 'virglrenderer' not in qemu_packageconfig:
- features += 'PACKAGECONFIG_append_pn-qemu-system-native = " virglrenderer"\n'
- if 'glx' not in qemu_packageconfig:
- features += 'PACKAGECONFIG_append_pn-qemu-system-native = " glx"\n'
+ if 'opengl' not in qemu_distrofeatures:
+ features += 'DISTRO_FEATURES_append = " opengl"\n'
features += 'TEST_SUITES = "ping ssh virgl"\n'
features += 'IMAGE_FEATURES_append = " ssh-server-dropbear"\n'
features += 'IMAGE_INSTALL_append = " kmscube"\n'
@@ -220,12 +219,10 @@ class TestImage(OESelftestTestCase):
dripath = subprocess.check_output("pkg-config --variable=dridriverdir dri", shell=True)
except subprocess.CalledProcessError as e:
self.skipTest("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.")
- qemu_packageconfig = get_bb_var('PACKAGECONFIG', 'qemu-system-native')
+ qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native')
features = 'INHERIT += "testimage"\n'
- if 'virglrenderer' not in qemu_packageconfig:
- features += 'PACKAGECONFIG_append_pn-qemu-system-native = " virglrenderer"\n'
- if 'glx' not in qemu_packageconfig:
- features += 'PACKAGECONFIG_append_pn-qemu-system-native = " glx"\n'
+ if 'opengl' not in qemu_distrofeatures:
+ features += 'DISTRO_FEATURES_append = " opengl"\n'
features += 'TEST_SUITES = "ping ssh virgl"\n'
features += 'IMAGE_FEATURES_append = " ssh-server-dropbear"\n'
features += 'IMAGE_INSTALL_append = " kmscube"\n'
diff --git a/meta/recipes-devtools/qemu/qemu-system-native_3.1.0.bb b/meta/recipes-devtools/qemu/qemu-system-native_3.1.0.bb
index 5bf528bec12..6928592a94c 100644
--- a/meta/recipes-devtools/qemu/qemu-system-native_3.1.0.bb
+++ b/meta/recipes-devtools/qemu/qemu-system-native_3.1.0.bb
@@ -9,7 +9,9 @@ DEPENDS = "glib-2.0-native zlib-native pixman-native qemu-native"
EXTRA_OECONF_append = " --target-list=${@get_qemu_system_target_list(d)}"
-PACKAGECONFIG ??= "fdt alsa kvm"
+PACKAGECONFIG ??= "fdt alsa kvm \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer glx', '' ,d)} \
+"
# Handle distros such as CentOS 5 32-bit that do not have kvm support
PACKAGECONFIG_remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}"
diff --git a/meta/recipes-devtools/qemu/qemu_3.1.0.bb b/meta/recipes-devtools/qemu/qemu_3.1.0.bb
index 04d8bee99f2..8113fc24e8b 100644
--- a/meta/recipes-devtools/qemu/qemu_3.1.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_3.1.0.bb
@@ -16,7 +16,10 @@ do_install_append_class-nativesdk() {
PACKAGECONFIG ??= " \
fdt sdl kvm \
${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer glx', '' ,d)} \
+"
+PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer glx', '' ,d)} \
"
-PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm"
--
2.17.1
next prev parent reply other threads:[~2019-03-27 17:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-27 17:16 [PATCH 1/8] bitbake.conf: propagate 'opengl' DISTRO_FEATURE to native/nativesdk from target Alexander Kanavin
2019-03-27 17:16 ` [PATCH 2/8] xorg-lib: drop native overrides for REQUIRED_DISTRO_FEATURES Alexander Kanavin
2019-03-27 17:16 ` Alexander Kanavin [this message]
2019-03-27 17:16 ` [PATCH 4/8] qemu: add a gtk+ frontend to target builds Alexander Kanavin
2019-03-27 17:16 ` [PATCH 5/8] qemu: remove sdl option from PACKAGECONFIG default Alexander Kanavin
2019-03-27 17:16 ` [PATCH 6/8] qemu: remove support for building against host sdl Alexander Kanavin
2019-03-27 17:16 ` [PATCH 7/8] local.conf.sample: enable gtk+ frontend in addition to sdl Alexander Kanavin
2019-03-27 17:16 ` [PATCH 8/8] local.conf.sample: remove support for building against host libsdl 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=20190327171633.34697-3-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.