summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex@linutronix.de>2022-02-06 12:56:02 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-07 10:08:59 +0000
commit276975e4ea78691d092ddcca50098ed177357a74 (patch)
tree5101508fd082c63707bc0a9cb736e3ee10e4babe
parent1dfa8537a3ede339f0cf18ef41cf08059f4c2c6c (diff)
downloadpoky-276975e4ea78691d092ddcca50098ed177357a74.tar.gz
qemu: replace a gtk wrapper with directly setting environment from runqemu
The wrapper is executed by host bash, and host bash refuses to run when pseudo libc is preloaded via LD_PRELOAD (which is the case when gl is enabled). Only the fontconfig setting is carried over as local testing showed that only that is necessary for the gui to look ok nowadays; adjust further if necessary. (From OE-Core rev: 34f152de14f803fcfe5c92c515bf585838bba10a) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/qemu/qemu-native.inc4
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc11
-rw-r--r--meta/recipes-devtools/qemu/qemu_6.2.0.bb4
-rwxr-xr-xscripts/runqemu1
4 files changed, 1 insertions, 19 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-native.inc b/meta/recipes-devtools/qemu/qemu-native.inc
index 5d3ba3486c..d9acc613f9 100644
--- a/meta/recipes-devtools/qemu/qemu-native.inc
+++ b/meta/recipes-devtools/qemu/qemu-native.inc
@@ -5,7 +5,3 @@ inherit native
5EXTRA_OEMAKE:append = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'" 5EXTRA_OEMAKE:append = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'"
6 6
7LDFLAGS:append = " -fuse-ld=bfd" 7LDFLAGS:append = " -fuse-ld=bfd"
8
9do_install:append() {
10 ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)}
11}
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 843de3337a..325118cfb3 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -138,17 +138,6 @@ do_install:append() {
138} 138}
139# END of qemu-mips workaround 139# END of qemu-mips workaround
140 140
141make_qemu_wrapper() {
142 gdk_pixbuf_module_file=`pkg-config --variable=gdk_pixbuf_cache_file gdk-pixbuf-2.0`
143
144 for tool in `ls ${D}${bindir}/qemu-system-*`; do
145 create_wrapper $tool \
146 GDK_PIXBUF_MODULE_FILE=$gdk_pixbuf_module_file \
147 FONTCONFIG_PATH=/etc/fonts \
148 GTK_THEME=Adwaita
149 done
150}
151
152# Disable kvm/virgl/mesa on targets that do not support it 141# Disable kvm/virgl/mesa on targets that do not support it
153PACKAGECONFIG:remove:darwin = "kvm virglrenderer glx gtk+" 142PACKAGECONFIG:remove:darwin = "kvm virglrenderer glx gtk+"
154PACKAGECONFIG:remove:mingw32 = "kvm virglrenderer glx gtk+" 143PACKAGECONFIG:remove:mingw32 = "kvm virglrenderer glx gtk+"
diff --git a/meta/recipes-devtools/qemu/qemu_6.2.0.bb b/meta/recipes-devtools/qemu/qemu_6.2.0.bb
index c9a53e3b05..062ed32b01 100644
--- a/meta/recipes-devtools/qemu/qemu_6.2.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_6.2.0.bb
@@ -12,10 +12,6 @@ EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}"
12EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" 12EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}"
13EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" 13EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}"
14 14
15do_install:append:class-nativesdk() {
16 ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)}
17}
18
19PACKAGECONFIG ??= " \ 15PACKAGECONFIG ??= " \
20 fdt sdl kvm pie \ 16 fdt sdl kvm pie \
21 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \ 17 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
diff --git a/scripts/runqemu b/scripts/runqemu
index 4e05c1bb15..07429372ea 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1369,6 +1369,7 @@ class BaseConfig(object):
1369 if self.sdl == True: 1369 if self.sdl == True:
1370 self.qemu_opt += 'sdl,' 1370 self.qemu_opt += 'sdl,'
1371 elif self.gtk == True: 1371 elif self.gtk == True:
1372 os.environ['FONTCONFIG_PATH'] = '/etc/fonts'
1372 self.qemu_opt += 'gtk,' 1373 self.qemu_opt += 'gtk,'
1373 1374
1374 if self.gl == True: 1375 if self.gl == True: