qemuwrapper-cross_1.0.bb 930 B

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