[OE-core] [PATCH 2/2] kernel: check for empty .config file after merge_config.sh

Bruce Ashfield bruce.ashfield at gmail.com
Mon Apr 29 14:15:34 UTC 2019


On Mon, Apr 29, 2019 at 10:01 AM Flavio Suligoi <f.suligoi at asem.it> wrote:

> Sometimes, for example in case of missed dependecies, after the
> execution of:
>
> merge_config.sh
>
> the resulting file ".config" can be empty.
> This is the reason why is necessary test it and, in case, display
> the "Could not configure ..." error message.
>

This doesn't belong here. Auditing of the final .config is done in a
separate task, and we could pickup that issue there.

That being said, there are already checks for inputs that could result in
something like this. How were you triggering this issue ? I'd like to
reproduce it here, and perhaps come up with a different solution.

Bruce



>
> Signed-off-by: Flavio Suligoi <f.suligoi at asem.it>
> ---
>  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 243f8d6..895966b 100644
> --- a/meta/classes/kernel-yocto.bbclass
> +++ b/meta/classes/kernel-yocto.bbclass
> @@ -331,7 +331,7 @@ do_kernel_configme() {
>         fi
>
>         CFLAGS="${CFLAGS} ${TOOLCHAIN_OPTIONS}" HOSTCC="${BUILD_CC}
> ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}" CC="${KERNEL_CC}"
> ARCH=${ARCH} merge_config.sh -O ${B} ${config_flags} ${configs} >
> ${meta_dir}/cfg/merge_config_build.log 2>
> ${meta_dir}/cfg/merge_config_build-errors.log
> -       if [ $? -ne 0 ]; then
> +       if [ $? -ne 0 ] || [ ! -s ${B}/.config ]; then
>                 bbfatal_log "Could not configure
> ${KMACHINE}-${LINUX_KERNEL_TYPE}"
>         fi
>
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end
- "Use the force Harry" - Gandalf, Star Trek II
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20190429/da5dbe42/attachment.html>


More information about the Openembedded-core mailing list