diff options
-rw-r--r-- | meta/classes/sanity.bbclass | 11 | ||||
-rwxr-xr-x | scripts/poky-qemu-internal | 7 |
2 files changed, 18 insertions, 0 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index ef1020b215..f963f280e0 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
@@ -120,6 +120,17 @@ def check_sanity(e): | |||
120 | if not check_app_exists("qemu-arm", e.data): | 120 | if not check_app_exists("qemu-arm", e.data): |
121 | messages = messages + "qemu-native was in ASSUME_PROVIDED but the QEMU binaries (qemu-arm) can't be found in PATH" | 121 | messages = messages + "qemu-native was in ASSUME_PROVIDED but the QEMU binaries (qemu-arm) can't be found in PATH" |
122 | 122 | ||
123 | if data.getVar('TARGET_ARCH', e.data, True) == "arm": | ||
124 | # This path is no longer user-readable in modern (very recent) Linux | ||
125 | try: | ||
126 | if os.path.exists("/proc/sys/vm/mmap_min_addr"): | ||
127 | f = file("/proc/sys/vm/mmap_min_addr", "r") | ||
128 | if (f.read().strip() != "0"): | ||
129 | 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" | ||
130 | f.close() | ||
131 | except: | ||
132 | pass | ||
133 | |||
123 | for util in required_utilities.split(): | 134 | for util in required_utilities.split(): |
124 | if not check_app_exists( util, e.data ): | 135 | if not check_app_exists( util, e.data ): |
125 | missing = missing + "%s," % util | 136 | missing = missing + "%s," % util |
diff --git a/scripts/poky-qemu-internal b/scripts/poky-qemu-internal index e7b7af3930..cb5d28b904 100755 --- a/scripts/poky-qemu-internal +++ b/scripts/poky-qemu-internal | |||
@@ -150,6 +150,13 @@ if [ ! -f "$ZIMAGE" ]; then | |||
150 | return | 150 | return |
151 | fi | 151 | fi |
152 | 152 | ||
153 | if [ -e /proc/sys/vm/mmap_min_addr ]; then | ||
154 | if [ `cat /proc/sys/vm/mmap_min_addr` != "0" ]; then | ||
155 | echo "Error, please set /proc/sys/vm/mmap_min_addr to 0 since otherwise it can cause problems with QEMU" | ||
156 | return | ||
157 | fi | ||
158 | fi | ||
159 | |||
153 | if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarmv7" ]; then | 160 | if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarmv7" ]; then |
154 | QEMU=qemu-system-arm | 161 | QEMU=qemu-system-arm |
155 | MACHINE_SUBTYPE=versatilepb | 162 | MACHINE_SUBTYPE=versatilepb |