]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
Revert "Drop vm_mmap_min_addr checks from scripts and sanity class"
authorJoshua Lock <josh@linux.intel.com>
Wed, 29 Sep 2010 11:18:34 +0000 (12:18 +0100)
committerJoshua Lock <josh@linux.intel.com>
Wed, 29 Sep 2010 16:10:41 +0000 (17:10 +0100)
This reverts commit 138df217efe850528f88d340acf864c38780c2b0.

We still need the vm_mmap_min_addr set to 0 to run locale generation for
qemu-arm

Signed-off-by: Joshua Lock <josh@linux.intel.com>
meta/classes/sanity.bbclass
scripts/poky-qemu-internal

index ef1020b215f34c7e27d98ea40f67d149bc5277df..f963f280e0449afb181e1fc67bacaf9e6fa6f6d4 100644 (file)
@@ -120,6 +120,17 @@ def check_sanity(e):
                if not check_app_exists("qemu-arm", e.data):
                        messages = messages + "qemu-native was in ASSUME_PROVIDED but the QEMU binaries (qemu-arm) can't be found in PATH"
 
+       if data.getVar('TARGET_ARCH', e.data, True) == "arm":
+                # This path is no longer user-readable in modern (very recent) Linux
+                try:
+                        if os.path.exists("/proc/sys/vm/mmap_min_addr"):
+                                f = file("/proc/sys/vm/mmap_min_addr", "r")
+                                if (f.read().strip() != "0"):
+                                        messages = messages + "/proc/sys/vm/mmap_min_addr is not 0. This will cause problems with qemu so please fix the value (as root).\n\nTo fix this in later reboots, set vm.mmap_min_addr = 0 in /etc/sysctl.conf.\n"
+                                f.close()
+                except:
+                        pass
+
        for util in required_utilities.split():
                if not check_app_exists( util, e.data ):
                        missing = missing + "%s," % util
index e7b7af3930768e23481e28bd99e15d8b7e639cde..cb5d28b90447c261b8cbbae6d2531ac324e25696 100755 (executable)
@@ -150,6 +150,13 @@ if [ ! -f "$ZIMAGE" ]; then
     return
 fi
 
+if [ -e /proc/sys/vm/mmap_min_addr ]; then
+    if [ `cat /proc/sys/vm/mmap_min_addr` != "0" ]; then
+        echo "Error, please set /proc/sys/vm/mmap_min_addr to 0 since otherwise it can cause problems with QEMU"
+       return
+    fi
+fi
+
 if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarmv7" ]; then
     QEMU=qemu-system-arm
     MACHINE_SUBTYPE=versatilepb