diff options
-rw-r--r-- | meta/classes/kernel-yocto.bbclass | 15 |
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() { 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 |