[PATCH v2 2/4] cli_hush: run bootmenu on retry

Caleb Connolly caleb.connolly at linaro.org
Fri Oct 4 14:46:51 CEST 2024


When CONFIG_BOOT_RETRY is enabled, make hush shell always run the
bootcmd. This is an improvement over failing to build.

Signed-off-by: Caleb Connolly <caleb.connolly at linaro.org>
---
 common/cli_hush.c          | 2 +-
 common/cli_hush_upstream.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/cli_hush.c b/common/cli_hush.c
index a6a8edce1f43..3c6fd6f00a1d 100644
--- a/common/cli_hush.c
+++ b/common/cli_hush.c
@@ -1028,9 +1028,9 @@ static void get_user_input(struct in_str *i)
 	  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"
+	strcpy(console_buffer, "run bootcmd\n");
 #  endif
 	}
 #endif
 	if (n == -1 ) {
diff --git a/common/cli_hush_upstream.c b/common/cli_hush_upstream.c
index ab5aa5f9b36a..93eb0d85a95a 100644
--- a/common/cli_hush_upstream.c
+++ b/common/cli_hush_upstream.c
@@ -2907,9 +2907,9 @@ static void get_user_input(struct in_str *i)
 		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"
+	strcpy(console_buffer, "run bootcmd\n");
 #  endif
 	}
 # endif
 	if (n == -1 ) {

-- 
2.46.2



More information about the U-Boot mailing list