diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-06-20 17:33:39 +0900 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-06-20 05:19:09 -0400 |
commit | 41598c82513672b1052c88ce816d98467345141f (patch) | |
tree | d5becad1d40063d826dcd52e4a908363e9e43231 /common | |
parent | 2313d48445e59f063ec9a3b4940fe8252737db76 (diff) | |
download | u-boot-imx-41598c82513672b1052c88ce816d98467345141f.zip u-boot-imx-41598c82513672b1052c88ce816d98467345141f.tar.gz u-boot-imx-41598c82513672b1052c88ce816d98467345141f.tar.bz2 |
autoboot: add CONFIG_AUTOBOOT to allow to not compile autoboot.c
Since commit bb597c0eeb7e ("common: bootdelay: move CONFIG_BOOTDELAY
into a Kconfig option"), CONFIG_BOOTDELAY is defined for all boards.
Prior to that commit, it was allowed to unset CONFIG_BOOTDELAY to
not compile common/autoboot.c, as described in common/Makefile:
# This option is not just y/n - it can have a numeric value
ifdef CONFIG_BOOTDELAY
obj-y += autoboot.o
endif
It was a bit odd to enable/disable code with an integer type option,
but it was how this option worked before that commit, and several
boards actually unset it to opt out of the autoboot feature.
This commit adds a new bool option, CONFIG_AUTOBOOT, and makes
CONFIG_BOOTDELAY depend on it.
I chose "default y" for this option because most boards use the
autoboot. I added "# CONFIG_AUTOBOOT is not set" for the boards that
had not set CONFIG_BOOTDELAY prior to the bad commit.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/Kconfig | 1 | ||||
-rw-r--r-- | common/Makefile | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/common/Kconfig b/common/Kconfig index e691145..ada4ddb 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -100,6 +100,7 @@ endmenu config BOOTDELAY int "delay in seconds before automatically booting" default 2 + depends on AUTOBOOT help Delay before automatically running bootcmd; set to -1 to disable autoboot. diff --git a/common/Makefile b/common/Makefile index 97c59fe..34cb898 100644 --- a/common/Makefile +++ b/common/Makefile @@ -15,10 +15,7 @@ ifdef CONFIG_SYS_HUSH_PARSER obj-y += cli_hush.o endif -# This option is not just y/n - it can have a numeric value -ifdef CONFIG_BOOTDELAY -obj-y += autoboot.o -endif +obj-$(CONFIG_AUTOBOOT) += autoboot.o # This option is not just y/n - it can have a numeric value ifdef CONFIG_BOOT_RETRY_TIME |