diff options
author | Steffen Jaeckel <jaeckel-floss@eyet-services.de> | 2021-07-08 15:57:38 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-07-23 13:36:20 -0400 |
commit | d199c3ab1c3afa7a17259f4045516f5fbfaaa446 (patch) | |
tree | e41c639f587b76f04213be0825a89ce5815589ff /common/Kconfig.boot | |
parent | 6c0ce6d3ca273f12e1cb4018144bee8e6131d30d (diff) | |
download | u-boot-d199c3ab1c3afa7a17259f4045516f5fbfaaa446.tar.gz |
common: add AUTOBOOT_FLUSH_STDIN option
The key-sequence based unlock mechanisms are sensitive to junk symbols
that could have been sent to stdin and are still waiting to be retrieved.
Enabling this option will read all symbols off stdin before displaying the
autoboot prompt (and starting to read the password from stdin).
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/Kconfig.boot')
-rw-r--r-- | common/Kconfig.boot | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/common/Kconfig.boot b/common/Kconfig.boot index f9551b206f..e0cca226da 100644 --- a/common/Kconfig.boot +++ b/common/Kconfig.boot @@ -791,6 +791,15 @@ config AUTOBOOT_KEYED U-Boot automatic booting process and bring the device to the U-Boot prompt for user input. +config AUTOBOOT_FLUSH_STDIN + bool "Enable flushing stdin before starting to read the password" + depends on AUTOBOOT_KEYED && !SANDBOX + help + When this option is enabled stdin buffer will be flushed before + starting to read the password. + This can't be enabled for the sandbox as flushing stdin would + break the autoboot unit tests. + config AUTOBOOT_PROMPT string "Autoboot stop prompt" depends on AUTOBOOT_KEYED |