[OE-core] [PATCH 1/2] kernel-yocto: ensure sccs variable is set when using KBUILD_DEFCONFIG

Bruce Ashfield bruce.ashfield at windriver.com
Wed Nov 29 14:23:22 UTC 2017


On 11/28/2017 10:28 PM, Saul Wold wrote:
> When using KBUILD_DEFCONFIG, $sccs should be set to the $WORKDIR/defconfig
> regardless if it compares or is copied. Otherwise $sccs is not set and the
> defconfig is not found correctly.

Actually, looking at this more today, and this morning in my testing.
This shouldn't be necessary .. it doesn't hurt anything (well, actually
it could end up with two defconfigs in the variable, but that also
should be ok).

> 
> Part of
> [YOCTO #12162]
> 
> Signed-off-by: Saul Wold <sgw at linux.intel.com>
> ---
>   meta/classes/kernel-yocto.bbclass | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
> index 1d447951c49..98ec78fb768 100644
> --- a/meta/classes/kernel-yocto.bbclass
> +++ b/meta/classes/kernel-yocto.bbclass
> @@ -110,8 +110,8 @@ do_kernel_metadata() {
>   				fi
>   			else
>   				cp -f ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${WORKDIR}/defconfig
> -				sccs="${WORKDIR}/defconfig"
>   			fi
> +			sccs="${WORKDIR}/defconfig"

The test that was protecting this assignment is:

    if [ -f "${WORKDIR}/defconfig" ]; then

and then:

   cmp "${WORKDIR}/defconfig" 
"${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG}"

The only way that a defconfig can be in ${WORKDIR}/defconfig by
the time this runs, is if the fetcher puts it there. Which means
it is on the SRC_URI and comes from the recipe writer's layer.

There is existing code that already picks this up and adds it
to the configuration queue:

         sccs="$sccs ${@" ".join(find_sccs(d))}"

So that defconfig, is already going to be picked up directly
from the SRC_URI.

Bruce


>   		else
>   			bbfatal "A KBUILD_DEFCONFIG '${KBUILD_DEFCONFIG}' was specified, but not present in the source tree"
>   		fi
> 




More information about the Openembedded-core mailing list