[oe-commits] [openembedded-core] 11/13: kernel-yocto: ensure that only a single defconfig is processed

git at git.openembedded.org git at git.openembedded.org
Sat Dec 9 18:34:20 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 598e6c23d34e604b9962fed4fe449e47306f095e
Author: Bruce Ashfield <bruce.ashfield at windriver.com>
AuthorDate: Mon Dec 4 10:39:25 2017 -0500

    kernel-yocto: ensure that only a single defconfig is processed
    
    As a follow up to the changes to ensure that KBUILD_DEFCONFIG will
    always get its defconfig into the processing, we also should ensure that
    we don't get both a KBUILD_DEFCONFIG and a SRC_URI defconfig in the
    configuration queue. If both are in the configuration queue, we end up
    with competing values and a potentially long running check of 5000+
    options x 2 against the final .config.
    
    By removing the defconfig found from the SRC_URI when one is found
    via KBUILD_DEFCONFIG, we ensure that only one will be processed.
    
    Signed-off-by: Bruce Ashfield <bruce.ashfield at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/kernel-yocto.bbclass | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 2edf0fd..60979a2 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -107,6 +107,8 @@ do_kernel_metadata() {
 				cmp "${WORKDIR}/defconfig" "${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG}"
 				if [ $? -ne 0 ]; then
 					bbwarn "defconfig detected in WORKDIR. ${KBUILD_DEFCONFIG} skipped"
+				else
+					cp -f ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${WORKDIR}/defconfig
 				fi
 			else
 				cp -f ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${WORKDIR}/defconfig
@@ -117,10 +119,19 @@ do_kernel_metadata() {
 		fi
 	fi
 
-	sccs="$sccs ${@" ".join(find_sccs(d))}"
+	sccs_from_src_uri="${@" ".join(find_sccs(d))}"
 	patches="${@" ".join(find_patches(d))}"
 	feat_dirs="${@" ".join(find_kernel_feature_dirs(d))}"
 
+	# a quick check to make sure we don't have duplicate defconfigs
+	# If there's a defconfig in the SRC_URI, did we also have one from
+	# the KBUILD_DEFCONFIG processing above ?
+	if [ -n "$sccs" ]; then
+	    # we did have a defconfig from above. remove any that might be in the src_uri
+	    sccs_from_src_uri=$(echo $sccs_from_src_uri | sed 's/defconfig//g')
+	fi
+	sccs="$sccs $sccs_from_src_uri"
+
 	# check for feature directories/repos/branches that were part of the
 	# SRC_URI. If they were supplied, we convert them into include directives
 	# for the update part of the process

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list