openwrt/package/boot/uboot-mediatek/patches/211-cmd-bootmenu-custom-title.patch
Daniel Golle d3a337a592 uboot-mediatek: additions from MTK SDK
* updated SNAND/SNFI driver brings support for MT7981
 * add support for MediaTek NAND Memory bad Block Management (NMBM)
   (not used for any boards atm, but could be useful in future)
 * wire up NMBM support for MT7622, MT7629, MT7981 and MT7986
 * replace some local patches with updated version from SDK
 * bring some legacy precompiler symbols which haven't been converted
   into Kconfig symbols in U-Boot 2022.07, remove when bumbping to
   U-Boot 2022.10:
   100-28-include-configs-mt7986-h-from-SDK.patch

Source: https://github.com/mtk-openwrt/u-boot
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-08-28 20:33:15 +01:00

34 lines
993 B
Diff

--- a/cmd/bootmenu.c
+++ b/cmd/bootmenu.c
@@ -439,7 +439,11 @@ static void menu_display_statusline(stru
printf(ANSI_CURSOR_POSITION, 1, 1);
puts(ANSI_CLEAR_LINE);
printf(ANSI_CURSOR_POSITION, 2, 3);
- 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);
@@ -524,6 +528,7 @@ static enum bootmenu_ret bootmenu_show(i
return BOOTMENU_RET_FAIL;
}
+ bootmenu->mtitle = env_get("bootmenu_title");
for (iter = bootmenu->first; iter; iter = iter->next) {
if (menu_item_add(menu, iter->key, iter) != 1)
goto cleanup;
--- a/include/menu.h
+++ b/include/menu.h
@@ -43,6 +43,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 */
bool last_choiced;
};