[U-Boot] [PATCH v1 3/4] autoboot.c: Move config options to Kconfig

Simon Glass
2015-05-07T23:51:34Z

Hi Stefan,

On 7 May 2015 at 06:13, Stefan Roese <sr@denx.de> wrote:
> This patch moves the following config options to Kconfig:
>
> CONFIG_AUTOBOOT_KEYED
> CONFIG_AUTOBOOT_PROMPT
> CONFIG_AUTOBOOT_DELAY_STR
> CONFIG_AUTOBOOT_STOP_STR
> AUTOBOOT_KEYED_CTRLC
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Simon Glass <sjg@chromium.org>
> ---
>
> common/Kconfig | 64 ++++++++++++++++++++++++++++++++
> common/autoboot.c | 6 ++-
> configs/CPCI4052_defconfig | 3 ++
> configs/O2DNT2_RAMBOOT_defconfig | 3 ++
> configs/O2DNT2_defconfig | 3 ++
> configs/PLU405_defconfig | 3 ++
> configs/PMC405DE_defconfig | 3 ++
> configs/PMC440_defconfig | 3 ++
> configs/UCP1020_SPIFLASH_defconfig | 3 ++
> configs/UCP1020_defconfig | 3 ++
> configs/a4m072_defconfig | 3 ++
> configs/atngw100_defconfig | 4 ++
> configs/atngw100mkii_defconfig | 4 ++
> configs/atstk1002_defconfig | 4 ++
> configs/atstk1003_defconfig | 4 ++
> configs/atstk1004_defconfig | 4 ++
> configs/atstk1006_defconfig | 4 ++
> configs/calimain_defconfig | 2 +
> configs/cpuat91_defconfig | 4 ++
> configs/cpuat91_ram_defconfig | 3 ++
> configs/digsy_mtc_RAMBOOT_defconfig | 3 ++
> configs/digsy_mtc_defconfig | 3 ++
> configs/digsy_mtc_rev5_RAMBOOT_defconfig | 3 ++
> configs/digsy_mtc_rev5_defconfig | 3 ++
> configs/dlvision-10g_defconfig | 2 +
> configs/draco_defconfig | 3 ++
> configs/dxr2_defconfig | 3 ++
> configs/favr-32-ezkit_defconfig | 4 ++
> configs/gdppc440etx_defconfig | 2 +
> configs/grasshopper_defconfig | 4 ++
> configs/hammerhead_defconfig | 4 ++
> configs/highbank_defconfig | 3 ++
> configs/hrcon_defconfig | 2 +
> configs/ids8313_defconfig | 3 ++
> configs/intip_defconfig | 2 +
> configs/io64_defconfig | 2 +
> configs/io_defconfig | 2 +
> configs/iocon_defconfig | 2 +
> configs/ip04_defconfig | 1 +
> configs/motionpro_defconfig | 3 ++
> configs/nokia_rx51_defconfig | 1 +
> configs/omap3_mvblx_defconfig | 2 +
> configs/ph1_ld4_defconfig | 4 ++
> configs/ph1_pro4_defconfig | 4 ++
> configs/ph1_sld8_defconfig | 4 ++
> configs/pm9263_defconfig | 1 +
> configs/pxm2_defconfig | 3 ++
> configs/rut_defconfig | 3 ++
> configs/spear600_defconfig | 3 ++
> configs/stv0991_defconfig | 3 ++
> configs/x600_defconfig | 3 ++
> configs/zmx25_defconfig | 4 ++
> include/configs/CPCI4052.h | 6 ---
> include/configs/PLU405.h | 9 -----
> include/configs/PMC405DE.h | 6 ---
> include/configs/PMC440.h | 6 ---
> include/configs/UCP1020.h | 11 ------
> include/configs/a4m072.h | 4 --
> include/configs/atngw100.h | 10 -----
> include/configs/atngw100mkii.h | 10 -----
> include/configs/atstk1002.h | 10 -----
> include/configs/atstk1003.h | 10 -----
> include/configs/atstk1004.h | 10 -----
> include/configs/atstk1006.h | 10 -----
> include/configs/bf537-stamp.h | 4 --
> include/configs/calimain.h | 2 -
> include/configs/cpuat91.h | 6 ---
> include/configs/digsy_mtc.h | 4 --
> include/configs/dlvision-10g.h | 2 -
> include/configs/favr-32-ezkit.h | 10 -----
> include/configs/gdppc440etx.h | 2 -
> include/configs/grasshopper.h | 10 -----
> include/configs/hammerhead.h | 10 -----
> include/configs/highbank.h | 4 +-
> include/configs/hrcon.h | 2 -
> include/configs/ids8313.h | 4 --
> include/configs/intip.h | 2 -
> include/configs/io.h | 2 -
> include/configs/io64.h | 2 -
> include/configs/iocon.h | 2 -
> include/configs/ip04.h | 1 -
> include/configs/motionpro.h | 6 ---
> include/configs/nokia_rx51.h | 1 -
> include/configs/o2dnt-common.h | 12 ------
> include/configs/omap3_mvblx.h | 2 -
> include/configs/pm9263.h | 1 -
> include/configs/siemens-am33x-common.h | 6 ---
> include/configs/spear-common.h | 4 --
> include/configs/stv0991.h | 4 --
> include/configs/uniphier.h | 5 ---
> include/configs/x600.h | 4 --
> include/configs/zmx25.h | 4 --
> 92 files changed, 219 insertions(+), 220 deletions(-)
>
> diff --git a/common/Kconfig b/common/Kconfig
> index 15759f7..ff150f0 100644
> --- a/common/Kconfig
> +++ b/common/Kconfig
> @@ -17,6 +17,70 @@ config SYS_HUSH_PARSER
> help
> Backward compatibility.
>
> +menu "Autoboot options"
> +
> +config AUTOBOOT_KEYED
> + bool "Stop autobooting via specific input key / string"
> + default n
> + help
> + This option enables stopping (aborting) of the automatic
> + boot feature only by issuing a specific input key or
> + string. If not enabled, any input key will abort the
> + U-Boot automatic booting process and bring the device
> + to the U-Boot prompt for user input.
> +
> +config AUTOBOOT_PROMPT
> + string "Autoboot stop prompt"
> + depends on AUTOBOOT_KEYED
> + default "Autoboot in %d seconds\n"

Doesn't this mean that the autoboot message will always be printed? I
wonder if we need a separate 'AUTOBOOT' to enable the feature?

[snip]

Regards,
Simon