]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - common/main.c
The patch introduces the CRITICAL feature of POST tests. If the test marked as POST_C...
[karo-tx-uboot.git] / common / main.c
index 163ba02e62b0df0ef4f37afa6172259abe6a4f70..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",