[oe-commits] Bruce Ashfield : linux-yocto: warn when a generated BSP description is used

git at git.openembedded.org git at git.openembedded.org
Sat Feb 21 08:01:22 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: d64a173ad180023190f485acfec36cab28033605
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=d64a173ad180023190f485acfec36cab28033605

Author: Bruce Ashfield <bruce.ashfield at windriver.com>
Date:   Fri Feb 20 13:38:03 2015 -0500

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]

Signed-off-by: Bruce Ashfield <bruce.ashfield at windriver.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>

---

 meta/classes/kernel-yocto.bbclass | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index f05c8cc..c8d1e95 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



More information about the Openembedded-commits mailing list