This helps in particular when executing nativesdk- postinsts; previously they were attempted only with target qemu, and this obivously failed.
This could be solved by properly mapping the binary to be run to the best available qemu variant for the binary architecture, but that would be a lot more invasive change, and so I think a simple fallback should be fine. Signed-off-by: Alexander Kanavin <[email protected]> --- .../qemu/qemuwrapper-cross_1.0.bb | 28 ++++++++----------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb b/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb index c983fbae667..091aa52a33e 100644 --- a/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb +++ b/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb @@ -17,30 +17,24 @@ do_install () { qemu_binary=${@qemu_target_binary(d)} qemu_options='${QEMU_OPTIONS}' echo "$qemu_binary $qemu_options \"\$@\"" >> ${D}${bindir_crossscripts}/qemuwrapper - fallback_qemu_bin= - case $qemu_binary in - "qemu-i386") - fallback_qemu_bin=qemu-x86_64 - ;; - "qemu-x86_64") - fallback_qemu_bin=qemu-i386 - ;; - *) - ;; - esac - - if [ -n "$fallback_qemu_bin" ]; then - - cat >> ${D}${bindir_crossscripts}/qemuwrapper << EOF + + cat >> ${D}${bindir_crossscripts}/qemuwrapper << EOF rc=\$? if [ \$rc = 255 ]; then - $fallback_qemu_bin "\$@" + qemu-x86_64 "\$@" rc=\$? fi exit \$rc EOF - fi + cat >> ${D}${bindir_crossscripts}/qemuwrapper << EOF +rc=\$? +if [ \$rc = 255 ]; then + qemu-i386 "\$@" + rc=\$? +fi +exit \$rc +EOF chmod +x ${D}${bindir_crossscripts}/qemuwrapper } -- 2.17.0 -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
