diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2017-12-04 10:39:25 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-01-06 10:13:56 +0000 |
commit | 5ea6b59d8e5d5605c5b30897b7b378c5eefeff8d (patch) | |
tree | 803276d56f88cff0186b9cd2ea9d4a84591d6431 | |
parent | ec834113ecb8214f698ace7b913f9f7b844d2b74 (diff) | |
download | poky-5ea6b59d8e5d5605c5b30897b7b378c5eefeff8d.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: d831b1cbff2901f10f79bb43c839839f73c428a3)
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 7e98c295c1bb511ece51b5f8c97f26c173ddaf76)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/kernel-yocto.bbclass | 13 |
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 |