[yocto] [OE-core][yocto-kernel-tools][PATCH] merge_configs.sh: fail loudly if make also fails

Ioan-Adrian Ratiu adrian.ratiu at ni.com
Mon Aug 29 06:09:03 PDT 2016


On Mon, 29 Aug 2016, Bruce Ashfield <bruce.ashfield at gmail.com> wrote:
> On Mon, Aug 29, 2016 at 5:19 AM, Ioan-Adrian Ratiu <adrian.ratiu at ni.com>
> wrote:
>
>> merge_configs.sh calls make on the generated kernel config from
>> the defconfig + fragments to fill in any missing symbols. make
>> can fail and this can lead to nasty errors further on in the
>> build like generating an unbootable kernel image.
>>
>> Check the make return code and fail loudly if non-zero.
>>
>
> We don't want merge config to fail in a scenario like this. It is up to
> whatever
> calls merge_config to add that sort of logic. Which is what I do with the
> kernel
> audit phase of linux-yocto.

Why exactly don't we want to check for errors here? Anyone calling
merge_configs has no way of knowing if this make call failed if we don't
check its return code and pass the error up the call chain.

>
> If you do want to try and make it fail in a scenario like this, the patch
> needs to
> go to the linux kernel mailing list.

I don't understand how sending this patch to lkml helps because
yocto-kernel-tools is a yocto/oe project and is outside the kernel
codebase, no?

>
> Cheers,
>
> Bruce
>
>
>>
>> Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu at ni.com>
>> ---
>>  tools/merge_config.sh | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/merge_config.sh b/tools/merge_config.sh
>> index 67d1314..5212f37 100755
>> --- a/tools/merge_config.sh
>> +++ b/tools/merge_config.sh
>> @@ -152,7 +152,10 @@ fi
>>  # alldefconfig: Fills in any missing symbols with Kconfig default
>>  # allnoconfig: Fills in any missing symbols with # CONFIG_* is not set
>>  make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
>> -
>> +if [ "$?" -ne 0 ]; then
>> +    echo "Make failed to fill missing config symbols. Exit." >&2
>> +    exit 1
>> +fi
>
>
>>  # Check all specified config values took (might have missed-dependency
>> issues)
>>  for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do
>> --
>> 2.9.3
>>
>>
>
>
> -- 
> "Thou shalt not follow the NULL pointer, for chaos and madness await thee
> at its end"



More information about the yocto mailing list