summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-03-07 22:46:08 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-08 11:04:31 -0800
commit6030fd77aa94f63f4d5babe1ffac1e40e15ee3f1 (patch)
treee79cb80866bf01780a2ed009da23ce282c9fbb56
parentbd32707850886a390a053e4c4b5eb978c02cd155 (diff)
downloadpoky-6030fd77aa94f63f4d5babe1ffac1e40e15ee3f1.tar.gz
sanity.bbclass: Check for /proc/sys/vm/mmap_min_addr to be >= 65536
* Now qemu can handle lower values we can chnage this sanity test to check of values if less than 65536 (From OE-Core rev: 5f172d8b9b829554f3d884a9007a33fff7dcc187) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/sanity.bbclass10
1 files changed, 6 insertions, 4 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 433313b54a..1b272190e7 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -170,10 +170,12 @@ def check_sanity(e):
170 # This path is no longer user-readable in modern (very recent) Linux 170 # This path is no longer user-readable in modern (very recent) Linux
171 try: 171 try:
172 if os.path.exists("/proc/sys/vm/mmap_min_addr"): 172 if os.path.exists("/proc/sys/vm/mmap_min_addr"):
173 f = file("/proc/sys/vm/mmap_min_addr", "r") 173 f = open("/proc/sys/vm/mmap_min_addr", "r")
174 if (f.read().strip() != "0"): 174 try:
175 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" 175 if (int(f.read().strip()) < 65536):
176 f.close() 176 messages = messages + "/proc/sys/vm/mmap_min_addr is not >= 65536. 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 = 65536 in /etc/sysctl.conf.\n"
177 finally:
178 f.close()
177 except: 179 except:
178 pass 180 pass
179 181