diff options
author | Joshua Lock <josh@linux.intel.com> | 2010-04-16 16:41:33 +0100 |
---|---|---|
committer | Joshua Lock <josh@linux.intel.com> | 2010-04-27 16:58:42 +0100 |
commit | d1f413ff30bb854d34e2bf3be2bcbe01170a9814 (patch) | |
tree | 1e84220be4ae89b104bd4fcdd824877e412b6bbf /meta | |
parent | 6763d7506f0afdd1c66a7ab226bccdde205923ee (diff) | |
download | openembedded-core-d1f413ff30bb854d34e2bf3be2bcbe01170a9814.tar.gz openembedded-core-d1f413ff30bb854d34e2bf3be2bcbe01170a9814.tar.bz2 openembedded-core-d1f413ff30bb854d34e2bf3be2bcbe01170a9814.tar.xz openembedded-core-d1f413ff30bb854d34e2bf3be2bcbe01170a9814.zip |
sanity.bbclass: handle lack of permission to read /proc/sys/vm/mmap_min_addr
Patch from OE.dev by Martin Jansa to workaround that we on modern Linux we can
no longer read this file.
We need a better fix but best option will be to update to a newer, relocatable,
QEMU release.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/sanity.bbclass | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index c2f57a383..67a5f52de 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass @@ -95,11 +95,15 @@ def check_sanity(e): 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": - 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() + # 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 ): |