summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel-yocto.bbclass
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2019-12-29 22:07:21 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-30 23:39:09 +0000
commiteac8f2f9ca26bf8cdb7f554803fd73c73b0b576e (patch)
tree12e8b58c487b637c1eb0b12320192186a4b9f8ee /meta/classes/kernel-yocto.bbclass
parent482f1ae9b427578896babaf415f05694bf8c85ee (diff)
downloadpoky-eac8f2f9ca26bf8cdb7f554803fd73c73b0b576e.tar.gz
kernel-yocto: allow external (aka non-integrated) BSPs to supply patches
By default, only explicitly specified .scc files or patches are applied to a BSP as part of the patching phase. This allows the reference BSPs to be integrated into a kernel tree, and use the same meta data for tree generation and for runtime building. It also greatly simplies the processing of kernel meta data. That being said, if an external (and fully standalone) kmeta repository is used, it very well may contain both patches and configuration. To allow the BSP definition to supply patches and config, we introduce a new kernel meta data definition: define KMETA_EXTERNAL_BSP t This can be set in any .scc file that wants to specify both patches and configuration. If specifying this per-BSP is not desired, a secondary variable is used: KMETA_EXTERNAL_BSPS When that is set in a bbappend, any located BSP definitions will be used for both patches and configuration. (From OE-Core rev: 747ad3ca1e987668c8ed444cfc595d751bc0d0b2) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.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.bbclass15
1 files changed, 15 insertions, 0 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index ed9bcfa57c..87c681f1c3 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -182,6 +182,14 @@ do_kernel_metadata() {
182 if [ $? -ne 0 ]; then 182 if [ $? -ne 0 ]; then
183 bbfatal_log "Could not locate BSP definition for ${KMACHINE}/${LINUX_KERNEL_TYPE} and no defconfig was provided" 183 bbfatal_log "Could not locate BSP definition for ${KMACHINE}/${LINUX_KERNEL_TYPE} and no defconfig was provided"
184 fi 184 fi
185
186 # if the bsp definition has "define KMETA_EXTERNAL_BSP t",
187 # then we need to set a flag that will instruct the next
188 # steps to use the BSP as both configuration and patches.
189 grep -q KMETA_EXTERNAL_BSP $bsp_definition
190 if [ $? -eq 0 ]; then
191 KMETA_EXTERNAL_BSPS="t"
192 fi
185 fi 193 fi
186 meta_dir=$(kgit --meta) 194 meta_dir=$(kgit --meta)
187 195
@@ -195,6 +203,13 @@ do_kernel_metadata() {
195 fi 203 fi
196 fi 204 fi
197 205
206 # if KMETA_EXTERNAL_BSPS has been set, or it has been detected from
207 # the bsp definition, then we inject the bsp_definition into the
208 # patch phase below. we'll piggy back on the sccs variable.
209 if [ -n "${KMETA_EXTERNAL_BSPS}" ]; then
210 sccs="${bsp_definition} ${sccs}"
211 fi
212
198 # run2: only generate patches for elements that have been passed on the SRC_URI 213 # run2: only generate patches for elements that have been passed on the SRC_URI
199 elements="`echo -n ${sccs} ${patches} ${KERNEL_FEATURES}`" 214 elements="`echo -n ${sccs} ${patches} ${KERNEL_FEATURES}`"
200 if [ -n "${elements}" ]; then 215 if [ -n "${elements}" ]; then