qemuwrapper-cross_1.0.bb 903 B

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