diff mbox

[U-Boot,03/10] Kconfig: add CONFIG_BOOTDELAY

Message ID 1440600893-20542-4-git-send-email-grinberg@compulab.co.il
State Deferred
Delegated to: Tom Rini
Headers show

Commit Message

Igor Grinberg Aug. 26, 2015, 2:54 p.m. UTC
Add CONFIG_BOOTDELAY to the Kconfig.
To make the transition easier, we define CONFIG_AUTOBOOT_BOOTDELAY to
actually enable the CONFIG_BOOTDELAY Kconfig setting.
Once all boards finish transitioning to Kconfig, we can remove the
CONFIG_AUTOBOOT_BOOTDELAY and just leave the CONFIG_BOOTDELAY unguarded.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Cc: Simon Glass <sjg@chromium.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
---
 common/Kconfig | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

Comments

Simon Glass Aug. 28, 2015, 5:58 p.m. UTC | #1
Hi Igor,

On 26 August 2015 at 08:54, Igor Grinberg <grinberg@compulab.co.il> wrote:
> Add CONFIG_BOOTDELAY to the Kconfig.
> To make the transition easier, we define CONFIG_AUTOBOOT_BOOTDELAY to
> actually enable the CONFIG_BOOTDELAY Kconfig setting.
> Once all boards finish transitioning to Kconfig, we can remove the
> CONFIG_AUTOBOOT_BOOTDELAY and just leave the CONFIG_BOOTDELAY unguarded.
>
> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>  common/Kconfig | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/common/Kconfig b/common/Kconfig
> index 88dc016..ecbf6cb 100644
> --- a/common/Kconfig
> +++ b/common/Kconfig
> @@ -100,6 +100,23 @@ config AUTOBOOT_STOP_STR_SHA256
>           string / password matches a values that is encypted via
>           a SHA256 hash and saved in the environment.
>
> +config AUTOBOOT_BOOTDELAY
> +       bool "Enable specifying the boot delay"
> +       help
> +         This option enables specifying the delay time (in seconds)
> +         before automatically booting the default image.
> +
> +config BOOTDELAY
> +       int "Seconds to delay before autobooting"
> +       depends on AUTOBOOT_BOOTDELAY
> +       default 1
> +       help
> +         Delay before automatically booting the default image;
> +         set to -1 to disable autoboot.
> +         set to -2 to autoboot with no delay and not check for abort
> +         (even when CONFIG_ZERO_BOOTDELAY_CHECK is defined).
> +         See doc/README.autoboot for additional information.
> +
>  endmenu
>
>  comment "Commands"

How about using the moveconfig tool to move all boards to Kconfig for
the option you add?

Regards,
Simon
diff mbox

Patch

diff --git a/common/Kconfig b/common/Kconfig
index 88dc016..ecbf6cb 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -100,6 +100,23 @@  config AUTOBOOT_STOP_STR_SHA256
 	  string / password matches a values that is encypted via
 	  a SHA256 hash and saved in the environment.
 
+config AUTOBOOT_BOOTDELAY
+	bool "Enable specifying the boot delay"
+	help
+	  This option enables specifying the delay time (in seconds)
+	  before automatically booting the default image.
+
+config BOOTDELAY
+	int "Seconds to delay before autobooting"
+	depends on AUTOBOOT_BOOTDELAY
+	default 1
+	help
+	  Delay before automatically booting the default image;
+	  set to -1 to disable autoboot.
+	  set to -2 to autoboot with no delay and not check for abort
+	  (even when CONFIG_ZERO_BOOTDELAY_CHECK is defined).
+	  See doc/README.autoboot for additional information.
+
 endmenu
 
 comment "Commands"