aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel-yocto.bbclass
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2017-08-20 22:58:21 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-23 08:47:05 +0100
commit44aea7b87307795fe4e089c51d45afccaa2f6525 (patch)
tree59c96d20962e4892301337dc8b776264fff55771 /meta/classes/kernel-yocto.bbclass
parentc58df63d88a07d3275e7337f7d284b0a50db82cc (diff)
downloadopenembedded-core-contrib-44aea7b87307795fe4e089c51d45afccaa2f6525.tar.gz
kernel-yocto: ensure that only valid BSPs are built
There was a bug in the search routines responsible for locating BSP definitions which returned a valid match if only the ktype matched. This meant that someone looking for "qemux86foo" (which is an invalid definition) would potentially end up building "qemuarm" and be none the wiser (until it didn't boot). With this fix to the tools search routine, and improved return code testing, we will now stop the build and report and error to the user. [YOCTO: #11878] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.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.bbclass3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 1ca0756c495..3c6df92131b 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -143,6 +143,9 @@ do_kernel_metadata() {
# expand kernel features into their full path equivalents
bsp_definition=$(spp ${includes} --find -DKMACHINE=${KMACHINE} -DKTYPE=${LINUX_KERNEL_TYPE})
+ if [ $? -ne 0 ] || [ -z "${bsp_definition}" ]; then
+ bbfatal_log "Could not locate BSP definiton for ${KMACHINE}/${LINUX_KERNEL_TYPE}."
+ fi
meta_dir=$(kgit --meta)
# run1: pull all the configuration fragments, no matter where they come from