summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel-yocto.bbclass
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2017-12-04 10:39:25 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-10 22:45:21 +0000
commit2a7a02c513a55284ef5af0580f5393225d60ba85 (patch)
tree273f1684f5a38ad1f19e36833024e745ac607aff /meta/classes/kernel-yocto.bbclass
parentf727f04248868c7e3ae45f261401f10662680a1d (diff)
downloadpoky-2a7a02c513a55284ef5af0580f5393225d60ba85.tar.gz
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. (From OE-Core rev: 7e98c295c1bb511ece51b5f8c97f26c173ddaf76) 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.bbclass13
1 files changed, 12 insertions, 1 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 2edf0fd157..60979a218f 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -107,6 +107,8 @@ do_kernel_metadata() {
107 cmp "${WORKDIR}/defconfig" "${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG}" 107 cmp "${WORKDIR}/defconfig" "${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG}"
108 if [ $? -ne 0 ]; then 108 if [ $? -ne 0 ]; then
109 bbwarn "defconfig detected in WORKDIR. ${KBUILD_DEFCONFIG} skipped" 109 bbwarn "defconfig detected in WORKDIR. ${KBUILD_DEFCONFIG} skipped"
110 else
111 cp -f ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${WORKDIR}/defconfig
110 fi 112 fi
111 else 113 else
112 cp -f ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${WORKDIR}/defconfig 114 cp -f ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${WORKDIR}/defconfig
@@ -117,10 +119,19 @@ do_kernel_metadata() {
117 fi 119 fi
118 fi 120 fi
119 121
120 sccs="$sccs ${@" ".join(find_sccs(d))}" 122 sccs_from_src_uri="${@" ".join(find_sccs(d))}"
121 patches="${@" ".join(find_patches(d))}" 123 patches="${@" ".join(find_patches(d))}"
122 feat_dirs="${@" ".join(find_kernel_feature_dirs(d))}" 124 feat_dirs="${@" ".join(find_kernel_feature_dirs(d))}"
123 125
126 # a quick check to make sure we don't have duplicate defconfigs
127 # If there's a defconfig in the SRC_URI, did we also have one from
128 # the KBUILD_DEFCONFIG processing above ?
129 if [ -n "$sccs" ]; then
130 # we did have a defconfig from above. remove any that might be in the src_uri
131 sccs_from_src_uri=$(echo $sccs_from_src_uri | sed 's/defconfig//g')
132 fi
133 sccs="$sccs $sccs_from_src_uri"
134
124 # check for feature directories/repos/branches that were part of the 135 # check for feature directories/repos/branches that were part of the
125 # SRC_URI. If they were supplied, we convert them into include directives 136 # SRC_URI. If they were supplied, we convert them into include directives
126 # for the update part of the process 137 # for the update part of the process