summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2018-06-11 16:38:20 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-18 11:07:58 +0100
commit87631af64032b18ea354b27cc586ec13391bd143 (patch)
tree18747d896b9853e44fb7039921adc66c0ee3518e /meta
parente67551e80e100913f59f3f9c8071ca451be02289 (diff)
downloadpoky-87631af64032b18ea354b27cc586ec13391bd143.tar.gz
qemuwrapper-cross: enable multilib and nativesdk variants of the script
Previously only one global variant of the script was created, which caused numerous issues: 1) multilib was not properly supported due to multilib variants each needing their own version of the qemu binary and library paths to be set 2) nativesdk was not properly supported for the same reason This patch also moves setting LD_LIBRARY_PATH directly into the recipe, as passing it down from other recipes did not work when said recipes were allarch, and adjusts calls to qemuwrapper from postinst-intercepts, so that its correct variant is selected. Also, the various qemu fallbacks in qemuwrapper script are all removed, as they are no longer necessary. (From OE-Core rev: d10fd6ae3fe46290c6e3a5250878966d9f12ca3f) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/fontcache.bbclass2
-rw-r--r--meta/classes/pixbufcache.bbclass2
-rw-r--r--meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb37
3 files changed, 12 insertions, 29 deletions
diff --git a/meta/classes/fontcache.bbclass b/meta/classes/fontcache.bbclass
index e76331131e..f71a754a4d 100644
--- a/meta/classes/fontcache.bbclass
+++ b/meta/classes/fontcache.bbclass
@@ -17,7 +17,7 @@ FONTCONFIG_CACHE_PARAMS ?= "-v"
17FONTCONFIG_CACHE_ENV ?= "FC_DEBUG=1" 17FONTCONFIG_CACHE_ENV ?= "FC_DEBUG=1"
18fontcache_common() { 18fontcache_common() {
19if [ -n "$D" ] ; then 19if [ -n "$D" ] ; then
20 $INTERCEPT_DIR/postinst_intercept update_font_cache ${PKG} mlprefix=${MLPREFIX} \ 20 $INTERCEPT_DIR/postinst_intercept update_font_cache ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} \
21 'bindir="${bindir}"' \ 21 'bindir="${bindir}"' \
22 'libdir="${libdir}"' \ 22 'libdir="${libdir}"' \
23 'base_libdir="${base_libdir}"' \ 23 'base_libdir="${base_libdir}"' \
diff --git a/meta/classes/pixbufcache.bbclass b/meta/classes/pixbufcache.bbclass
index b3e507f61b..3378ff2c80 100644
--- a/meta/classes/pixbufcache.bbclass
+++ b/meta/classes/pixbufcache.bbclass
@@ -12,7 +12,7 @@ PACKAGE_WRITE_DEPS += "qemu-native gdk-pixbuf-native"
12 12
13pixbufcache_common() { 13pixbufcache_common() {
14if [ "x$D" != "x" ]; then 14if [ "x$D" != "x" ]; then
15 $INTERCEPT_DIR/postinst_intercept update_pixbuf_cache ${PKG} mlprefix=${MLPREFIX} libdir=${libdir} \ 15 $INTERCEPT_DIR/postinst_intercept update_pixbuf_cache ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} libdir=${libdir} \
16 bindir=${bindir} base_libdir=${base_libdir} 16 bindir=${bindir} base_libdir=${base_libdir}
17else 17else
18 18
diff --git a/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb b/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
index c983fbae66..4b1b46d0bb 100644
--- a/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
+++ b/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
@@ -13,38 +13,21 @@ do_populate_sysroot[depends] = ""
13do_install () { 13do_install () {
14 install -d ${D}${bindir_crossscripts}/ 14 install -d ${D}${bindir_crossscripts}/
15 15
16 echo "#!/bin/sh" > ${D}${bindir_crossscripts}/qemuwrapper
17 qemu_binary=${@qemu_target_binary(d)} 16 qemu_binary=${@qemu_target_binary(d)}
18 qemu_options='${QEMU_OPTIONS}' 17 qemu_options='${QEMU_OPTIONS} -E LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir}'
19 echo "$qemu_binary $qemu_options \"\$@\"" >> ${D}${bindir_crossscripts}/qemuwrapper 18
20 fallback_qemu_bin= 19 cat >> ${D}${bindir_crossscripts}/${MLPREFIX}qemuwrapper << EOF
21 case $qemu_binary in 20#!/bin/sh
22 "qemu-i386") 21set -x
23 fallback_qemu_bin=qemu-x86_64
24 ;;
25 "qemu-x86_64")
26 fallback_qemu_bin=qemu-i386
27 ;;
28 *)
29 ;;
30 esac
31
32 if [ -n "$fallback_qemu_bin" ]; then
33
34 cat >> ${D}${bindir_crossscripts}/qemuwrapper << EOF
35rc=\$?
36if [ \$rc = 255 ]; then
37 $fallback_qemu_bin "\$@"
38 rc=\$?
39fi
40exit \$rc
41EOF
42 22
43 fi 23$qemu_binary $qemu_options "\$@"
24EOF
44 25
45 chmod +x ${D}${bindir_crossscripts}/qemuwrapper 26 chmod +x ${D}${bindir_crossscripts}/${MLPREFIX}qemuwrapper
46} 27}
47 28
48SYSROOT_DIRS += "${bindir_crossscripts}" 29SYSROOT_DIRS += "${bindir_crossscripts}"
49 30
50INHIBIT_DEFAULT_DEPS = "1" 31INHIBIT_DEFAULT_DEPS = "1"
32
33BBCLASSEXTEND = "nativesdk"