From: Alexander Kanavin <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 09/13] qemu: add environment variable wrappers to make qemu look good with gtk frontend
Date: Fri, 1 Feb 2019 14:05:50 +0100 [thread overview]
Message-ID: <20190201130554.90094-9-alex.kanavin@gmail.com> (raw)
In-Reply-To: <20190201130554.90094-1-alex.kanavin@gmail.com>
GTK_THEME instructs gtk to use its built-in theme. Otherwise
gtk attempts to use the theme from the host, which may be from
a totally mismatching gtk version.
On the other hand FONTCONFIG_PATH tells it to use the host fonts,
as providing fonts in the native sysroot and instructing the components
to use them is a lot more tricky.
GDK_PIXBUF_MODULE_FILE is set, because otherwise qemu works but
fills stdout with error messages, which eventually fill the pipe
they go into. That pipe is read from only when qemu exits (to
collect any error messages) by runqemu script. The pipe fill-up
causes the qemu process to lock up.
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
meta/recipes-devtools/qemu/qemu.inc | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index b80b9e131a1..9a989f00b0b 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -48,6 +48,25 @@ do_install () {
oe_runmake 'DESTDIR=${D}' install
}
+make_qemu_wrapper() {
+ gdk_pixbuf_module_file=`pkg-config --variable=gdk_pixbuf_cache_file gdk-pixbuf-2.0`
+
+ for tool in `ls ${D}${bindir}/qemu-system-*`; do
+ create_wrapper $tool \
+ GDK_PIXBUF_MODULE_FILE=$gdk_pixbuf_module_file \
+ FONTCONFIG_PATH=/etc/fonts \
+ GTK_THEME=Adwaita
+ done
+}
+
+do_install_append_class-native() {
+ ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)}
+}
+
+do_install_append_class-nativesdk() {
+ ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)}
+}
+
# The following fragment will create a wrapper for qemu-mips user emulation
# binary in order to work around a segmentation fault issue. Basically, by
# default, the reserved virtual address space for 32-on-64 bit is set to 4GB.
--
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 ` Alexander Kanavin [this message]
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 ` [PATCH 11/13] runqemu: add options for enabling virgl GL acceleration Alexander Kanavin
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-9-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