]> git.sur5r.net Git - u-boot/blobdiff - common/main.c
rtc: Remove 2nd reference to max6900.o in drivers/rtc/Makefile
[u-boot] / common / main.c
index 1c7d73e5dba58212bc9541ab560375f644fd87b1..21e7afab61fde2db49a1de071baafec77bc6f6c3 100644 (file)
@@ -40,7 +40,7 @@
 
 #include <post.h>
 
-#ifdef CONFIG_SILENT_CONSOLE
+#if defined(CONFIG_SILENT_CONSOLE) || defined(CONFIG_POST)
 DECLARE_GLOBAL_DATA_PTR;
 #endif
 
@@ -369,6 +369,12 @@ void main_loop (void)
        init_cmd_timeout ();
 # endif        /* CONFIG_BOOT_RETRY_TIME */
 
+#ifdef CONFIG_POST
+       if (gd->flags & GD_FLG_POSTFAIL) {
+               s = getenv("failbootcmd");
+       }
+       else
+#endif /* CONFIG_POST */
 #ifdef CONFIG_BOOTCOUNT_LIMIT
        if (bootlimit && (bootcount > bootlimit)) {
                printf ("Warning: Bootlimit (%u) exceeded. Using altbootcmd.\n",
@@ -709,6 +715,13 @@ static int cread_line(const char *const prompt, char *buf, unsigned int *len)
 
        while (1) {
                rlen = 1;
+#ifdef CONFIG_BOOT_RETRY_TIME
+               while (!tstc()) {       /* while no incoming data */
+                       if (retry_time >= 0 && get_ticks() > endtime)
+                               return (-2);    /* timed out */
+               }
+#endif
+
                ichar = getcmd_getch();
 
                if ((ichar == '\n') || (ichar == '\r')) {