]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel-yocto: ensure that only valid BSPs are built
authorBruce Ashfield <bruce.ashfield@windriver.com>
Mon, 21 Aug 2017 02:58:21 +0000 (22:58 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 23 Aug 2017 07:47:05 +0000 (08:47 +0100)
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>
meta/classes/kernel-yocto.bbclass
meta/recipes-kernel/kern-tools/kern-tools-native_git.bb

index 1ca0756c495958f3764854f8aef369b180cde4dc..3c6df92131bc3b82f63420f7b1e107f98d629530 100644 (file)
@@ -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
index 2217a31076a2c5481737a7d148390306a91aff58..4a78b897d34f0b0666e6c01ecae5b31ce364d9f9 100644 (file)
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://git/tools/kgit;beginline=5;endline=9;md5=a6c2fa8aef1b
 
 DEPENDS = "git-native"
 
-SRCREV = "9cd2b626d652bec10c6bc75275b35bfee74d447c"
+SRCREV = "0571411cc033c11df7827508dd786876ce2f8c83"
 PR = "r12"
 PV = "0.2+git${SRCPV}"