summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
blob: 4aada5232d8d4987733f65f8315c71dab546da61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
SUMMARY = "QEMU wrapper script"
HOMEPAGE = "http://qemu.org"
LICENSE = "MIT"

S = "${WORKDIR}"

DEPENDS += "qemu-native"

inherit qemu

do_populate_sysroot[depends] = ""

do_install () {
	install -d ${D}${bindir_crossscripts}/

	qemu_binary=${@qemu_target_binary(d)}
	qemu_options='${QEMU_OPTIONS} -E LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir}'

	cat >> ${D}${bindir_crossscripts}/${MLPREFIX}qemuwrapper << EOF
#!/bin/sh
set -x

if [ ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d)} = False ]; then
        echo "qemuwrapper: qemu usermode is not supported"
fi


$qemu_binary $qemu_options "\$@"
EOF

	chmod +x ${D}${bindir_crossscripts}/${MLPREFIX}qemuwrapper
}

SYSROOT_DIRS += "${bindir_crossscripts}"

INHIBIT_DEFAULT_DEPS = "1"

BBCLASSEXTEND = "nativesdk"