aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel-yocto.bbclass
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2015-02-20 13:38:03 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-21 22:05:34 +0000
commit726c6c1f5e912e07cbd9519f7364e5e15a2d0594 (patch)
tree3733cd97c52e066f8aeab10286cf1ab9f975c05f /meta/classes/kernel-yocto.bbclass
parent7e6147bdbf95ef8dee01a0f32b3c7d9355a75209 (diff)
downloadopenembedded-core-contrib-726c6c1f5e912e07cbd9519f7364e5e15a2d0594.tar.gz
linux-yocto: warn when a generated BSP description is used
The meta data (in tree or out of tree) that describes a BSP, its patches and configuration is not always available when a new/default or manually configured machine is built. When this happens, the tools generate a skeleton BSP and use a architecture defconfig for the build. If this is by design, the build is typically sane and everything works fine. If an existing BSP description was expected, chances are that the resulting kernel will not be correct. To avoid surprising the user when a default/skeleton BSP is used for the build, we can make it obvious to the user by emitting a warning like the following: WARNING: [kernel]: An auto generated BSP description was used, this normally indicates a misconfiguration. Check that your machine (myqemux86-64) has an associated kernel description. [YOCTO: #3383] (From OE-Core rev: f4a460afc4e2676cbf1daaa1d6723da9e6146526) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel-yocto.bbclass')
-rw-r--r--meta/classes/kernel-yocto.bbclass9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 0cbbb5f2d2..a5e2b180c4 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -281,6 +281,15 @@ python do_kernel_configcheck() {
with open (nonhw_file, "r") as myfile:
results = myfile.read()
bb.warn( "[kernel config]: BSP specified non-hw configuration:\n\n%s" % results)
+
+ bsp_desc = "${S}/" + kmeta + "/" + "top_tgt"
+ if os.path.exists(bsp_desc):
+ with open (bsp_desc, "r") as myfile:
+ bsp_tgt = myfile.read()
+ m = re.match("^(.*)scratch.obj(.*)$", bsp_tgt)
+ if not m is None:
+ bb.warn( "[kernel]: An auto generated BSP description was used, this normally indicates a misconfiguration.\n" +
+ "Check that your machine (%s) has an associated kernel description." % "${MACHINE}" )
}
# Ensure that the branches (BSP and meta) are on the locations specified by