diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-02-14 11:05:33 +0900 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-02-22 19:49:41 -0500 |
commit | 607d06d262a9949aa38895edb476448f186d577b (patch) | |
tree | e3612338820e94085c0048d016b38abbb1f506d2 | |
parent | 2ab6e74dbd667e77d88e3ffb1893515243e0c5ad (diff) |
preboot: Introduce CONFIG_USE_PREBOOT and migrate CONFIG_PREBOOT
This is the same migration path as commit b6251db8c3f0 ("Kconfig:
Introduce USE_BOOTCOMMAND and migrate BOOTCOMMAND").
I also moved the description in README to the Kconfig help.
I ripped off the sentence about 'LWMON' since it is gone already.
I only let my boards migrate, leaving the rest to platform maintainers.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-rw-r--r-- | README | 16 | ||||
-rw-r--r-- | common/Kconfig | 18 | ||||
-rw-r--r-- | configs/uniphier_ld4_sld8_defconfig | 2 | ||||
-rw-r--r-- | configs/uniphier_v7_defconfig | 2 | ||||
-rw-r--r-- | configs/uniphier_v8_defconfig | 2 | ||||
-rw-r--r-- | include/configs/uniphier.h | 2 |
6 files changed, 24 insertions, 18 deletions
@@ -687,22 +687,6 @@ The following options need to be configured: as a convenience, when switching between booting from RAM and NFS. -- Pre-Boot Commands: - CONFIG_PREBOOT - - When this option is #defined, the existence of the - environment variable "preboot" will be checked - immediately before starting the CONFIG_BOOTDELAY - countdown and/or running the auto-boot command resp. - entering interactive mode. - - This feature is especially useful when "preboot" is - automatically generated or modified. For an example - see the LWMON board specific code: here "preboot" is - modified when the user holds down a certain - combination of keys on the (special) keyboard when - booting the systems - - Serial Download Echo Mode: CONFIG_LOADS_ECHO If defined to 1, all characters received during a diff --git a/common/Kconfig b/common/Kconfig index e100c22949..1a1951f874 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -232,6 +232,24 @@ config BOOTCOMMAND This is the string of commands that will be used as bootcmd and if AUTOBOOT is set, automatically run. +config USE_PREBOOT + bool "Enable preboot" + help + When this option is enabled, the existence of the environment + variable "preboot" will be checked immediately before starting the + CONFIG_BOOTDELAY countdown and/or running the auto-boot command resp. + entering interactive mode. + + This feature is especially useful when "preboot" is automatically + generated or modified. For example, the boot code can modify the + "preboot" when a user holds down a certain combination of keys. + +config PREBOOT + string "preboot default value" + depends on USE_PREBOOT + help + This is the default of "preboot" environment variable. + menu "Console" config MENU diff --git a/configs/uniphier_ld4_sld8_defconfig b/configs/uniphier_ld4_sld8_defconfig index 48f7ac4c87..de9182eba3 100644 --- a/configs/uniphier_ld4_sld8_defconfig +++ b/configs/uniphier_ld4_sld8_defconfig @@ -10,6 +10,8 @@ CONFIG_MICRO_SUPPORT_CARD=y CONFIG_NR_DRAM_BANKS=3 # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set CONFIG_BOOTCOMMAND="run ${bootdev}script; run ${bootdev}boot" +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="env exist ${bootdev}preboot && run ${bootdev}preboot" CONFIG_LOGLEVEL=6 CONFIG_SPL_NAND_SUPPORT=y CONFIG_SPL_NOR_SUPPORT=y diff --git a/configs/uniphier_v7_defconfig b/configs/uniphier_v7_defconfig index f7abf05c52..bb9ce1a59b 100644 --- a/configs/uniphier_v7_defconfig +++ b/configs/uniphier_v7_defconfig @@ -9,6 +9,8 @@ CONFIG_MICRO_SUPPORT_CARD=y CONFIG_NR_DRAM_BANKS=3 # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set CONFIG_BOOTCOMMAND="run ${bootdev}script; run ${bootdev}boot" +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="env exist ${bootdev}preboot && run ${bootdev}preboot" CONFIG_LOGLEVEL=6 CONFIG_SPL_NAND_SUPPORT=y CONFIG_SPL_NOR_SUPPORT=y diff --git a/configs/uniphier_v8_defconfig b/configs/uniphier_v8_defconfig index 1ba1c7d508..08dfa240c1 100644 --- a/configs/uniphier_v8_defconfig +++ b/configs/uniphier_v8_defconfig @@ -8,6 +8,8 @@ CONFIG_MICRO_SUPPORT_CARD=y CONFIG_NR_DRAM_BANKS=3 # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set CONFIG_BOOTCOMMAND="run ${bootdev}script; run ${bootdev}boot" +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="env exist ${bootdev}preboot && run ${bootdev}preboot" CONFIG_LOGLEVEL=6 CONFIG_CMD_CONFIG=y CONFIG_CMD_IMLS=y diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h index 95d6452553..1e509ce9ad 100644 --- a/include/configs/uniphier.h +++ b/include/configs/uniphier.h @@ -124,8 +124,6 @@ "third_image=u-boot.bin\0" #endif -#define CONFIG_PREBOOT "env exist ${bootdev}preboot && run ${bootdev}preboot" - #define CONFIG_ROOTPATH "/nfs/root/path" #define CONFIG_NFSBOOTCOMMAND \ "setenv bootargs $bootargs root=/dev/nfs rw " \ |