Patchwork qemu: add wrapper for qemu-mips binary

mail settings
Submitter Laurentiu Palcu
Date Oct. 3, 2012, 9:48 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/37653/
State New
Headers show


Laurentiu Palcu - Oct. 3, 2012, 9:48 a.m.
qemu-mips user emulation binary segfaults when running any kind of
binary. This is due to a MMU access fault in the virtual CPU. This
problem has been introduced in qemu when 4GB of vmem were reserved for
32-on-64 bit.

This workaround will need to be reverted once the proper fix is found.

[YOCTO #3143]

Signed-off-by: Laurentiu Palcu <>
 meta/recipes-devtools/qemu/ |   14 ++++++++++++++
 1 file changed, 14 insertions(+)


diff --git a/meta/recipes-devtools/qemu/ b/meta/recipes-devtools/qemu/
index 191ee48..dcf998a 100644
--- a/meta/recipes-devtools/qemu/
+++ b/meta/recipes-devtools/qemu/
@@ -29,6 +29,20 @@  do_configure_prepend_virtclass-nativesdk() {
 		sed -i 's/-lX11//g'
+# The following fragment will create a wrapper for qemu-mips user emulation
+# binary in order to work around a segmentation fault issue. Basically, by
+# default, the reserved virtual address space for 32-on-64 bit is set to 4GB.
+# This will trigger a MMU access fault in the virtual CPU. With this change,
+# the qemu-mips works fine.
+# IMPORTANT: This piece needs to be removed once the root cause is fixed!
+inherit utils
+do_install_append() {
+	create_wrapper ${D}/${bindir}/qemu-mips \
+# END of qemu-mips workaround
 do_configure_prepend_virtclass-native() {
 	# Undo the -lX11 added by linker-flags.patch, don't assume that host has libX11 installed
 	sed -i 's/-lX11//g'