[U-Boot] [PATCH 5/5] autoboot: add CONFIG_AUTOBOOT to allow to not compile autoboot.c

Soeren Moch
2016-06-10T22:38:25Z

On 11.06.2016 00:19, Tom Rini wrote:
> On Fri, Jun 10, 2016 at 11:55:40PM +0200, Soeren Moch wrote:
>>
>>
>> On 10.06.2016 17:20, Masahiro Yamada wrote:
>>> Another mistake of commit bb597c0eeb7e ("common: bootdelay:
>>> move CONFIG_BOOTDELAY into a Kconfig option") is that
>>> CONFIG_BOOTDELAY is now defined for all the boards.
>>>
>>> Before that commit, it is allowed to unset CONFIG_BOOTDELAY to
>>> not compile common/autoboot.c
>>>
>>> This is apparent from the code in common/Makefile:
>>>
>>> # This option is not just y/n - it can have a numeric value
>>> ifdef CONFIG_BOOTDELAY obj-y += autoboot.o endif
>>>
>>> (and from the #ifdef in the include/autoconf.h, too.) It was a
>>> bit odd to enable/disable code with an integer type option, but
>>> anyway it was how this option worked before that commit.
>>> Actually several boards unset it to opt out of the autoboot
>>> feature.
>>>
>>> This commit adds a bool option, CONFIG_AUTOBOOT, and have the
>>> CONFIG_BOOTDELAY to depend on it.
>>>
>>> I chose "default y" for this option because most of boards
>>> enable the autoboot. I added "# CONFIG_AUTOBOOT is not set"
>>> for the boards that did not set CONFIG_BOOTDELAY prior to the
>>> bad commit.
>>>
>>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>>> ---
>>
>> [...]
>>
>>> diff --git a/configs/tbs2910_defconfig
>>> b/configs/tbs2910_defconfig index dc69b39..5d0de21 100644 ---
>>> a/configs/tbs2910_defconfig +++ b/configs/tbs2910_defconfig @@
>>> -4,6 +4,7 @@ CONFIG_TARGET_TBS2910=y CONFIG_FIT=y
>>> CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="Matrix U-Boot> " +#
>>> CONFIG_AUTOBOOT is not set CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS
>>> is not set CONFIG_CMD_MEMTEST=y
>>
>> "+# CONFIG_AUTOBOOT is not set" seems to be wrong for tbs2910.
>> Before this move to Kconfig we had "#define CONFIG_BOOTDELAY
>> 3" via include/configs/mx6_common.h for tbs2910 and for a lot of
>> other imx6 boards.
>>
>> So the right fix would be to readd 3 seconds bootdelay here.
>
> Please check the v2 I posted that updated defconfigs/ again.
>

Do you refer to "[U-Boot,v2] configs: Fixup afet BOOTDELAY migration"?
I also don't see any bootdelay setting for tbs2910 there.

Do I miss some default setting or some other patch in this
CONFIG_BOOTDELAY series?

Regards,
Soeren