rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | SUMMARY = "QEMU wrapper script" |
| 2 | HOMEPAGE = "http://qemu.org" |
| 3 | LICENSE = "MIT" |
| 4 | |
| 5 | S = "${WORKDIR}" |
| 6 | |
| 7 | DEPENDS += "qemu-native" |
| 8 | |
| 9 | inherit qemu |
| 10 | |
| 11 | do_populate_sysroot[depends] = "" |
| 12 | |
| 13 | do_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 | set -x |
| 22 | |
| 23 | if [ ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d)} = False ]; then |
| 24 | echo "qemuwrapper: qemu usermode is not supported" |
| 25 | fi |
| 26 | |
| 27 | |
| 28 | $qemu_binary $qemu_options "\$@" |
| 29 | EOF |
| 30 | |
| 31 | chmod +x ${D}${bindir_crossscripts}/${MLPREFIX}qemuwrapper |
| 32 | } |
| 33 | |
| 34 | SYSROOT_DIRS += "${bindir_crossscripts}" |
| 35 | |
| 36 | INHIBIT_DEFAULT_DEPS = "1" |
| 37 | |
| 38 | BBCLASSEXTEND = "nativesdk" |