summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2019-08-02 11:19:23 -0400
committerTom Rini <[email protected]>2019-08-02 11:19:23 -0400
commitdb289a9d746c5f4ee36002a25303da111f6365e7 (patch)
tree9257904259608b0d8d2baeb494077cd8c54bf00f /cmd
parentbbaf56eda0e63d6d28fbccae0f112ef88203eb4d (diff)
parent5ec35ff3eb4598f93e349ea9a4fd56b700c1a3c3 (diff)
Merge branch '2019-08-02-autoboot-cleanup'
- Merge Simon Glass's series to cleanup the autoboot code
Diffstat (limited to 'cmd')
-rw-r--r--cmd/Kconfig34
-rw-r--r--cmd/bootmenu.c2
2 files changed, 34 insertions, 2 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 16cb5c2956c..22a3737b4eb 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -101,7 +101,14 @@ config AUTOBOOT_PROMPT
config AUTOBOOT_ENCRYPTION
bool "Enable encryption in autoboot stopping"
depends on AUTOBOOT_KEYED
- default n
+ help
+ This option allows a string to be entered into U-Boot to stop the
+ autoboot. The string itself is hashed and compared against the hash
+ in the environment variable 'bootstopkeysha256'. If it matches then
+ boot stops and a command-line prompt is presented.
+
+ This provides a way to ship a secure production device which can also
+ be accessed at the U-Boot command line.
config AUTOBOOT_DELAY_STR
string "Delay autobooting via specific input key / string"
@@ -146,6 +153,31 @@ config AUTOBOOT_STOP_STR_SHA256
string / password matches a values that is encypted via
a SHA256 hash and saved in the environment.
+config AUTOBOOT_USE_MENUKEY
+ bool "Allow a specify key to run a menu from the environment"
+ depends on !AUTOBOOT_KEYED
+ help
+ If a specific key is pressed to stop autoboot, then the commands in
+ the environment variable 'menucmd' are executed before boot starts.
+
+config AUTOBOOT_MENUKEY
+ int "ASCII value of boot key to show a menu"
+ default 0
+ depends on AUTOBOOT_USE_MENUKEY
+ help
+ If this key is pressed to stop autoboot, then the commands in the
+ environment variable 'menucmd' will be executed before boot starts.
+ For example, 33 means "!" in ASCII, so pressing ! at boot would take
+ this action.
+
+config AUTOBOOT_MENU_SHOW
+ bool "Show a menu on boot"
+ help
+ This enables the boot menu, controlled by environment variables
+ defined by the board. The menu starts after running the 'preboot'
+ environmnent variable (if enabled) and before handling the boot delay.
+ See README.bootmenu for more details.
+
endmenu
config BUILD_BIN2C
diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c
index 7f88c1ed632..0ae9d5a6815 100644
--- a/cmd/bootmenu.c
+++ b/cmd/bootmenu.c
@@ -472,7 +472,7 @@ void menu_display_statusline(struct menu *m)
puts(ANSI_CLEAR_LINE);
}
-#ifdef CONFIG_MENU_SHOW
+#ifdef CONFIG_AUTOBOOT_MENU_SHOW
int menu_show(int bootdelay)
{
bootmenu_show(bootdelay);