]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Allow runtime configuration of "zero-delay" check
authorJoe Hershberger <joe.hershberger@ni.com>
Fri, 17 Aug 2012 10:53:12 +0000 (10:53 +0000)
committerTom Rini <trini@ti.com>
Wed, 3 Oct 2012 23:01:21 +0000 (16:01 -0700)
Define the new "-2" value for bootdelay to mean autoboot with no delay
and don't check for an abort key (while "0" value means do check).

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
README
common/main.c

diff --git a/README b/README
index 0d17e7dbe10a2b99d1055803b6367fc7af822be2..a668748f3c0bb4df3c1784f4875239e37ef5248b 100644 (file)
--- a/README
+++ b/README
@@ -704,6 +704,8 @@ The following options need to be configured:
 - Boot Delay:  CONFIG_BOOTDELAY - in seconds
                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 these options that
                work with CONFIG_BOOTDELAY. None are required.
index 81984acb000f0c191cddaa576d52977f838fbf8d..9507cec88bfca5af2a694747646df9455e411c35 100644 (file)
@@ -222,7 +222,8 @@ int abortboot(int bootdelay)
 #ifdef CONFIG_MENUPROMPT
        printf(CONFIG_MENUPROMPT);
 #else
-       printf("Hit any key to stop autoboot: %2d ", bootdelay);
+       if (bootdelay >= 0)
+               printf("Hit any key to stop autoboot: %2d ", bootdelay);
 #endif
 
 #if defined CONFIG_ZERO_BOOTDELAY_CHECK
@@ -382,7 +383,7 @@ void main_loop (void)
 
        debug ("### main_loop: bootcmd=\"%s\"\n", s ? s : "<UNDEFINED>");
 
-       if (bootdelay >= 0 && s && !abortboot (bootdelay)) {
+       if (bootdelay != -1 && s && !abortboot(bootdelay)) {
 # ifdef CONFIG_AUTOBOOT_KEYED
                int prev = disable_ctrlc(1);    /* disable Control C checking */
 # endif