]> code.ossystems Code Review - openembedded-core.git/commitdiff
qemu.bbclass: return qemuwrapper instead of qemu-allarch
authorLaurentiu Palcu <laurentiu.palcu@intel.com>
Thu, 31 Jan 2013 08:27:22 +0000 (10:27 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 6 Feb 2013 09:35:02 +0000 (09:35 +0000)
When qemu bbclass is inherited from a recipe that is not architecture
dependent, qemu_run_binary will return "qemu-allarch". However this
binary does not exist. Instead, return "qemuwrapper" which will, in
turn, execute the right binary for the target the image was built for.

[YOCTO #2599]

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/classes/qemu.bbclass

index 13af3390aa73feed5972630ea3cae3a7c6dd83d9..9cefabbf84d3d0aa18fe868e78fe718ce5f162d3 100644 (file)
@@ -23,10 +23,14 @@ def qemu_target_binary(data):
 # ${@qemu_run_binary(d, '$D', '/usr/bin/test_app')} [test_app arguments]
 #
 def qemu_run_binary(data, rootfs_path, binary):
+    qemu_binary = qemu_target_binary(data)
+    if qemu_binary == "qemu-allarch":
+        qemu_binary = "qemuwrapper"
+
     dynamic_loader = rootfs_path + '$(readelf -l ' + rootfs_path + \
                      binary + '| grep "Requesting program interpreter"|sed -e \'s/^.*\[.*: \(.*\)\]/\\1/\')'
     library_path = rootfs_path + data.getVar("base_libdir", True) + ":" + \
                    rootfs_path + data.getVar("libdir", True)
 
-    return qemu_target_binary(data) + " " + dynamic_loader + " --library-path " + library_path \
+    return qemu_binary + " " + dynamic_loader + " --library-path " + library_path \
            + " " + rootfs_path + binary