]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
uboot-airoha: add custom title support
authorMikhail Zhilkin <csharper2005@gmail.com>
Sat, 6 Jun 2026 11:59:51 +0000 (14:59 +0300)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 29 Jun 2026 00:01:29 +0000 (02:01 +0200)
The patch was copied from mediatek target.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23569
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/boot/uboot-airoha/patches/200-cmd-bootmenu-custom-title.patch [new file with mode: 0644]

diff --git a/package/boot/uboot-airoha/patches/200-cmd-bootmenu-custom-title.patch b/package/boot/uboot-airoha/patches/200-cmd-bootmenu-custom-title.patch
new file mode 100644 (file)
index 0000000..3a66aa2
--- /dev/null
@@ -0,0 +1,33 @@
+--- a/cmd/bootmenu.c
++++ b/cmd/bootmenu.c
+@@ -482,7 +482,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);
+@@ -573,6 +577,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 last_active;                /* last 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 - keys that can be returned by the bootmenu */