From 17c810af40dfbf084ef87c9b2a92874af43a6fe7 Mon Sep 17 00:00:00 2001 From: Phil Blundell Date: Tue, 9 Feb 2010 11:33:09 +0000 Subject: sanity: correct misleading message about location of TMPDIR There is no point in telling users to move TMPDIR "back" to its current location :-} --- classes/sanity.bbclass | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'classes/sanity.bbclass') diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index f57d8e47d0..b66c9a9877 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -135,8 +135,9 @@ def check_sanity(e): checkfile = os.path.join(tmpdir, "saved_tmpdir") if os.path.exists(checkfile): f = file(checkfile, "r") - if (f.read().strip() != tmpdir): - messages = messages + "Error, TMPDIR has changed location. You need to either move it back to %s or rebuild\n" % tmpdir + oldpath = f.read().strip() + if (oldpath != tmpdir): + messages = messages + "Error, TMPDIR has changed location. You need to either move it back to %s or rebuild\n" % oldpath else: import bb bb.mkdirhier(tmpdir) -- cgit v1.2.3 From 31e93854259130e20a4e08c9d803c34edc4b447e Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 1 Mar 2010 11:18:28 +0000 Subject: qemu: Perform our sanity checks based on ENABLE_BINARY_LOCALE_GENERATION Perform qemu-related checks not based on if we're ARM but based on if we'll be using qemu for binary locale generation. Clarify what the first of these sanity checks does. Next, change the check for a provided qemu binary to be generic enough to work on all arches (and catch distribution or user built versions of qemu). While we're in here, correct the gcc version check code in base.bbclass. Signed-off-by: Tom Rini Acked-by: Denys Dmytriyenko Acked-by: Chris Larson --- classes/sanity.bbclass | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'classes/sanity.bbclass') diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index b66c9a9877..a78e8edf8a 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -83,8 +83,10 @@ def check_sanity(e): required_utilities = "patch help2man diffstat texi2html makeinfo cvs svn bzip2 tar gzip gawk md5sum" - if data.getVar('TARGET_ARCH', e.data, True) == "arm": - # qemu-native needs gcc 3.x + # If we'll be running qemu, perform some sanity checks + if data.getVar('ENABLE_BINARY_LOCALE_GENERATION', e.data, True): + # Some versions of qemu-native needs gcc 3.x. Do a special + # check here to allow for host 'gcc' is 3.x. if "qemu-native" not in assume_provided and "gcc3-native" in assume_provided: gcc_version = commands.getoutput("${BUILD_PREFIX}gcc --version | head -n 1 | cut -f 3 -d ' '") @@ -93,8 +95,7 @@ def check_sanity(e): missing = missing + "gcc-3.x (needed for qemu-native)," if "qemu-native" in assume_provided: - 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" + required_utilities += "qemu" try: if os.path.exists("/proc/sys/vm/mmap_min_addr"): -- cgit v1.2.3 From 27de16184dccb7b3a49bd08c9282fe4843d00251 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 3 Mar 2010 14:04:57 -0700 Subject: qemu: Move gcc version check, qemu-TARGET logic into qemu.bbclass Move the logic to determine what qemu-TARGET to run into qemu.bbclass so we can check for the right binary in sanity.bbclass. This code was duplicated by glibc-package and eglibc-package anyhow and with the new fn we can clean up the usage in these classes a bit. Now that we have a class for qemu stuff, and the gcc check is just for qemu, move it there. --- classes/sanity.bbclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'classes/sanity.bbclass') diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index a78e8edf8a..5f0e724456 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -2,6 +2,8 @@ # Sanity check the users setup for common misconfigurations # +inherit qemu + def raise_sanity_error(msg): import bb bb.fatal(""" Openembedded's config sanity checker detected a potential misconfiguration. @@ -95,7 +97,7 @@ def check_sanity(e): missing = missing + "gcc-3.x (needed for qemu-native)," if "qemu-native" in assume_provided: - required_utilities += "qemu" + required_utilities += " %s" % (qemu_target_binary(e.data)) try: if os.path.exists("/proc/sys/vm/mmap_min_addr"): -- cgit v1.2.3 From 44ecf674747fef9f71f928660b394ca470a135fc Mon Sep 17 00:00:00 2001 From: Roman I Khimov Date: Mon, 8 Mar 2010 17:00:58 +0300 Subject: sanity: remove /proc/sys/vm/mmap_min_addr check Binary locale generation fails on openSUSE 11.2 and probably would fail on some other hosts with 2.6.31+ kernels since mmap-ing page zero may be forbidden for security reasons even with /proc/sys/vm/mmap_min_addr set to 0 (this also affects Ubuntu 9.10, although it's been fixed there: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/423513 ). This is not a problem for recently introduced qemu 0.12.3 since it can relocate binaries now, which is tested on openSUSE 2.6.31 kernel with mmap_min_addr=65536 and Debian lenny 2.6.26 with mmap_min_addr set to 0, 4096, 65536. Given that, this check is just useless. Unfortunately, it also means that for reliable builds we have to remove qemu 0.10 which can't work with some kernels. Patch will follow to do that. Signed-off-by: Roman I Khimov Acked-by: Tom Rini Acked-by: Koen Kooi Acked-by: Marcin Juszkiewicz --- classes/sanity.bbclass | 9 --------- 1 file changed, 9 deletions(-) (limited to 'classes/sanity.bbclass') diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index 5f0e724456..19310cbd9c 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -99,15 +99,6 @@ def check_sanity(e): if "qemu-native" in assume_provided: required_utilities += " %s" % (qemu_target_binary(e.data)) - 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 -- cgit v1.2.3 From 677630b31b8ce4bd8cb723a4c66414739c9d4331 Mon Sep 17 00:00:00 2001 From: Roman I Khimov Date: Mon, 8 Mar 2010 18:27:13 +0300 Subject: qemu: remove 0.9.x QEMU 0.9.x is obsolete this days and with all modifications made for QEMU 0.10.x in OE, versions 0.9.x are unusable anyway. 0.10.3 was introduced 10 month ago, so a good transition time was also given. Now it's time to just kill it. Also remove cvs and svn versions since those are 0.9.x leftovers and QEMU moved to git long ago. Also remove gcc3 checks since that are not relevant for QEMU 0.10+. Also remove from icecc blacklist, since QEMU builds fine with it and the reason for blacklisting was GCC 3. Signed-off-by: Roman I Khimov Acked-by: Tom Rini Acked-by: Koen Kooi Acked-by: Marcin Juszkiewicz --- classes/sanity.bbclass | 9 --------- 1 file changed, 9 deletions(-) (limited to 'classes/sanity.bbclass') diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index 19310cbd9c..e8b6587500 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -87,15 +87,6 @@ def check_sanity(e): # If we'll be running qemu, perform some sanity checks if data.getVar('ENABLE_BINARY_LOCALE_GENERATION', e.data, True): - # Some versions of qemu-native needs gcc 3.x. Do a special - # check here to allow for host 'gcc' is 3.x. - if "qemu-native" not in assume_provided and "gcc3-native" in assume_provided: - gcc_version = commands.getoutput("${BUILD_PREFIX}gcc --version | head -n 1 | cut -f 3 -d ' '") - - if not check_gcc3(e.data) and gcc_version[0] != '3': - messages = messages + "gcc3-native was in ASSUME_PROVIDED but the gcc-3.x binary can't be found in PATH" - missing = missing + "gcc-3.x (needed for qemu-native)," - if "qemu-native" in assume_provided: required_utilities += " %s" % (qemu_target_binary(e.data)) -- cgit v1.2.3