bootmenu: U-Boot console is enabled as default
The commit2158b0da22
("bootmenu: add Kconfig option not to enter U-Boot console") disables to enter U-Boot console from bootmenu as default, this change affects the existing bootmenu users. This commit reverts the default behavior, the bootmenu can enter U-Boot console same as before. CMD_BOOTMENU_ENTER_UBOOT_CONSOLE is renamed BOOTMENU_DISABLE_UBOOT_CONSOLE and depends on AUTOBOOT_MENU_SHOW. Fixes:2158b0da22
("bootmenu: add Kconfig option not to enter U-Boot console") Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Tested-by: Pali Rohar <pali@kernel.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:

committed by
Heinrich Schuchardt

parent
a24b20ea67
commit
83f73632c9
@@ -1143,6 +1143,13 @@ config AUTOBOOT_MENU_SHOW
|
|||||||
environmnent variable (if enabled) and before handling the boot delay.
|
environmnent variable (if enabled) and before handling the boot delay.
|
||||||
See README.bootmenu for more details.
|
See README.bootmenu for more details.
|
||||||
|
|
||||||
|
config BOOTMENU_DISABLE_UBOOT_CONSOLE
|
||||||
|
bool "Disallow bootmenu to enter the U-Boot console"
|
||||||
|
depends on AUTOBOOT_MENU_SHOW
|
||||||
|
help
|
||||||
|
If this option is enabled, user can not enter the U-Boot console from
|
||||||
|
bootmenu. It increases the system security.
|
||||||
|
|
||||||
config BOOT_RETRY
|
config BOOT_RETRY
|
||||||
bool "Boot retry feature"
|
bool "Boot retry feature"
|
||||||
help
|
help
|
||||||
|
10
cmd/Kconfig
10
cmd/Kconfig
@@ -357,16 +357,6 @@ config CMD_BOOTMENU
|
|||||||
help
|
help
|
||||||
Add an ANSI terminal boot menu command.
|
Add an ANSI terminal boot menu command.
|
||||||
|
|
||||||
config CMD_BOOTMENU_ENTER_UBOOT_CONSOLE
|
|
||||||
bool "Allow Bootmenu to enter the U-Boot console"
|
|
||||||
depends on CMD_BOOTMENU
|
|
||||||
default n
|
|
||||||
help
|
|
||||||
Add an entry to enter U-Boot console in bootmenu.
|
|
||||||
If this option is disabled, user can not enter
|
|
||||||
the U-Boot console from bootmenu. It increases
|
|
||||||
the system security.
|
|
||||||
|
|
||||||
config CMD_ADTIMG
|
config CMD_ADTIMG
|
||||||
bool "adtimg"
|
bool "adtimg"
|
||||||
help
|
help
|
||||||
|
@@ -356,7 +356,7 @@ static struct bootmenu_data *bootmenu_create(int delay)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
/* Add Quit entry if entering U-Boot console is disabled */
|
/* Add Quit entry if entering U-Boot console is disabled */
|
||||||
if (IS_ENABLED(CONFIG_CMD_BOOTMENU_ENTER_UBOOT_CONSOLE))
|
if (!IS_ENABLED(CONFIG_BOOTMENU_DISABLE_UBOOT_CONSOLE))
|
||||||
entry->title = u16_strdup(u"U-Boot console");
|
entry->title = u16_strdup(u"U-Boot console");
|
||||||
else
|
else
|
||||||
entry->title = u16_strdup(u"Quit");
|
entry->title = u16_strdup(u"Quit");
|
||||||
@@ -589,7 +589,7 @@ int menu_show(int bootdelay)
|
|||||||
if (ret == BOOTMENU_RET_UPDATED)
|
if (ret == BOOTMENU_RET_UPDATED)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!IS_ENABLED(CONFIG_CMD_BOOTMENU_ENTER_UBOOT_CONSOLE)) {
|
if (IS_ENABLED(CONFIG_BOOTMENU_DISABLE_UBOOT_CONSOLE)) {
|
||||||
if (ret == BOOTMENU_RET_QUIT) {
|
if (ret == BOOTMENU_RET_QUIT) {
|
||||||
/* default boot process */
|
/* default boot process */
|
||||||
if (IS_ENABLED(CONFIG_CMD_BOOTEFI_BOOTMGR))
|
if (IS_ENABLED(CONFIG_CMD_BOOTEFI_BOOTMGR))
|
||||||
|
Reference in New Issue
Block a user