U-Boot Bootmenu's autoboot rendering is broken

Pali Rohár pali at kernel.org
Sun May 7 23:21:40 CEST 2023


On Sunday 07 May 2023 23:19:22 Pali Rohár wrote:
> On Sunday 07 May 2023 23:08:45 Pali Rohár wrote:
> > If you run bootmenu in U-Boot it will print following output:
> > 
> >   *** U-Boot Boot Menu ***
> > 
> >       Attached kernel
> >       Internal eMMC
> >       External SD card
> >       U-Boot boot order
> >       U-Boot consoleHit any key to stop autoboot: 30 Hit any key to stop autoboot: 29 Hit any key to stop autoboot: 28
> > 
> > It happens on both serial output and VGA video output, so it is not
> > related to video output driver or interpreting of ANSI sequence.
> > 
> > Last entry is being overwritten by "Hit any key to stop autoboot" and
> > then every one second is new text appended after this last entry with
> > updated countdown. This is broken... I run git bisect and the result is:
> > 
> > 32bab0eae51b55898d1e2804e6614d9143840581 is the first bad commit
> > commit 32bab0eae51b55898d1e2804e6614d9143840581
> > Author: Simon Glass <sjg at chromium.org>
> > Date:   Fri Jan 6 08:52:26 2023 -0600
> > 
> >     menu: Make use of CLI character processing
> > 
> >     Avoid duplicating some of the escape-sequence processing here and use the
> >     CLI function instead.
> > 
> >     Signed-off-by: Simon Glass <sjg at chromium.org>
> > 
> > :040000 040000 62275c330c72e251d79fd3f867f8c3e44a6d8f32 3933deacc7661348a31e73822341b4b262bec382 M      cmd
> > :040000 040000 49ba8a914e6bd3f0438db86d290af226a1eb1272 1cce113f49b3ecbb1acf6d56fa0bc8f279cf5794 M      common
> > :040000 040000 021b5af8bf4e8f1226b93e63f4cd9f2e581a9659 2eb10232c77e0c4fa78677b059db3c5990c2799a M      include
> > 
> > Simon, could you look at this issue? It can be simple reproduced just by
> > calling "bootmenu" command.
> 
> Not only autoboot countdown and last boot entry is broken but also keys
> UP and DOWN and broken on _terminal_. When I do not press any key on
> terminal for 3 seconds then pressing DOWN quits bootmenu. Git bisect
> found same above commit. Maybe added "case '\e':" in above commit into
> /* ^C was pressed */ branch cause it?

Hm... what does "+#define ansi 0" in that commit means? It looks like a
hack for some unfinished stuff. That commit is incomplete.


More information about the U-Boot mailing list