diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2019-02-22 15:33:43 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-25 10:56:17 +0000 |
commit | 0ad1f917057d23bafee9571c8d39fd30949b3065 (patch) | |
tree | f12b58690f3ee4383ea6936465835bb264018dee /meta | |
parent | 13d956813d7b1c974886ef41df372391c0ccc303 (diff) | |
download | poky-0ad1f917057d23bafee9571c8d39fd30949b3065.tar.gz |
qemu: add environment variable wrappers to make qemu look good with gtk frontend
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.
(From OE-Core rev: d5b8a65861adba298a9dc2c4e9a7a7da5490073a)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu.inc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index e92c33cf39..7fd580c8ae 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc | |||
@@ -56,6 +56,25 @@ do_install () { | |||
56 | oe_runmake 'DESTDIR=${D}' install | 56 | oe_runmake 'DESTDIR=${D}' install |
57 | } | 57 | } |
58 | 58 | ||
59 | make_qemu_wrapper() { | ||
60 | gdk_pixbuf_module_file=`pkg-config --variable=gdk_pixbuf_cache_file gdk-pixbuf-2.0` | ||
61 | |||
62 | for tool in `ls ${D}${bindir}/qemu-system-*`; do | ||
63 | create_wrapper $tool \ | ||
64 | GDK_PIXBUF_MODULE_FILE=$gdk_pixbuf_module_file \ | ||
65 | FONTCONFIG_PATH=/etc/fonts \ | ||
66 | GTK_THEME=Adwaita | ||
67 | done | ||
68 | } | ||
69 | |||
70 | do_install_append_class-native() { | ||
71 | ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} | ||
72 | } | ||
73 | |||
74 | do_install_append_class-nativesdk() { | ||
75 | ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} | ||
76 | } | ||
77 | |||
59 | # The following fragment will create a wrapper for qemu-mips user emulation | 78 | # The following fragment will create a wrapper for qemu-mips user emulation |
60 | # binary in order to work around a segmentation fault issue. Basically, by | 79 | # binary in order to work around a segmentation fault issue. Basically, by |
61 | # default, the reserved virtual address space for 32-on-64 bit is set to 4GB. | 80 | # default, the reserved virtual address space for 32-on-64 bit is set to 4GB. |