1SUMMARY = "QEMU wrapper script" 2HOMEPAGE = "http://qemu.org" 3LICENSE = "MIT" 4 5S = "${WORKDIR}" 6 7DEPENDS += "qemu-native" 8 9inherit qemu 10 11do_populate_sysroot[depends] = "" 12 13do_install () { 14 install -d ${D}${bindir_crossscripts}/ 15 16 qemu_binary=${@qemu_target_binary(d)} 17 qemu_options='${QEMU_OPTIONS} -E LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir}' 18 19 cat >> ${D}${bindir_crossscripts}/${MLPREFIX}qemuwrapper << EOF 20#!/bin/sh 21# Wrapper script to run binaries under qemu user-mode emulation 22set -x 23 24if [ ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d)} = False -a "${PN}" != "nativesdk-qemuwrapper-cross" ]; then 25 echo "qemuwrapper: qemu usermode is not supported" 26 exit 1 27fi 28 29 30$qemu_binary $qemu_options "\$@" 31EOF 32 33 chmod +x ${D}${bindir_crossscripts}/${MLPREFIX}qemuwrapper 34} 35 36SYSROOT_DIRS += "${bindir_crossscripts}" 37 38INHIBIT_DEFAULT_DEPS = "1" 39 40BBCLASSEXTEND = "nativesdk" 41