From 657e19f8f2dd279d3db6744d3d6859952d67c8c9 Mon Sep 17 00:00:00 2001 From: Caleb Connolly Date: Mon, 31 Mar 2025 14:23:19 +0200 Subject: cli_hush: support running bootcmd on boot retry Introduce a new config option: RETRY_BOOTCMD. When enabled this causes hush shell to re-run "bootcmd" when the auto-boot counter times out. Tested-by: Danila Tikhonov # google-sunfish Tested-by: Jens Reidel # xiaomi-davinci Link: https://lore.kernel.org/r/20250331-qcom-phones-v4-2-f52e57d3b8c6@linaro.org Signed-off-by: Caleb Connolly --- common/cli_hush.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'common/cli_hush.c') diff --git a/common/cli_hush.c b/common/cli_hush.c index 9f437ae5f47..7bd6943d3ed 100644 --- a/common/cli_hush.c +++ b/common/cli_hush.c @@ -1028,8 +1028,10 @@ 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" +# elif IS_ENABLED(CONFIG_RETRY_BOOTCMD) + strcpy(console_buffer, "run bootcmd\n"); +# else +# error "This only works with CONFIG_RESET_TO_RETRY or CONFIG_BOOT_RETRY_COMMAND enabled" # endif } #endif -- cgit v1.2.3