mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
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>
This commit is contained in:
@@ -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"
|
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 data.getVar('TARGET_ARCH', e.data, True) == "arm":
|
||||||
if os.path.exists("/proc/sys/vm/mmap_min_addr"):
|
# This path is no longer user-readable in modern (very recent) Linux
|
||||||
f = file("/proc/sys/vm/mmap_min_addr", "r")
|
try:
|
||||||
if (f.read().strip() != "0"):
|
if os.path.exists("/proc/sys/vm/mmap_min_addr"):
|
||||||
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 = file("/proc/sys/vm/mmap_min_addr", "r")
|
||||||
f.close()
|
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():
|
for util in required_utilities.split():
|
||||||
if not check_app_exists( util, e.data ):
|
if not check_app_exists( util, e.data ):
|
||||||
|
|||||||
Reference in New Issue
Block a user