summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2012-10-03 14:23:26 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-03 12:40:05 +0100
commit0d43dc75e4ddf9b8966429f41355cb2e8895d0e2 (patch)
treeb7b6ce5a79ae251f0ca141325608693bc48179d0
parent7da9f109e8dad5807f3b1d3615c295c349bc7f10 (diff)
downloadpoky-0d43dc75e4ddf9b8966429f41355cb2e8895d0e2.tar.gz
qemu: add wrapper for qemu-mips binary
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] (From OE-Core rev: 53b3103abdf21123b1c7be49b05cfe97a7cd9ed7) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/qemu/qemu_1.2.0.bb15
1 files changed, 14 insertions, 1 deletions
diff --git a/meta/recipes-devtools/qemu/qemu_1.2.0.bb b/meta/recipes-devtools/qemu/qemu_1.2.0.bb
index 191ee48e06..cbdb4d472b 100644
--- a/meta/recipes-devtools/qemu/qemu_1.2.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_1.2.0.bb
@@ -17,7 +17,7 @@ SRC_URI = "\
17SRC_URI[md5sum] = "78eb1e984f4532aa9f2bdd3c127b5b61" 17SRC_URI[md5sum] = "78eb1e984f4532aa9f2bdd3c127b5b61"
18SRC_URI[sha256sum] = "c8b84420d9f4869397f84cad2dabd9a475b7723d619a924a873740353e9df936" 18SRC_URI[sha256sum] = "c8b84420d9f4869397f84cad2dabd9a475b7723d619a924a873740353e9df936"
19 19
20PR = "r2" 20PR = "r3"
21 21
22SRC_URI_append_virtclass-nativesdk = "\ 22SRC_URI_append_virtclass-nativesdk = "\
23 file://relocatable_sdk.patch \ 23 file://relocatable_sdk.patch \
@@ -29,6 +29,19 @@ do_configure_prepend_virtclass-nativesdk() {
29 sed -i 's/-lX11//g' Makefile.target 29 sed -i 's/-lX11//g' Makefile.target
30 fi 30 fi
31} 31}
32
33# The following fragment will create a wrapper for qemu-mips user emulation
34# binary in order to work around a segmentation fault issue. Basically, by
35# default, the reserved virtual address space for 32-on-64 bit is set to 4GB.
36# This will trigger a MMU access fault in the virtual CPU. With this change,
37# the qemu-mips works fine.
38# IMPORTANT: This piece needs to be removed once the root cause is fixed!
39do_install_append() {
40 create_wrapper ${D}/${bindir}/qemu-mips \
41 QEMU_RESERVED_VA=0x0
42}
43# END of qemu-mips workaround
44
32do_configure_prepend_virtclass-native() { 45do_configure_prepend_virtclass-native() {
33 # Undo the -lX11 added by linker-flags.patch, don't assume that host has libX11 installed 46 # Undo the -lX11 added by linker-flags.patch, don't assume that host has libX11 installed
34 sed -i 's/-lX11//g' Makefile.target 47 sed -i 's/-lX11//g' Makefile.target