diff options
Diffstat (limited to 'meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb')
-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" | ||