blob: 4aada5232d8d4987733f65f8315c71dab546da61 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001SUMMARY = "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
21set -x
22
23if [ ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d)} = False ]; then
24 echo "qemuwrapper: qemu usermode is not supported"
25fi
26
27
28$qemu_binary $qemu_options "\$@"
29EOF
30
31 chmod +x ${D}${bindir_crossscripts}/${MLPREFIX}qemuwrapper
32}
33
34SYSROOT_DIRS += "${bindir_crossscripts}"
35
36INHIBIT_DEFAULT_DEPS = "1"
37
38BBCLASSEXTEND = "nativesdk"