|
|
@@ -14,7 +14,7 @@ Signed-off-by: Weijie Gao <[email protected]>
|
|
|
|
|
|
--- a/cmd/bootmenu.c
|
|
|
+++ b/cmd/bootmenu.c
|
|
|
-@@ -89,6 +89,7 @@ static char *bootmenu_choice_entry(void
|
|
|
+@@ -88,6 +88,7 @@ static char *bootmenu_choice_entry(void
|
|
|
struct bootmenu_data *menu = data;
|
|
|
struct bootmenu_entry *iter;
|
|
|
enum bootmenu_key key = BKEY_NONE;
|
|
|
@@ -22,7 +22,7 @@ Signed-off-by: Weijie Gao <[email protected]>
|
|
|
int i;
|
|
|
|
|
|
cli_ch_init(cch);
|
|
|
-@@ -96,10 +97,10 @@ static char *bootmenu_choice_entry(void
|
|
|
+@@ -95,10 +96,10 @@ static char *bootmenu_choice_entry(void
|
|
|
while (1) {
|
|
|
if (menu->delay >= 0) {
|
|
|
/* Autoboot was not stopped */
|
|
|
@@ -35,7 +35,7 @@ Signed-off-by: Weijie Gao <[email protected]>
|
|
|
}
|
|
|
|
|
|
switch (key) {
|
|
|
-@@ -113,6 +114,12 @@ static char *bootmenu_choice_entry(void
|
|
|
+@@ -112,6 +113,12 @@ static char *bootmenu_choice_entry(void
|
|
|
++menu->active;
|
|
|
/* no menu key selected, regenerate menu */
|
|
|
return NULL;
|
|
|
@@ -48,7 +48,7 @@ Signed-off-by: Weijie Gao <[email protected]>
|
|
|
case BKEY_SELECT:
|
|
|
iter = menu->first;
|
|
|
for (i = 0; i < menu->active; ++i)
|
|
|
-@@ -170,6 +177,9 @@ static int prepare_bootmenu_entry(struct
|
|
|
+@@ -169,6 +176,9 @@ static int prepare_bootmenu_entry(struct
|
|
|
unsigned short int i = *index;
|
|
|
struct bootmenu_entry *entry = NULL;
|
|
|
struct bootmenu_entry *iter = *current;
|
|
|
@@ -58,7 +58,7 @@ Signed-off-by: Weijie Gao <[email protected]>
|
|
|
|
|
|
while ((option = bootmenu_getoption(i))) {
|
|
|
|
|
|
-@@ -184,11 +194,24 @@ static int prepare_bootmenu_entry(struct
|
|
|
+@@ -183,11 +193,24 @@ static int prepare_bootmenu_entry(struct
|
|
|
if (!entry)
|
|
|
return -ENOMEM;
|
|
|
|
|
|
@@ -84,7 +84,7 @@ Signed-off-by: Weijie Gao <[email protected]>
|
|
|
|
|
|
entry->command = strdup(sep + 1);
|
|
|
if (!entry->command) {
|
|
|
-@@ -334,6 +357,7 @@ static struct bootmenu_data *bootmenu_cr
|
|
|
+@@ -333,6 +356,7 @@ static struct bootmenu_data *bootmenu_cr
|
|
|
menu->delay = delay;
|
|
|
menu->active = 0;
|
|
|
menu->first = NULL;
|
|
|
@@ -92,7 +92,7 @@ Signed-off-by: Weijie Gao <[email protected]>
|
|
|
|
|
|
default_str = env_get("bootmenu_default");
|
|
|
if (default_str)
|
|
|
-@@ -369,9 +393,9 @@ static struct bootmenu_data *bootmenu_cr
|
|
|
+@@ -368,9 +392,9 @@ static struct bootmenu_data *bootmenu_cr
|
|
|
|
|
|
/* Add Quit entry if exiting bootmenu is disabled */
|
|
|
if (!IS_ENABLED(CONFIG_BOOTMENU_DISABLE_UBOOT_CONSOLE))
|
|
|
@@ -106,7 +106,7 @@ Signed-off-by: Weijie Gao <[email protected]>
|
|
|
free(entry);
|
|
|
--- a/common/menu.c
|
|
|
+++ b/common/menu.c
|
|
|
-@@ -49,6 +49,33 @@ struct menu {
|
|
|
+@@ -48,6 +48,33 @@ struct menu {
|
|
|
int item_cnt;
|
|
|
};
|
|
|
|
|
|
@@ -140,7 +140,7 @@ Signed-off-by: Weijie Gao <[email protected]>
|
|
|
/*
|
|
|
* An iterator function for menu items. callback will be called for each item
|
|
|
* in m, with m, a pointer to the item, and extra being passed to callback. If
|
|
|
-@@ -428,7 +455,7 @@ int menu_destroy(struct menu *m)
|
|
|
+@@ -426,7 +453,7 @@ int menu_destroy(struct menu *m)
|
|
|
}
|
|
|
|
|
|
enum bootmenu_key bootmenu_autoboot_loop(struct bootmenu_data *menu,
|
|
|
@@ -149,7 +149,7 @@ Signed-off-by: Weijie Gao <[email protected]>
|
|
|
{
|
|
|
enum bootmenu_key key = BKEY_NONE;
|
|
|
int i, c;
|
|
|
-@@ -463,6 +490,19 @@ enum bootmenu_key bootmenu_autoboot_loop
|
|
|
+@@ -461,6 +488,19 @@ enum bootmenu_key bootmenu_autoboot_loop
|
|
|
break;
|
|
|
default:
|
|
|
key = BKEY_NONE;
|
|
|
@@ -169,7 +169,7 @@ Signed-off-by: Weijie Gao <[email protected]>
|
|
|
break;
|
|
|
}
|
|
|
break;
|
|
|
-@@ -483,7 +523,8 @@ enum bootmenu_key bootmenu_autoboot_loop
|
|
|
+@@ -481,7 +521,8 @@ enum bootmenu_key bootmenu_autoboot_loop
|
|
|
return key;
|
|
|
}
|
|
|
|
|
|
@@ -179,7 +179,7 @@ Signed-off-by: Weijie Gao <[email protected]>
|
|
|
{
|
|
|
enum bootmenu_key key;
|
|
|
|
|
|
-@@ -515,6 +556,20 @@ enum bootmenu_key bootmenu_conv_key(int
|
|
|
+@@ -513,6 +554,20 @@ enum bootmenu_key bootmenu_conv_key(int
|
|
|
case ' ':
|
|
|
key = BKEY_SPACE;
|
|
|
break;
|
|
|
@@ -200,7 +200,7 @@ Signed-off-by: Weijie Gao <[email protected]>
|
|
|
default:
|
|
|
key = BKEY_NONE;
|
|
|
break;
|
|
|
-@@ -524,11 +579,16 @@ enum bootmenu_key bootmenu_conv_key(int
|
|
|
+@@ -522,11 +577,16 @@ enum bootmenu_key bootmenu_conv_key(int
|
|
|
}
|
|
|
|
|
|
enum bootmenu_key bootmenu_loop(struct bootmenu_data *menu,
|
|
|
@@ -218,7 +218,7 @@ Signed-off-by: Weijie Gao <[email protected]>
|
|
|
c = cli_ch_process(cch, 0);
|
|
|
if (!c) {
|
|
|
while (!c && !tstc()) {
|
|
|
-@@ -542,7 +602,7 @@ enum bootmenu_key bootmenu_loop(struct b
|
|
|
+@@ -540,7 +600,7 @@ enum bootmenu_key bootmenu_loop(struct b
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -301,7 +301,7 @@ Signed-off-by: Weijie Gao <[email protected]>
|
|
|
|
|
|
switch (key) {
|
|
|
case BKEY_UP:
|
|
|
-@@ -1839,7 +1839,7 @@ char *eficonfig_choice_change_boot_order
|
|
|
+@@ -1881,7 +1881,7 @@ char *eficonfig_choice_change_boot_order
|
|
|
|
|
|
cli_ch_init(cch);
|
|
|
while (1) {
|
|
|
@@ -312,7 +312,7 @@ Signed-off-by: Weijie Gao <[email protected]>
|
|
|
case BKEY_PLUS:
|
|
|
--- a/boot/bootflow_menu.c
|
|
|
+++ b/boot/bootflow_menu.c
|
|
|
-@@ -234,7 +234,7 @@ int bootflow_menu_run(struct bootstd_pri
|
|
|
+@@ -240,7 +240,7 @@ int bootflow_menu_run(struct bootstd_pri
|
|
|
|
|
|
key = 0;
|
|
|
if (ichar) {
|