diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/qemu.bbclass | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/meta/classes/qemu.bbclass b/meta/classes/qemu.bbclass index c696085ddf..f3d3be832c 100644 --- a/meta/classes/qemu.bbclass +++ b/meta/classes/qemu.bbclass | |||
@@ -13,7 +13,19 @@ def qemu_target_binary(data): | |||
13 | target_arch = "ppc64" | 13 | target_arch = "ppc64" |
14 | 14 | ||
15 | return "qemu-" + target_arch | 15 | return "qemu-" + target_arch |
16 | # | 16 | |
17 | def qemu_wrapper_cmdline(data, rootfs_path, library_paths): | ||
18 | import string | ||
19 | |||
20 | qemu_binary = qemu_target_binary(data) | ||
21 | if qemu_binary == "qemu-allarch": | ||
22 | qemu_binary = "qemuwrapper" | ||
23 | |||
24 | qemu_options = data.getVar("QEMU_OPTIONS", True) | ||
25 | |||
26 | return "PSEUDO_UNLOAD=1 " + qemu_binary + " " + qemu_options + " -L " + rootfs_path\ | ||
27 | + " -E LD_LIBRARY_PATH=" + ":".join(library_paths) + " " | ||
28 | |||
17 | # Next function will return a string containing the command that is needed to | 29 | # Next function will return a string containing the command that is needed to |
18 | # to run a certain binary through qemu. For example, in order to make a certain | 30 | # to run a certain binary through qemu. For example, in order to make a certain |
19 | # postinstall scriptlet run at do_rootfs time and running the postinstall is | 31 | # postinstall scriptlet run at do_rootfs time and running the postinstall is |
@@ -23,17 +35,10 @@ def qemu_target_binary(data): | |||
23 | # ${@qemu_run_binary(d, '$D', '/usr/bin/test_app')} [test_app arguments] | 35 | # ${@qemu_run_binary(d, '$D', '/usr/bin/test_app')} [test_app arguments] |
24 | # | 36 | # |
25 | def qemu_run_binary(data, rootfs_path, binary): | 37 | def qemu_run_binary(data, rootfs_path, binary): |
26 | qemu_binary = qemu_target_binary(data) | ||
27 | if qemu_binary == "qemu-allarch": | ||
28 | qemu_binary = "qemuwrapper" | ||
29 | |||
30 | libdir = rootfs_path + data.getVar("libdir", False) | 38 | libdir = rootfs_path + data.getVar("libdir", False) |
31 | base_libdir = rootfs_path + data.getVar("base_libdir", False) | 39 | base_libdir = rootfs_path + data.getVar("base_libdir", False) |
32 | qemu_options = data.getVar("QEMU_OPTIONS", True) | ||
33 | 40 | ||
34 | return "PSEUDO_UNLOAD=1 " + qemu_binary + " " + qemu_options + " -L " + rootfs_path\ | 41 | return qemu_wrapper_cmdline(data, rootfs_path, [libdir, base_libdir]) + rootfs_path + binary |
35 | + " -E LD_LIBRARY_PATH=" + libdir + ":" + base_libdir + " "\ | ||
36 | + rootfs_path + binary | ||
37 | 42 | ||
38 | # QEMU_EXTRAOPTIONS is not meant to be directly used, the extensions are | 43 | # QEMU_EXTRAOPTIONS is not meant to be directly used, the extensions are |
39 | # PACKAGE_ARCH, *NOT* overrides. | 44 | # PACKAGE_ARCH, *NOT* overrides. |