diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 14:36:22 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 15:32:53 +0200 |
commit | f4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch) | |
tree | 487180fa9866985ea7b28e625651765d86f515c3 /meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb | |
download | poky-f4cf9fe05bb3f32fabea4e54dd92d368967a80da.tar.gz |
initial commit for Enea Linux 4.0
Migrated from the internal git server on the daisy-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb')
-rw-r--r-- | meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb b/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb new file mode 100644 index 0000000000..3bfb5bde80 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb | |||
@@ -0,0 +1,47 @@ | |||
1 | SUMMARY = "QEMU wrapper script" | ||
2 | LICENSE = "MIT" | ||
3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
4 | |||
5 | inherit qemu | ||
6 | |||
7 | do_install () { | ||
8 | install -d ${D}${bindir_crossscripts}/ | ||
9 | |||
10 | echo "#!/bin/sh" > ${D}${bindir_crossscripts}/qemuwrapper | ||
11 | qemu_binary=${@qemu_target_binary(d)} | ||
12 | echo "$qemu_binary \"\$@\"" >> ${D}${bindir_crossscripts}/qemuwrapper | ||
13 | fallback_qemu_bin= | ||
14 | case $qemu_binary in | ||
15 | "qemu-i386") | ||
16 | fallback_qemu_bin=qemu-x86_64 | ||
17 | ;; | ||
18 | "qemu-x86_64") | ||
19 | fallback_qemu_bin=qemu-i386 | ||
20 | ;; | ||
21 | *) | ||
22 | ;; | ||
23 | esac | ||
24 | |||
25 | if [ -n "$fallback_qemu_bin" ]; then | ||
26 | |||
27 | cat >> ${D}${bindir_crossscripts}/qemuwrapper << EOF | ||
28 | rc=\$? | ||
29 | if [ \$rc = 255 ]; then | ||
30 | $fallback_qemu_bin "\$@" | ||
31 | rc=\$? | ||
32 | fi | ||
33 | exit \$rc | ||
34 | EOF | ||
35 | |||
36 | fi | ||
37 | |||
38 | chmod +x ${D}${bindir_crossscripts}/qemuwrapper | ||
39 | } | ||
40 | |||
41 | SYSROOT_PREPROCESS_FUNCS += "qemuwrapper_sysroot_preprocess" | ||
42 | |||
43 | qemuwrapper_sysroot_preprocess () { | ||
44 | sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts} | ||
45 | } | ||
46 | |||
47 | INHIBIT_DEFAULT_DEPS = "1" | ||