summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb')
-rw-r--r--meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb37
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] = ""
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"