mirror of
https://git.yoctoproject.org/poky
synced 2026-03-05 14:59:41 +01:00
When building nativesdk- package, MACHINE_FEATURES do not apply as they are specified only for target machines, not ones hosting the sdk. (From OE-Core rev: 3ae634853a034a322593d318502ea2ee799556f7) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
40 lines
839 B
BlitzBasic
40 lines
839 B
BlitzBasic
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 -a "${PN}" != "nativesdk-qemuwrapper-cross" ]; then
|
|
echo "qemuwrapper: qemu usermode is not supported"
|
|
exit 1
|
|
fi
|
|
|
|
|
|
$qemu_binary $qemu_options "\$@"
|
|
EOF
|
|
|
|
chmod +x ${D}${bindir_crossscripts}/${MLPREFIX}qemuwrapper
|
|
}
|
|
|
|
SYSROOT_DIRS += "${bindir_crossscripts}"
|
|
|
|
INHIBIT_DEFAULT_DEPS = "1"
|
|
|
|
BBCLASSEXTEND = "nativesdk"
|