summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-03-02 00:37:23 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-02 17:31:47 +0000
commit11d76595e036f46906859b59dc06094b2e979771 (patch)
tree2590690a111383c98f345bee8e3cce14ece626ac /meta
parent370e082c8bbf14c9b0f54269eb99d291d187cd40 (diff)
downloadopenembedded-core-11d76595e036f46906859b59dc06094b2e979771.tar.gz
openembedded-core-11d76595e036f46906859b59dc06094b2e979771.tar.bz2
openembedded-core-11d76595e036f46906859b59dc06094b2e979771.zip
qemu-0.13.0: Add patch to avoid mmap_min_addr
* This patch is taken from OE commit 40e293342ca76921904a43b03b635d9219432edf Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/fallback-to-safe-mmap_min_addr.patch37
-rw-r--r--meta/recipes-devtools/qemu/qemu_0.13.0.bb6
2 files changed, 41 insertions, 2 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/fallback-to-safe-mmap_min_addr.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/fallback-to-safe-mmap_min_addr.patch
new file mode 100644
index 0000000000..7c782b92a4
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.13.0/fallback-to-safe-mmap_min_addr.patch
@@ -0,0 +1,37 @@
+From c313f89c33217ac0e471554dace2144718f86669 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Thu, 13 May 2010 12:23:40 +0200
+Subject: [PATCH] linux-user: use default mmap_min_addr 65536 when /proc/sys/vm/mmap_min_addr cannot be read
+
+* 65536 is default at least for ubuntu and fedora.
+---
+ linux-user/main.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+Index: qemu-0.13.0/linux-user/main.c
+===================================================================
+--- qemu-0.13.0.orig/linux-user/main.c
++++ qemu-0.13.0/linux-user/main.c
+@@ -36,6 +36,7 @@
+ #include "envlist.h"
+
+ #define DEBUG_LOGFILE "/tmp/qemu.log"
++#define MMAP_MIN_ADDR_DEFAULT 65536
+
+ char *exec_path;
+
+@@ -2973,8 +2974,14 @@ int main(int argc, char **argv, char **e
+ if (fscanf(fp, "%lu", &tmp) == 1) {
+ mmap_min_addr = tmp;
+ qemu_log("host mmap_min_addr=0x%lx\n", mmap_min_addr);
++ } else {
++ qemu_log("cannot read value from /proc/sys/vm/mmap_min_addr, assuming %d\n", MMAP_MIN_ADDR_DEFAULT);
++ mmap_min_addr = MMAP_MIN_ADDR_DEFAULT;
+ }
+ fclose(fp);
++ } else {
++ qemu_log("cannot open /proc/sys/vm/mmap_min_addr for reading, assuming %d\n", MMAP_MIN_ADDR_DEFAULT);
++ mmap_min_addr = MMAP_MIN_ADDR_DEFAULT;
+ }
+ }
+
diff --git a/meta/recipes-devtools/qemu/qemu_0.13.0.bb b/meta/recipes-devtools/qemu/qemu_0.13.0.bb
index 945c570f7c..71b56b7b54 100644
--- a/meta/recipes-devtools/qemu/qemu_0.13.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_0.13.0.bb
@@ -3,7 +3,7 @@ require qemu.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
-PR = "r0"
+PR = "r1"
FILESPATH = "${FILE_DIRNAME}/qemu-${PV}"
FILESDIR = "${WORKDIR}"
@@ -26,7 +26,9 @@ SRC_URI = "\
file://parallel_make.patch \
file://wacom-tablet-fix.patch \
file://port92_fix.patch \
- file://powerpc_rom.bin"
+ file://powerpc_rom.bin \
+ file://fallback-to-safe-mmap_min_addr.patch \
+ "
SRC_URI[md5sum] = "397a0d665da8ba9d3b9583629f3d6421"
SRC_URI[sha256sum] = "1e6f5851b05cea6e377c835f4668408d4124cfb845f9948d922808743c5fd877"