[U-Boot] [PATCH 1/2] autoboot: add an option to override keyed autoboot

As originally implemented, setting the AUTOBOOT_KEYED config option will prevent users from breaking into the autoboot script with ctrl-c. Restore that option with a new config symbol.
Signed-off-by: Mark Langsdorf mark.langsdorf@calxeda.com --- common/main.c | 4 ++-- doc/README.autoboot | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/common/main.c b/common/main.c index ae37fee..dea48e4 100644 --- a/common/main.c +++ b/common/main.c @@ -392,13 +392,13 @@ static void process_boot_delay(void) debug ("### main_loop: bootcmd="%s"\n", s ? s : "<UNDEFINED>");
if (bootdelay != -1 && s && !abortboot(bootdelay)) { -#ifdef CONFIG_AUTOBOOT_KEYED +#if defined(CONFIG_AUTOBOOT_KEYED) && !defined(CONFIG_AUTOBOOT_KEYED_CTRLC) int prev = disable_ctrlc(1); /* disable Control C checking */ #endif
run_command_list(s, -1, 0);
-#ifdef CONFIG_AUTOBOOT_KEYED +#if defined(CONFIG_AUTOBOOT_KEYED) && !defined(CONFIG_AUTOBOOT_KEYED_CTRLC) disable_ctrlc(prev); /* restore Control C checking */ #endif } diff --git a/doc/README.autoboot b/doc/README.autoboot index e4fabc9..6f35c7b 100644 --- a/doc/README.autoboot +++ b/doc/README.autoboot @@ -74,6 +74,7 @@ What they do "bootretry" is >= 0.
CONFIG_AUTOBOOT_KEYED + CONFIG_AUTOBOOT_KEYED_CTRLC CONFIG_AUTOBOOT_PROMPT CONFIG_AUTOBOOT_DELAY_STR CONFIG_AUTOBOOT_STOP_STR @@ -135,6 +136,13 @@ What they do environment variable you can specify a second, alternate string (which allows you to have two "password" strings).
+ The CONFIG_AUTOBOOT_KEYED_CTRLC #define allows for the boot + sequence to be interrupted by ctrl-c, in addition to the + "bootdelaykey" and "bootstopkey". Setting this variable + provides an escape sequence from the limited "password" + strings. + + CONFIG_ZERO_BOOTDELAY_CHECK
If this option is defined, you can stop the autoboot process

Let highbank users break into the autoboot script with ctrl-c.
Signed-off-by: Mark Langsdorf mark.langsdorf@calxeda.com --- include/configs/highbank.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/highbank.h b/include/configs/highbank.h index afb6e64..1254768 100644 --- a/include/configs/highbank.h +++ b/include/configs/highbank.h @@ -80,7 +80,7 @@ #define CONFIG_RESET_TO_RETRY #define CONFIG_AUTOBOOT_KEYED #define CONFIG_AUTOBOOT_PROMPT "Autobooting in %d seconds...\nPress <s> to stop or <d> to delay\n", bootdelay - +#define CONFIG_AUTOBOOT_KEYED_CTRLC /* * Miscellaneous configurable options */

On Tue, Sep 10, 2013 at 03:20:24PM -0500, Mark Langsdorf wrote:
Let highbank users break into the autoboot script with ctrl-c.
Signed-off-by: Mark Langsdorf mark.langsdorf@calxeda.com
Applied to u-boot/master, thanks!

On Tue, Sep 10, 2013 at 03:20:23PM -0500, Mark Langsdorf wrote:
As originally implemented, setting the AUTOBOOT_KEYED config option will prevent users from breaking into the autoboot script with ctrl-c. Restore that option with a new config symbol.
Signed-off-by: Mark Langsdorf mark.langsdorf@calxeda.com
Applied to u-boot/master, thanks!
participants (2)
-
Mark Langsdorf
-
Tom Rini