arm-trusted-firmware-mediatek: update to 2021-03-10
[openwrt/staging/rmilecki.git] / package / boot / uboot-mediatek / patches / 008-bootmenu-custom-title.patch
1 --- a/cmd/bootmenu.c
2 +++ b/cmd/bootmenu.c
3 @@ -38,6 +38,7 @@ struct bootmenu_data {
4 int active; /* active menu entry */
5 int count; /* total count of menu entries */
6 struct bootmenu_entry *first; /* first menu entry */
7 + char *mtitle; /* custom menu title */
8 };
9
10 enum bootmenu_key {
11 @@ -380,7 +381,12 @@ static void menu_display_statusline(stru
12 printf(ANSI_CURSOR_POSITION, 1, 1);
13 puts(ANSI_CLEAR_LINE);
14 printf(ANSI_CURSOR_POSITION, 2, 1);
15 - puts(" *** U-Boot Boot Menu ***");
16 +
17 + if (menu->mtitle)
18 + puts(menu->mtitle);
19 + else
20 + puts(" *** U-Boot Boot Menu ***");
21 +
22 puts(ANSI_CLEAR_LINE_TO_END);
23 printf(ANSI_CURSOR_POSITION, 3, 1);
24 puts(ANSI_CLEAR_LINE);
25 @@ -434,6 +440,7 @@ static void bootmenu_show(int delay)
26 return;
27 }
28
29 + bootmenu->mtitle = env_get("bootmenu_title");
30 for (iter = bootmenu->first; iter; iter = iter->next) {
31 if (!menu_item_add(menu, iter->key, iter))
32 goto cleanup;