Split out common qemu code used for lv2 here

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
This commit is contained in:
Andreas Müller
2017-07-10 23:16:58 +02:00
parent 6056813741
commit cbc223b6cb
4 changed files with 28 additions and 58 deletions

22
classes/qemu-ext.bbclass Normal file
View File

@@ -0,0 +1,22 @@
inherit qemu
DEPENDS += "qemu-native"
# slightly reworked qemu_run_binary: qemu.bbclass expects binary in sysroot but
# our binary is not (yet) installed
# ${@qemu_run_binary_local(d, '$D', '/usr/bin/test_app')} [test_app arguments]
#
def qemu_run_binary_local(data, rootfs_path, binary):
qemu_binary = qemu_target_binary(data)
if qemu_binary == "qemu-allarch":
qemu_binary = "qemuwrapper"
libdir = rootfs_path + data.getVar("libdir", False)
base_libdir = rootfs_path + data.getVar("base_libdir", False)
qemu_options = data.getVar("QEMU_OPTIONS", True)
return "PSEUDO_UNLOAD=1 " + qemu_binary + " " + qemu_options + " -L " + rootfs_path\
+ " -E LD_LIBRARY_PATH=" + libdir + ":" + base_libdir + " "\
+ binary