Commit 41598c82513672b1052c88ce816d98467345141f

Authored by Masahiro Yamada
Committed by Tom Rini
1 parent 2313d48445

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>

Showing 32 changed files with 37 additions and 5 deletions Side-by-side Diff

... ... @@ -38,6 +38,12 @@
38 38  
39 39 menu "Autoboot options"
40 40  
  41 +config AUTOBOOT
  42 + bool "Autoboot"
  43 + default y
  44 + help
  45 + This enables the autoboot. See doc/README.autoboot for detail.
  46 +
41 47 config AUTOBOOT_KEYED
42 48 bool "Stop autobooting via specific input key / string"
43 49 default n
... ... @@ -100,6 +100,7 @@
100 100 config BOOTDELAY
101 101 int "delay in seconds before automatically booting"
102 102 default 2
  103 + depends on AUTOBOOT
103 104 help
104 105 Delay before automatically running bootcmd;
105 106 set to -1 to disable autoboot.
... ... @@ -15,10 +15,7 @@
15 15 obj-y += cli_hush.o
16 16 endif
17 17  
18   -# This option is not just y/n - it can have a numeric value
19   -ifdef CONFIG_BOOTDELAY
20   -obj-y += autoboot.o
21   -endif
  18 +obj-$(CONFIG_AUTOBOOT) += autoboot.o
22 19  
23 20 # This option is not just y/n - it can have a numeric value
24 21 ifdef CONFIG_BOOT_RETRY_TIME
configs/10m50_defconfig
... ... @@ -6,6 +6,7 @@
6 6 CONFIG_FIT=y
7 7 CONFIG_OF_BOARD_SETUP=y
8 8 CONFIG_HUSH_PARSER=y
  9 +# CONFIG_AUTOBOOT is not set
9 10 CONFIG_CMD_CPU=y
10 11 # CONFIG_CMD_BOOTD is not set
11 12 # CONFIG_CMD_IMLS is not set
configs/3c120_defconfig
... ... @@ -6,6 +6,7 @@
6 6 CONFIG_FIT=y
7 7 CONFIG_OF_BOARD_SETUP=y
8 8 CONFIG_HUSH_PARSER=y
  9 +# CONFIG_AUTOBOOT is not set
9 10 CONFIG_CMD_CPU=y
10 11 # CONFIG_CMD_BOOTD is not set
11 12 # CONFIG_CMD_IMLS is not set
configs/M5249EVB_defconfig
1 1 CONFIG_M68K=y
2 2 CONFIG_TARGET_M5249EVB=y
3 3 CONFIG_SYS_TEXT_BASE=0xffe00000
  4 +# CONFIG_AUTOBOOT is not set
4 5 CONFIG_LOOPW=y
5 6 # CONFIG_CMD_SETEXPR is not set
6 7 # CONFIG_CMD_NET is not set
configs/am335x_sl50_defconfig
... ... @@ -6,6 +6,7 @@
6 6 CONFIG_FIT=y
7 7 CONFIG_SYS_EXTRA_OPTIONS="EMMC_BOOT"
8 8 CONFIG_HUSH_PARSER=y
  9 +# CONFIG_AUTOBOOT is not set
9 10 CONFIG_CMD_BOOTZ=y
10 11 # CONFIG_CMD_IMLS is not set
11 12 CONFIG_CMD_ASKENV=y
configs/bcm11130_defconfig
... ... @@ -2,6 +2,7 @@
2 2 CONFIG_TARGET_BCM28155_AP=y
3 3 CONFIG_SYS_EXTRA_OPTIONS="SYS_MMC_ENV_DEV=0"
4 4 CONFIG_HUSH_PARSER=y
  5 +# CONFIG_AUTOBOOT is not set
5 6 CONFIG_CMD_BOOTZ=y
6 7 # CONFIG_CMD_IMLS is not set
7 8 CONFIG_CMD_ASKENV=y
configs/bcm11130_nand_defconfig
... ... @@ -2,6 +2,7 @@
2 2 CONFIG_TARGET_BCM28155_AP=y
3 3 CONFIG_SYS_EXTRA_OPTIONS="NAND"
4 4 CONFIG_HUSH_PARSER=y
  5 +# CONFIG_AUTOBOOT is not set
5 6 CONFIG_CMD_BOOTZ=y
6 7 # CONFIG_CMD_IMLS is not set
7 8 CONFIG_CMD_ASKENV=y
configs/bcm28155_ap_defconfig
... ... @@ -2,6 +2,7 @@
2 2 CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK=y
3 3 CONFIG_TARGET_BCM28155_AP=y
4 4 CONFIG_HUSH_PARSER=y
  5 +# CONFIG_AUTOBOOT is not set
5 6 CONFIG_CMD_BOOTZ=y
6 7 # CONFIG_CMD_IMLS is not set
7 8 CONFIG_CMD_ASKENV=y
configs/bcm28155_w1d_defconfig
... ... @@ -3,6 +3,7 @@
3 3 CONFIG_TARGET_BCM28155_AP=y
4 4 CONFIG_SYS_EXTRA_OPTIONS="BCM_SF2_ETH,BCM_SF2_ETH_GMAC"
5 5 CONFIG_HUSH_PARSER=y
  6 +# CONFIG_AUTOBOOT is not set
6 7 CONFIG_CMD_BOOTZ=y
7 8 # CONFIG_CMD_IMLS is not set
8 9 CONFIG_CMD_ASKENV=y
configs/bcm911360_entphn-ns_defconfig
... ... @@ -2,6 +2,7 @@
2 2 CONFIG_TARGET_BCMCYGNUS=y
3 3 CONFIG_SYS_EXTRA_OPTIONS="SYS_SDRAM_SIZE=0x20000000,ARMV7_NONSEC"
4 4 CONFIG_HUSH_PARSER=y
  5 +# CONFIG_AUTOBOOT is not set
5 6 CONFIG_CMD_BOOTZ=y
6 7 # CONFIG_CMD_IMLS is not set
7 8 CONFIG_CMD_ASKENV=y
configs/bcm911360_entphn_defconfig
... ... @@ -2,6 +2,7 @@
2 2 CONFIG_TARGET_BCMCYGNUS=y
3 3 CONFIG_SYS_EXTRA_OPTIONS="SYS_SDRAM_SIZE=0x20000000"
4 4 CONFIG_HUSH_PARSER=y
  5 +# CONFIG_AUTOBOOT is not set
5 6 CONFIG_CMD_BOOTZ=y
6 7 # CONFIG_CMD_IMLS is not set
7 8 CONFIG_CMD_ASKENV=y
configs/bcm911360k_defconfig
... ... @@ -2,6 +2,7 @@
2 2 CONFIG_TARGET_BCMCYGNUS=y
3 3 CONFIG_SYS_EXTRA_OPTIONS="SYS_SDRAM_SIZE=0x40000000"
4 4 CONFIG_HUSH_PARSER=y
  5 +# CONFIG_AUTOBOOT is not set
5 6 CONFIG_CMD_BOOTZ=y
6 7 # CONFIG_CMD_IMLS is not set
7 8 CONFIG_CMD_ASKENV=y
configs/bcm958300k-ns_defconfig
... ... @@ -2,6 +2,7 @@
2 2 CONFIG_TARGET_BCMCYGNUS=y
3 3 CONFIG_SYS_EXTRA_OPTIONS="SYS_SDRAM_SIZE=0x40000000,ARMV7_NONSEC"
4 4 CONFIG_HUSH_PARSER=y
  5 +# CONFIG_AUTOBOOT is not set
5 6 CONFIG_CMD_BOOTZ=y
6 7 # CONFIG_CMD_IMLS is not set
7 8 CONFIG_CMD_ASKENV=y
configs/bcm958300k_defconfig
... ... @@ -2,6 +2,7 @@
2 2 CONFIG_TARGET_BCMCYGNUS=y
3 3 CONFIG_SYS_EXTRA_OPTIONS="SYS_SDRAM_SIZE=0x40000000"
4 4 CONFIG_HUSH_PARSER=y
  5 +# CONFIG_AUTOBOOT is not set
5 6 CONFIG_CMD_BOOTZ=y
6 7 # CONFIG_CMD_IMLS is not set
7 8 CONFIG_CMD_ASKENV=y
configs/bcm958305k_defconfig
... ... @@ -2,6 +2,7 @@
2 2 CONFIG_TARGET_BCMCYGNUS=y
3 3 CONFIG_SYS_EXTRA_OPTIONS="SYS_SDRAM_SIZE=0x40000000"
4 4 CONFIG_HUSH_PARSER=y
  5 +# CONFIG_AUTOBOOT is not set
5 6 CONFIG_CMD_BOOTZ=y
6 7 # CONFIG_CMD_IMLS is not set
7 8 CONFIG_CMD_ASKENV=y
configs/bcm958622hr_defconfig
... ... @@ -2,6 +2,7 @@
2 2 CONFIG_TARGET_BCMNSP=y
3 3 CONFIG_SYS_EXTRA_OPTIONS="SYS_SDRAM_SIZE=0x01000000"
4 4 CONFIG_HUSH_PARSER=y
  5 +# CONFIG_AUTOBOOT is not set
5 6 CONFIG_CMD_BOOTZ=y
6 7 # CONFIG_CMD_IMLS is not set
7 8 CONFIG_CMD_ASKENV=y
configs/bf506f-ezkit_defconfig
1 1 CONFIG_BLACKFIN=y
2 2 CONFIG_TARGET_BF506F_EZKIT=y
  3 +# CONFIG_AUTOBOOT is not set
3 4 # CONFIG_CMD_BDI is not set
4 5 # CONFIG_CMD_CONSOLE is not set
5 6 # CONFIG_CMD_BOOTD is not set
configs/dnp5370_defconfig
1 1 CONFIG_BLACKFIN=y
2 2 CONFIG_TARGET_DNP5370=y
  3 +# CONFIG_AUTOBOOT is not set
3 4 CONFIG_CMD_GPIO=y
4 5 # CONFIG_CMD_SETEXPR is not set
5 6 CONFIG_CMD_MII=y
configs/espresso7420_defconfig
... ... @@ -4,6 +4,7 @@
4 4 CONFIG_SYS_MALLOC_F_LEN=0x2000
5 5 CONFIG_DEFAULT_DEVICE_TREE="exynos7420-espresso7420"
6 6 CONFIG_SYS_PROMPT="ESPRESSO7420 # "
  7 +# CONFIG_AUTOBOOT is not set
7 8 # CONFIG_CMD_IMLS is not set
8 9 # CONFIG_CMD_SETEXPR is not set
configs/malta64_defconfig
... ... @@ -4,6 +4,7 @@
4 4 CONFIG_DEFAULT_DEVICE_TREE="mti,malta"
5 5 CONFIG_HUSH_PARSER=y
6 6 CONFIG_SYS_PROMPT="malta # "
  7 +# CONFIG_AUTOBOOT is not set
7 8 # CONFIG_CMD_LOADB is not set
8 9 # CONFIG_CMD_LOADS is not set
9 10 # CONFIG_CMD_FPGA is not set
configs/malta64el_defconfig
... ... @@ -5,6 +5,7 @@
5 5 CONFIG_DEFAULT_DEVICE_TREE="mti,malta"
6 6 CONFIG_HUSH_PARSER=y
7 7 CONFIG_SYS_PROMPT="maltael # "
  8 +# CONFIG_AUTOBOOT is not set
8 9 # CONFIG_CMD_LOADB is not set
9 10 # CONFIG_CMD_LOADS is not set
10 11 # CONFIG_CMD_FPGA is not set
configs/malta_defconfig
... ... @@ -3,6 +3,7 @@
3 3 CONFIG_DEFAULT_DEVICE_TREE="mti,malta"
4 4 CONFIG_HUSH_PARSER=y
5 5 CONFIG_SYS_PROMPT="malta # "
  6 +# CONFIG_AUTOBOOT is not set
6 7 # CONFIG_CMD_LOADB is not set
7 8 # CONFIG_CMD_LOADS is not set
8 9 # CONFIG_CMD_FPGA is not set
configs/maltael_defconfig
... ... @@ -4,6 +4,7 @@
4 4 CONFIG_DEFAULT_DEVICE_TREE="mti,malta"
5 5 CONFIG_HUSH_PARSER=y
6 6 CONFIG_SYS_PROMPT="maltael # "
  7 +# CONFIG_AUTOBOOT is not set
7 8 # CONFIG_CMD_LOADB is not set
8 9 # CONFIG_CMD_LOADS is not set
9 10 # CONFIG_CMD_FPGA is not set
configs/mpr2_defconfig
1 1 CONFIG_SH=y
2 2 CONFIG_TARGET_MPR2=y
  3 +# CONFIG_AUTOBOOT is not set
3 4 # CONFIG_CMD_BDI is not set
4 5 # CONFIG_CMD_CONSOLE is not set
5 6 # CONFIG_CMD_BOOTD is not set
configs/ms7720se_defconfig
1 1 CONFIG_SH=y
2 2 CONFIG_TARGET_MS7720SE=y
  3 +# CONFIG_AUTOBOOT is not set
3 4 # CONFIG_CMD_BDI is not set
4 5 # CONFIG_CMD_CONSOLE is not set
5 6 # CONFIG_CMD_BOOTD is not set
configs/openrisc-generic_defconfig
... ... @@ -7,4 +7,5 @@
7 7 CONFIG_CMD_MII=y
8 8 CONFIG_CMD_PING=y
9 9 CONFIG_SYS_NS16550=y
  10 +# CONFIG_AUTOBOOT is not set
configs/rsk7203_defconfig
1 1 CONFIG_SH=y
2 2 CONFIG_TARGET_RSK7203=y
  3 +# CONFIG_AUTOBOOT is not set
3 4 # CONFIG_CMD_BDI is not set
4 5 # CONFIG_CMD_CONSOLE is not set
5 6 # CONFIG_CMD_BOOTD is not set
configs/s5p_goni_defconfig
... ... @@ -4,6 +4,7 @@
4 4 CONFIG_DEFAULT_DEVICE_TREE="s5pc1xx-goni"
5 5 CONFIG_HUSH_PARSER=y
6 6 CONFIG_SYS_PROMPT="Goni # "
  7 +# CONFIG_AUTOBOOT is not set
7 8 # CONFIG_CMD_IMLS is not set
8 9 # CONFIG_CMD_XIMG is not set
9 10 # CONFIG_CMD_FLASH is not set
configs/shmin_defconfig
1 1 CONFIG_SH=y
2 2 CONFIG_TARGET_SHMIN=y
  3 +# CONFIG_AUTOBOOT is not set
3 4 # CONFIG_CMD_BDI is not set
4 5 # CONFIG_CMD_CONSOLE is not set
5 6 # CONFIG_CMD_BOOTD is not set
... ... @@ -12,7 +12,7 @@
12 12 #ifndef __AUTOBOOT_H
13 13 #define __AUTOBOOT_H
14 14  
15   -#ifdef CONFIG_BOOTDELAY
  15 +#ifdef CONFIG_AUTOBOOT
16 16 /**
17 17 * bootdelay_process() - process the bootd delay
18 18 *