Patchwork qemuwrapper-cross: Use QEMU_OPTIONS

login
register
mail settings
Submitter Richard Purdie
Date June 13, 2014, 1:07 p.m.
Message ID <1402664835.12440.480.camel@ted>
Download mbox | patch
Permalink /patch/73765/
State Accepted
Commit 0404123e2da7fb1d6345dfb515a167adbb968f28
Headers show

Comments

Richard Purdie - June 13, 2014, 1:07 p.m.
The correct cpu options are needed in order to correctly run some CPU
types. This information is available in QEMU_OPTIONS, use it. This
avoids architectures like qemuppc failing postinstalls.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Patch

diff --git a/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb b/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
index 3bfb5bd..d2981b5 100644
--- a/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
+++ b/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
@@ -9,7 +9,8 @@  do_install () {
 
 	echo "#!/bin/sh" > ${D}${bindir_crossscripts}/qemuwrapper
 	qemu_binary=${@qemu_target_binary(d)}
-	echo "$qemu_binary \"\$@\"" >> ${D}${bindir_crossscripts}/qemuwrapper
+	qemu_options='${@d.getVar("QEMU_OPTIONS_%s" % d.getVar('PACKAGE_ARCH', True), True) or d.getVar('QEMU_OPTIONS', True) or ""}'
+	echo "$qemu_binary $qemu_options \"\$@\"" >> ${D}${bindir_crossscripts}/qemuwrapper
 	fallback_qemu_bin=
 	case $qemu_binary in
 		"qemu-i386")