[PATCH] bootmenu: Allow to quit it via CTRL+C
Pali Rohár
pali at kernel.org
Sat Dec 26 20:50:27 CET 2020
On Saturday 26 December 2020 20:44:45 Heinrich Schuchardt wrote:
> Am 26. Dezember 2020 20:15:40 MEZ schrieb "Pali Rohár" <pali at kernel.org>:
> >On Saturday 26 December 2020 20:10:10 Heinrich Schuchardt wrote:
> >> Am 26. Dezember 2020 20:03:56 MEZ schrieb "Pali Rohár"
> ><pali at kernel.org>:
> >> >On Saturday 26 December 2020 19:44:23 Heinrich Schuchardt wrote:
> >> >> Am 26. Dezember 2020 19:02:25 MEZ schrieb "Pali Rohár"
> >> ><pali at kernel.org>:
> >> >> >When 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 CTRL+C is pressed.
> >> >> >
> >> >> >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.
> >> >>
> >> >> Wouldn't the escape key be a better choice?
> >> >
> >> >I can add also escape key. But has escape key stable ANSI sequence
> >> >which
> >> >is needed to catch? If you tell me which bytes to catch (for escape
> >> >key)
> >> >I will add it.
> >>
> >> 0x1b is Escape
> >
> >Does not work. 0x1b is not escape key. It is start of the ANSI escape
> >sequence which matches also existing keys up and down.
>
> On the serial console you have to hit the key twice.
>
> The device driver will tranlate it to a single 0x1b which is the char you want to react to.
Which device driver? bootmenu code is already catching and reacting to
the byte 0x1b as part of the key up and key down matching. So single
0x1b for sure cannot be caught in bootmenu code as then key up and key
down keys stops working. If it is really 0x1b byte then it needs to be
somehow escaped and therefore be part of some longer, not single byte
sequence.
More information about the U-Boot
mailing list