summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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}-"