diff mbox series

[v2,3/4] bootretry: check for bootretry variable changes

Message ID 20241004-qcom-phones-v2-3-c7ab67ac3043@linaro.org
State New
Headers show
Series Better smartphone support (Qualcomm) | expand

Commit Message

Caleb Connolly Oct. 4, 2024, 12:46 p.m. UTC
To enable more complex sequencing of the bootmenu, autoboot, and
bootretry, handle changes to the bootretry variable between tries. This
makes it possible to turn bootretry off (e.g. to drop to a shell) and
then back on again.

This makes it possible to have a persistent bootmenu (the only way to
navigate U-Boot on devices like smartphones which lack a physical
keyboard) by having bootcmd be defined to launch the bootmenu. This
allows for menu options like enabling USB mass storage gadget to return
back to the boot menu once the gadget is shut down.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
---
 boot/bootretry.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Tom Rini Oct. 4, 2024, 5:16 p.m. UTC | #1
On Fri, Oct 04, 2024 at 02:46:52PM +0200, Caleb Connolly wrote:

> To enable more complex sequencing of the bootmenu, autoboot, and
> bootretry, handle changes to the bootretry variable between tries. This
> makes it possible to turn bootretry off (e.g. to drop to a shell) and
> then back on again.
> 
> This makes it possible to have a persistent bootmenu (the only way to
> navigate U-Boot on devices like smartphones which lack a physical
> keyboard) by having bootcmd be defined to launch the bootmenu. This
> allows for menu options like enabling USB mass storage gadget to return
> back to the boot menu once the gadget is shut down.
> 
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>

Reviewed-by: Tom Rini <trini@konsulko.com>
diff mbox series

Patch

diff --git a/boot/bootretry.c b/boot/bootretry.c
index 587b2de7d6b0..a60767eaa2ee 100644
--- a/boot/bootretry.c
+++ b/boot/bootretry.c
@@ -36,8 +36,10 @@  void bootretry_init_cmd_timeout(void)
  * reset command line timeout to retry_time seconds
  */
 void bootretry_reset_cmd_timeout(void)
 {
+	/* Parse changes to bootretry */
+	bootretry_init_cmd_timeout();
 	endtime = endtick(retry_time);
 }
 
 int bootretry_tstc_timeout(void)