]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Make bootretry feature work with hush shell.
authorWolfgang Denk <wd@pollux.denx.de>
Fri, 12 Aug 2005 21:34:51 +0000 (23:34 +0200)
committerWolfgang Denk <wd@pollux.denx.de>
Fri, 12 Aug 2005 21:34:51 +0000 (23:34 +0200)
Caveat: this currently *requires* CONFIG_RESET_TO_RETRY to be set, too.
Patch by Andreas Engel, 19 Jul 2005

CHANGELOG
common/hush.c

index 483135f94ea6fd75630f623f5ac761c79fccc037..4732ac5ccf113d63ca402eb4d2b0ecc7717f6533 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,10 @@
 Changes for U-Boot 1.1.3:
 ======================================================================
 
+* Make bootretry feature work with hush shell.
+  Caveat: this currently *requires* CONFIG_RESET_TO_RETRY to be set, too.
+  Patch by Andreas Engel, 19 Jul 2005
+
 * Update Hymod Board Database PHP code in "tools" directory
   Patch by Murray Jensen, 01 Jul 2005
 
index 47680edec38f83175c5b00dd3c527810aef44fad..eb7f7f15606ab652d43e2012db487fae0292962c 100644 (file)
@@ -1022,12 +1022,30 @@ static void get_user_input(struct in_str *i)
        int n;
        static char the_command[CFG_CBSIZE];
 
+#ifdef CONFIG_BOOT_RETRY_TIME
+#  ifdef CONFIG_RESET_TO_RETRY
+       extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+#  else
+#      error "This currently only works with CONFIG_RESET_TO_RETRY enabled"
+#  endif
+       reset_cmd_timeout();
+#endif
        i->__promptme = 1;
        if (i->promptmode == 1) {
                n = readline(CFG_PROMPT);
        } else {
                n = readline(CFG_PROMPT_HUSH_PS2);
        }
+#ifdef CONFIG_BOOT_RETRY_TIME
+       if (n == -2) {
+         puts("\nTimeout waiting for command\n");
+#  ifdef CONFIG_RESET_TO_RETRY
+         do_reset(NULL, 0, 0, NULL);
+#  else
+#      error "This currently only works with CONFIG_RESET_TO_RETRY enabled"
+#  endif
+       }
+#endif
        if (n == -1 ) {
                flag_repeat = 0;
                i->__promptme = 0;