aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2005-02-09 23:41:53 +0000
committerChris Larson <clarson@kergoth.com>2005-02-09 23:41:53 +0000
commitc25445d4276ddbc7c1dee0b64de0b04bd402cf26 (patch)
tree42a4347f9b763df6a3c128ef11472988a39c3874
parent27250f9299203db029bf9e6ccd3ca7bb37868b5f (diff)
downloadopenembedded-c25445d4276ddbc7c1dee0b64de0b04bd402cf26.tar.gz
Merge oe-devel@oe-devel.bkbits.net:openembedded
into odin.sc.ti.com:/home/kergoth/code/user/oe/openembedded 2005/02/09 17:41:25-06:00 ti.com!kergoth - At the beginning of a build, display an 'OE Build Configuration', showing some important variables and their values, to make it easy to spot an incorrect setup. - Change the default TARGET_ARCH and TARGET_OS to no longer be the BUILD versions. It used to make sense, given the primary configuration file resided in the core. Now that its in our metadata, we can change that, and also make the build abort with an obvious error if either are not set. BKrev: 420a9fc1QNq7YE9IOvWAuHnCbfBZuw
-rw-r--r--classes/base.bbclass18
-rw-r--r--conf/bitbake.conf4
2 files changed, 20 insertions, 2 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index a2ed7a76be..e6f8e43fd6 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -491,6 +491,23 @@ python base_eventhandler() {
elif name == "UnsatisfiedDep":
msg += "package %s: dependency %s %s" % (e.pkg, e.dep, name[:-3].lower())
note(msg)
+
+ if name.startswith("BuildStarted"):
+ statusvars = ['TARGET_ARCH', 'TARGET_OS', 'MACHINE', 'DISTRO',
+ 'TARGET_FPU']
+ statuslines = ["%-13s = \"%s\"" % (i, bb.data.getVar(i, e.data, 1) or '') for i in statusvars]
+ statusmsg = "\nOE Build Configuration:\n%s\n" % '\n'.join(statuslines)
+ print statusmsg
+
+ needed_vars = [ "TARGET_ARCH", "TARGET_OS" ]
+ pesteruser = []
+ for v in needed_vars:
+ val = bb.data.getVar(v, e.data, 1)
+ if not val or val == 'INVALID':
+ pesteruser.append(v)
+ if pesteruser:
+ bb.fatal('The following variable(s) were not set: %s\nPlease set them directly, or choose a MACHINE or DISTRO that sets them.' % ', '.join(pesteruser))
+
if not data in e.__dict__:
return NotHandled
@@ -499,6 +516,7 @@ python base_eventhandler() {
logfile = file(log, "a")
logfile.write("%s\n" % msg)
logfile.close()
+
return NotHandled
}
diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index 8bd4719032..7c91245379 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -37,8 +37,8 @@ HOST_SYS = "${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}"
HOST_PREFIX = "${TARGET_PREFIX}"
HOST_CC_ARCH = "${TARGET_CC_ARCH}"
-TARGET_ARCH = "${BUILD_ARCH}"
-TARGET_OS = "${BUILD_OS}"
+TARGET_ARCH = "INVALID"
+TARGET_OS = "INVALID"
TARGET_VENDOR = "${BUILD_VENDOR}"
TARGET_SYS = "${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
TARGET_PREFIX = "${TARGET_SYS}-"