[oe-commits] [openembedded-core] 04/06: kernel-yocto: allow external (aka non-integrated) BSPs to supply patches

git at git.openembedded.org git at git.openembedded.org
Mon Dec 30 08:51:33 UTC 2019


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 42a635dd512cf55702ce9d04e338e65c8ec446db
Author: Bruce Ashfield <bruce.ashfield at gmail.com>
AuthorDate: Sun Dec 29 22:07:21 2019 -0500

    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.
    
    Signed-off-by: Bruce Ashfield <bruce.ashfield at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/kernel-yocto.bbclass | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index ed9bcfa..87c681f 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -182,6 +182,14 @@ do_kernel_metadata() {
 		if [ $? -ne 0 ]; then
 			bbfatal_log "Could not locate BSP definition for ${KMACHINE}/${LINUX_KERNEL_TYPE} and no defconfig was provided"
 		fi
+
+		# if the bsp definition has "define KMETA_EXTERNAL_BSP t",
+		# then we need to set a flag that will instruct the next
+		# steps to use the BSP as both configuration and patches.
+		grep -q KMETA_EXTERNAL_BSP $bsp_definition
+		if [ $? -eq 0 ]; then
+		    KMETA_EXTERNAL_BSPS="t"
+		fi
 	fi
 	meta_dir=$(kgit --meta)
 
@@ -195,6 +203,13 @@ do_kernel_metadata() {
 		fi
 	fi
 
+	# if KMETA_EXTERNAL_BSPS has been set, or it has been detected from
+	# the bsp definition, then we inject the bsp_definition into the
+	# patch phase below.  we'll piggy back on the sccs variable.
+	if [ -n "${KMETA_EXTERNAL_BSPS}" ]; then
+		sccs="${bsp_definition} ${sccs}"
+	fi
+
 	# run2: only generate patches for elements that have been passed on the SRC_URI
 	elements="`echo -n ${sccs} ${patches} ${KERNEL_FEATURES}`"
 	if [ -n "${elements}" ]; then

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


More information about the Openembedded-commits mailing list