aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-mediatek/patches/008-bootmenu-custom-title.patch
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2021-01-30 13:58:16 +0000
committerDaniel Golle <daniel@makrotopia.org>2021-02-28 01:23:48 +0000
commited5000431940c0c8ae2b5704faa0ceb68a299102 (patch)
tree6c5cbb6d1a09d5d69f588082f5aaa7fbf9feaf00 /package/boot/uboot-mediatek/patches/008-bootmenu-custom-title.patch
parentc16958e19463a59303f90c49e458bfa68057d1d3 (diff)
downloadupstream-ed5000431940c0c8ae2b5704faa0ceb68a299102.tar.gz
upstream-ed5000431940c0c8ae2b5704faa0ceb68a299102.tar.bz2
upstream-ed5000431940c0c8ae2b5704faa0ceb68a299102.zip
uboot-mediatek: add support for Linksys E8450
Build U-Boot for the Linksys E8450 in order to have support for UBI. The loader has a default environment with scripts handling the reset button as well as fall-back to recovery firmware. If the loader comes up without a valid environment found in UBI, it will automatically make sure UBI is formatted and create a new environment and proceed to load recovery firmware (either from UBI or via TFTP if recovery is corrupted or unavailable). If the button is held down during power-on, the yellow status LED turns on and the bootloader environment is reset to factory defaults. If the button is released at this point, the recovery firmware (if existing) is loaded from UBI and booted. If the button is continously held down even beyond the point that the yellow LED turned on, the loader will try to load the recovery firmware via TFTP from server 192.168.1.254, write it to UBI and boot. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/boot/uboot-mediatek/patches/008-bootmenu-custom-title.patch')
-rw-r--r--package/boot/uboot-mediatek/patches/008-bootmenu-custom-title.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/package/boot/uboot-mediatek/patches/008-bootmenu-custom-title.patch b/package/boot/uboot-mediatek/patches/008-bootmenu-custom-title.patch
new file mode 100644
index 0000000000..32f26ece8e
--- /dev/null
+++ b/package/boot/uboot-mediatek/patches/008-bootmenu-custom-title.patch
@@ -0,0 +1,32 @@
+--- a/cmd/bootmenu.c
++++ b/cmd/bootmenu.c
+@@ -38,6 +38,7 @@ struct bootmenu_data {
+ int active; /* active menu entry */
+ int count; /* total count of menu entries */
+ struct bootmenu_entry *first; /* first menu entry */
++ char *mtitle; /* custom menu title */
+ };
+
+ enum bootmenu_key {
+@@ -380,7 +381,12 @@ static void menu_display_statusline(stru
+ printf(ANSI_CURSOR_POSITION, 1, 1);
+ puts(ANSI_CLEAR_LINE);
+ printf(ANSI_CURSOR_POSITION, 2, 1);
+- puts(" *** U-Boot Boot Menu ***");
++
++ if (menu->mtitle)
++ puts(menu->mtitle);
++ else
++ puts(" *** U-Boot Boot Menu ***");
++
+ puts(ANSI_CLEAR_LINE_TO_END);
+ printf(ANSI_CURSOR_POSITION, 3, 1);
+ puts(ANSI_CLEAR_LINE);
+@@ -434,6 +440,7 @@ static void bootmenu_show(int delay)
+ return;
+ }
+
++ bootmenu->mtitle = env_get("bootmenu_title");
+ for (iter = bootmenu->first; iter; iter = iter->next) {
+ if (!menu_item_add(menu, iter->key, iter))
+ goto cleanup;