diff options
author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2018-06-11 16:38:20 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-06-18 11:07:58 +0100 |
commit | 87631af64032b18ea354b27cc586ec13391bd143 (patch) | |
tree | 18747d896b9853e44fb7039921adc66c0ee3518e /meta/recipes-devtools/qemu | |
parent | e67551e80e100913f59f3f9c8071ca451be02289 (diff) | |
download | poky-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/recipes-devtools/qemu')
-rw-r--r-- | meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb | 37 |
1 files changed, 10 insertions, 27 deletions
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] = "" | |||
13 | do_install () { | 13 | do_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") | 21 | set -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 | ||
35 | rc=\$? | ||
36 | if [ \$rc = 255 ]; then | ||
37 | $fallback_qemu_bin "\$@" | ||
38 | rc=\$? | ||
39 | fi | ||
40 | exit \$rc | ||
41 | EOF | ||
42 | 22 | ||
43 | fi | 23 | $qemu_binary $qemu_options "\$@" |
24 | EOF | ||
44 | 25 | ||
45 | chmod +x ${D}${bindir_crossscripts}/qemuwrapper | 26 | chmod +x ${D}${bindir_crossscripts}/${MLPREFIX}qemuwrapper |
46 | } | 27 | } |
47 | 28 | ||
48 | SYSROOT_DIRS += "${bindir_crossscripts}" | 29 | SYSROOT_DIRS += "${bindir_crossscripts}" |
49 | 30 | ||
50 | INHIBIT_DEFAULT_DEPS = "1" | 31 | INHIBIT_DEFAULT_DEPS = "1" |
32 | |||
33 | BBCLASSEXTEND = "nativesdk" | ||