summaryrefslogtreecommitdiff
path: root/common/main.c
diff options
context:
space:
mode:
authorYuri Tikhonov <yur@pollux.denx.de>2008-02-04 14:11:03 +0100
committerWolfgang Denk <wd@denx.de>2008-03-18 21:59:23 +0100
commite262efe35742c1ad4b0966ff501efc26f34a0aec (patch)
treef6e992e8645c7acebcadb483cab9a7e84d4254c1 /common/main.c
parent65b20dcefc89618193fa51947968dada91e4c778 (diff)
downloadu-boot-imx-e262efe35742c1ad4b0966ff501efc26f34a0aec.zip
u-boot-imx-e262efe35742c1ad4b0966ff501efc26f34a0aec.tar.gz
u-boot-imx-e262efe35742c1ad4b0966ff501efc26f34a0aec.tar.bz2
The patch introduces the CRITICAL feature of POST tests. If the test
marked as POST_CRITICAL fails then the alternative, post_critical, boot-command is used. If this command is not defined then U-Boot enters into interactive mode. Signed-off-by: Dmitry Rakhchev <rda@emcraft.com> Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/common/main.c b/common/main.c
index 163ba02..21e7afa 100644
--- a/common/main.c
+++ b/common/main.c
@@ -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",