blob: 4aada5232d8d4987733f65f8315c71dab546da61 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "QEMU wrapper script"
Brad Bishopd7bf8c12018-02-25 22:55:05 -05002HOMEPAGE = "http://qemu.org"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05003LICENSE = "MIT"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05004
5S = "${WORKDIR}"
6
Brad Bishop6e60e8b2018-02-01 10:27:11 -05007DEPENDS += "qemu-native"
8
Patrick Williamsc124f4f2015-09-15 14:41:29 -05009inherit qemu
10
Brad Bishop6e60e8b2018-02-01 10:27:11 -050011do_populate_sysroot[depends] = ""
12
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013do_install () {
14 install -d ${D}${bindir_crossscripts}/
15
Patrick Williamsc124f4f2015-09-15 14:41:29 -050016 qemu_binary=${@qemu_target_binary(d)}
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080017 qemu_options='${QEMU_OPTIONS} -E LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir}'
Patrick Williamsc124f4f2015-09-15 14:41:29 -050018
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080019 cat >> ${D}${bindir_crossscripts}/${MLPREFIX}qemuwrapper << EOF
20#!/bin/sh
21set -x
Patrick Williamsc124f4f2015-09-15 14:41:29 -050022
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080023if [ ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d)} = False ]; then
24 echo "qemuwrapper: qemu usermode is not supported"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050025fi
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080026
27
28$qemu_binary $qemu_options "\$@"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050029EOF
30
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080031 chmod +x ${D}${bindir_crossscripts}/${MLPREFIX}qemuwrapper
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032}
33
Patrick Williamsc0f7c042017-02-23 20:41:17 -060034SYSROOT_DIRS += "${bindir_crossscripts}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050035
36INHIBIT_DEFAULT_DEPS = "1"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080037
38BBCLASSEXTEND = "nativesdk"