[PATCH v2] bootmenu: Allow to quit it via ESC/CTRL+C

Simon Glass sjg at chromium.org
Tue Dec 29 04:32:52 CET 2020


On Sat, 26 Dec 2020 at 17:05, Pali Rohár <pali at kernel.org> wrote:
>
> When ESC/CTRL+C is pressed interrupt bootmenu and jump into U-Boot console.
> As the last entry in bootmenu is always U-Boot console just choose the last
> entry when ESC or CTRL+C is pressed.
>
> ESC key is detected when either no other character appears after '\e'
> within 10ms or when non-'[' appears after '\e'.
>
> It is useful when bootmenu is part of boot process and you want to
> interrupt boot process by scripts which control U-Boot (serial) console.
>
> Signed-off-by: Pali Rohár <pali at kernel.org>
>
> ---
> Changes in v2:
> * Added support also for ESC key
> ---
>  cmd/bootmenu.c | 42 +++++++++++++++++++++++++++++++++++-------
>  1 file changed, 35 insertions(+), 7 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list