summaryrefslogtreecommitdiff
path: root/config/u-boot/x86/patches/0004-Add-an-8sec-autoboot-timeout-on-the-bootflow-menu.patch
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-12-04 06:55:48 +0000
committerLeah Rowe <leah@libreboot.org>2024-12-04 07:23:51 +0000
commitc038b653ac1fed329c8577df3b19bad8d594c98a (patch)
treee8dff86e22b55a7ee549e915fee8c7281e631dcc /config/u-boot/x86/patches/0004-Add-an-8sec-autoboot-timeout-on-the-bootflow-menu.patch
parent7a6e47c24fe88f44138a8e6e3360fc796445c933 (diff)
Add auto-boot timeout for U-Boot's bootflow menu
Otherwise, you have to press enter to boot your distro. With this, a timeout is created. After a number of seconds, which can be reconfigured, the first option selected will be booted, when generating a bootflow menu. The timeout is disabled when you navigate the menu; it only kicks in if you don't input anything on the keyboard. More information about how this works is in the U-Boot patches, within this patch. I've set the timeout to 8 seconds. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'config/u-boot/x86/patches/0004-Add-an-8sec-autoboot-timeout-on-the-bootflow-menu.patch')
-rw-r--r--config/u-boot/x86/patches/0004-Add-an-8sec-autoboot-timeout-on-the-bootflow-menu.patch65
1 files changed, 0 insertions, 65 deletions
diff --git a/config/u-boot/x86/patches/0004-Add-an-8sec-autoboot-timeout-on-the-bootflow-menu.patch b/config/u-boot/x86/patches/0004-Add-an-8sec-autoboot-timeout-on-the-bootflow-menu.patch
deleted file mode 100644
index 3790e6ed..00000000
--- a/config/u-boot/x86/patches/0004-Add-an-8sec-autoboot-timeout-on-the-bootflow-menu.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 1b1673e76dae73885089415132284e9a14ecd4ac Mon Sep 17 00:00:00 2001
-From: Leah Rowe <info@minifree.org>
-Date: Tue, 3 Dec 2024 20:31:32 +0000
-Subject: [PATCH 1/1] Add an 8sec autoboot timeout on the bootflow menu
-
-Otherwise, you have to press enter to load from a boot option,
-which is unacceptable on headless setups.
-
-If you press the arrow keys to interrupt it, the timer will stop
-and you must then press enter to boot an option.
-
-Otherwise, if you just leave U-Boot to do its thing, it will
-automatically boot what was selected, e.g. installed OS.
-
-Signed-off-by: Leah Rowe <info@minifree.org>
----
- boot/bootflow_menu.c | 11 ++++++++++-
- 1 file changed, 10 insertions(+), 1 deletion(-)
-
-diff --git a/boot/bootflow_menu.c b/boot/bootflow_menu.c
-index 9d0dc352f9..c788b86cdc 100644
---- a/boot/bootflow_menu.c
-+++ b/boot/bootflow_menu.c
-@@ -59,7 +59,7 @@ int bootflow_menu_new(struct expo **expp)
- ret = scene_menu(scn, "main", OBJ_MENU, &menu);
- ret |= scene_obj_set_pos(scn, OBJ_MENU, MARGIN_LEFT, 100);
- ret |= scene_txt_str(scn, "title", OBJ_MENU_TITLE, STR_MENU_TITLE,
-- "U-Boot - Boot Menu", NULL);
-+ "**** The selected menu item will autoboot in a few seconds unless interrupted! ****", NULL);
- ret |= scene_menu_set_title(scn, OBJ_MENU, OBJ_PROMPT);
-
- logo = video_get_u_boot_logo();
-@@ -185,6 +185,8 @@ int bootflow_menu_run(struct bootstd_priv *std, bool text_mode,
- uint sel_id;
- bool done;
- int ret;
-+ int bootflow_delay=8000;
-+ bool bootflow_countdown=true;
-
- cli_ch_init(cch);
-
-@@ -231,6 +233,12 @@ int bootflow_menu_run(struct bootstd_priv *std, bool text_mode,
- schedule();
- mdelay(2);
- ichar = cli_ch_process(cch, -ETIMEDOUT);
-+ if (bootflow_countdown == true) {
-+ bootflow_delay -= 2;
-+ if (bootflow_delay <= 0) {
-+ ichar='\n';
-+ }
-+ }
- }
- if (!ichar) {
- ichar = getchar();
-@@ -265,6 +273,7 @@ int bootflow_menu_run(struct bootstd_priv *std, bool text_mode,
- break;
- }
- }
-+ bootflow_countdown = false;
- } while (!done);
-
- if (ret)
---
-2.39.5
-