]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
autoboot: add an option to override keyed autoboot
authorMark Langsdorf <mark.langsdorf@calxeda.com>
Tue, 10 Sep 2013 20:20:23 +0000 (15:20 -0500)
committerTom Rini <trini@ti.com>
Fri, 8 Nov 2013 20:25:14 +0000 (15:25 -0500)
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
doc/README.autoboot

index 6f475f0cca812ea8b69d5b3842819f1d9fa04ff3..8b6f274fa25f723fd2553c1c61a2a32606a90f1a 100644 (file)
@@ -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
        }
index ff58a79e490a94502f4951cf0792ec97f80a8a48..14e3660dd8d7634e058d280bed1e457de8838066 100644 (file)
@@ -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