diff options
author | Yuri Tikhonov <yur@pollux.denx.de> | 2008-02-04 14:11:03 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-03-18 22:24:48 +0100 |
commit | b428f6a8c65c5303e5f96db8d24f2f699d94a98c (patch) | |
tree | 0bede5fb7b3eaec6b71b355748ad19b4ddab2c79 /common | |
parent | 8f15d4addd49c956412e1e3bfc764a0c8b1f3184 (diff) |
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')
-rw-r--r-- | common/main.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/common/main.c b/common/main.c index 163ba02e62b..21e7afab61f 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", |