Re: [PATCH] menu: Re-enable the ANSI codes

2023-06-26 Thread Simon Glass
Hi Frank,

On Mon, 26 Jun 2023 at 11:44, Frank Wunderlich  wrote:
>
> Hi,
>
> what exact bug does the Patch fix? as i'm listed in reported-By...i remember 
> only the problem with missing line-breaks after "normal" menuitems and the 
> "u-boot-console" i reported in ML. But i don't think this is related to ANSI 
> processing.

It fixes placement of the prompt to select an option. You can ignore
this patch if it isn't related to your report.

Regards,
Simon


>
> regards Frank
>
>
> > Gesendet: Montag, 12. Juni 2023 um 22:14 Uhr
> > Von: "Simon Glass" 
> > An: "U-Boot Mailing List" 
> > Cc: "Simon Glass" , "Pali Rohár" , 
> > "Mark Kettenis" , "Frank Wunderlich" 
> > , "Heinrich Schuchardt" , 
> > "Ilias Apalodimas" , "Masahisa Kojima" 
> > , "Stefan Roese" 
> > Betreff: [PATCH] menu: Re-enable the ANSI codes
> >
> > The intent here was to allow ANSI codes to be disabled, since it was
> > proving impoosible to test operation of the menu code when it kept moving
> > the cursor. Unfortunately this ended up in the patch.
> >
> > Correct this by enabling ANSI again.
> >
> > Signed-off-by: Simon Glass 
> > Reported-by: Pali Rohár 
> > Reported-by: Mark Kettenis 
> > Reported-by: Frank Wunderlich 
> > Fixes: 32bab0eae51b ("menu: Make use of CLI character processing")
> > ---
> >
> >  common/menu.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/common/menu.c b/common/menu.c
> > index 94514177e4e9..b55cf7b99967 100644
> > --- a/common/menu.c
> > +++ b/common/menu.c
> > @@ -15,7 +15,7 @@
> >
> >  #include "menu.h"
> >
> > -#define ansi 0
> > +#define ansi 1
> >
> >  /*
> >   * Internally, each item in a menu is represented by a struct menu_item.
> > --
> > 2.41.0.162.gfafddb0af9-goog
> >
> >


Re: [PATCH] menu: Re-enable the ANSI codes

2023-06-25 Thread Heinrich Schuchardt



Am 25. Juni 2023 17:26:34 MESZ schrieb "Pali Rohár" :
>On Saturday 24 June 2023 13:05:11 Tom Rini wrote:
>> On Sat, Jun 24, 2023 at 11:01:13AM +0200, Pali Rohár wrote:
>> > On Saturday 17 June 2023 22:28:24 Heinrich Schuchardt wrote:
>> > > On 6/17/23 12:48, Simon Glass wrote:
>> > > > Hi Pali,
>> > > > 
>> > > > On Thu, 15 Jun 2023 at 17:56, Pali Rohár  wrote:
>> > > > > 
>> > > > > On Thursday 15 June 2023 13:34:09 Simon Glass wrote:
>> > > > > > Hi Pali,
>> > > > > > 
>> > > > > > On Mon, 12 Jun 2023 at 22:33, Pali Rohár  wrote:
>> > > > > > > 
>> > > > > > > On Monday 12 June 2023 22:17:48 Simon Glass wrote:
>> > > > > > > > Hi Pali,
>> > > > > > > > 
>> > > > > > > > On Mon, 12 Jun 2023 at 21:22, Pali Rohár  
>> > > > > > > > wrote:
>> > > > > > > > > 
>> > > > > > > > > On Monday 12 June 2023 21:14:32 Simon Glass wrote:
>> > > > > > > > > > The intent here was to allow ANSI codes to be disabled, 
>> > > > > > > > > > since it was
>> > > > > > > > > > proving impoosible to test operation of the menu code when 
>> > > > > > > > > > it kept moving
>> > > > > > > > > > the cursor. Unfortunately this ended up in the patch.
>> > > > > > > > > > 
>> > > > > > > > > > Correct this by enabling ANSI again.
>> > > > > > > > > > 
>> > > > > > > > > > Signed-off-by: Simon Glass 
>> > > > > > > > > > Reported-by: Pali Rohár 
>> > > > > > > > > > Reported-by: Mark Kettenis 
>> > > > > > > > > > Reported-by: Frank Wunderlich 
>> > > > > > > > > > Fixes: 32bab0eae51b ("menu: Make use of CLI character 
>> > > > > > > > > > processing")
>> > > > > > > > > > ---
>> > > > > > > > > > 
>> > > > > > > > > >   common/menu.c | 2 +-
>> > > > > > > > > >   1 file changed, 1 insertion(+), 1 deletion(-)
>> > > > > > > > > > 
>> > > > > > > > > > diff --git a/common/menu.c b/common/menu.c
>> > > > > > > > > > index 94514177e4e9..b55cf7b99967 100644
>> > > > > > > > > > --- a/common/menu.c
>> > > > > > > > > > +++ b/common/menu.c
>> > > > > > > > > > @@ -15,7 +15,7 @@
>> > > > > > > > > > 
>> > > > > > > > > >   #include "menu.h"
>> > > > > > > > > > 
>> > > > > > > > > > -#define ansi 0
>> > > > > > > > > > +#define ansi 1
>> > > > > > > > > > 
>> > > > > > > > > >   /*
>> > > > > > > > > >* Internally, each item in a menu is represented by a 
>> > > > > > > > > > struct menu_item.
>> > > > > > > > > > --
>> > > > > > > > > > 2.41.0.162.gfafddb0af9-goog
>> > > > > > > > > > 
>> > > > > > > > > 
>> > > > > > > > > Hello, I have tested this change but bootmenu still does not 
>> > > > > > > > > work. There
>> > > > > > > > > is still same issue which I reported month ago. When I press 
>> > > > > > > > > DOWN key
>> > > > > > > > > then bootmenu immediately quit instead of moving into the 
>> > > > > > > > > next entry.
>> > > > > > > > 
>> > > > > > > > Thanks for testing this.
>> > > > > > > > 
>> > > > > > > > Is there a way for me to test this with sandbox? Or does your 
>> > > > > > > > Nokia
>> > > > > > > > test check it?
>> > > > > > > 
>> > > > > > > I guess that bootmenu command could work in sandbox. But I have 
>> > > > > > > not
>> > > > > > > tried it.
>> > > > > > > 
>> > > > > > > Nokia CI test does not try any terminal, keyboard or VGA 
>> > > > > > > interaction, so
>> > > > > > > broken rendering or broken keyboard input is not caught by CI.
>> > > > > > > 
>> > > > > > > But it is possible to test it manually. See U-Boot documentation 
>> > > > > > > how to
>> > > > > > > run Nokia u-boot image in qemu. Bootmenu is automatically 
>> > > > > > > started.
>> > > > > > > https://u-boot.readthedocs.io/en/latest/board/nokia/rx51.html#run-in-qemu
>> > > > > > 
>> > > > > > I tried to follow this but got stuck here:
>> > > > > > 
>> > > > > > ./configure --enable-system --target-list=arm-softmmu 
>> > > > > > --disable-werror
>> > > > > > 
>> > > > > > ERROR: Cannot use 'python', Python 2.4 or later is required.
>> > > > > > Note that Python 3 or later is not yet supported.
>> > > > > > Use --python=/path/to/python to specify a supported Python.
>> > > > > > 
>> > > > > > Python 2 has been deprecated for years and I think it was removed 
>> > > > > > recently.
>> > 
>> > So install all required dependencies? It is really stupid argument to
>> > say that _I have removed X from my PC_ and then _I cannot compile Y
>> > because it depends on X_.
>> 
>> We're not talking about adding some random but modern dependency. We're
>> talking about adding a language that every person responsible for it
>> says to not use and migrate away from.  This is Heinrich's point.
>> 
>> > > Our Docker image uses Ubuntu 22.04 (Jammy). Ubuntu 22.10 (Kinetic) was
>> > > the last Ubuntu release providing Python 2.7. So when upgrading our
>> > > Docker image next year we will have to quit emulating that 14 year old
>> > > device.
>> > 
>> > Why to quit? Why you cannot compile and install required dependency?
>> 
>> We'll have to quit because Python 2.7 won't be available from the
>> distribution.  And no, we don't want to a

Re: [PATCH] menu: Re-enable the ANSI codes

2023-06-25 Thread Pali Rohár
On Saturday 24 June 2023 13:05:11 Tom Rini wrote:
> On Sat, Jun 24, 2023 at 11:01:13AM +0200, Pali Rohár wrote:
> > On Saturday 17 June 2023 22:28:24 Heinrich Schuchardt wrote:
> > > On 6/17/23 12:48, Simon Glass wrote:
> > > > Hi Pali,
> > > > 
> > > > On Thu, 15 Jun 2023 at 17:56, Pali Rohár  wrote:
> > > > > 
> > > > > On Thursday 15 June 2023 13:34:09 Simon Glass wrote:
> > > > > > Hi Pali,
> > > > > > 
> > > > > > On Mon, 12 Jun 2023 at 22:33, Pali Rohár  wrote:
> > > > > > > 
> > > > > > > On Monday 12 June 2023 22:17:48 Simon Glass wrote:
> > > > > > > > Hi Pali,
> > > > > > > > 
> > > > > > > > On Mon, 12 Jun 2023 at 21:22, Pali Rohár  
> > > > > > > > wrote:
> > > > > > > > > 
> > > > > > > > > On Monday 12 June 2023 21:14:32 Simon Glass wrote:
> > > > > > > > > > The intent here was to allow ANSI codes to be disabled, 
> > > > > > > > > > since it was
> > > > > > > > > > proving impoosible to test operation of the menu code when 
> > > > > > > > > > it kept moving
> > > > > > > > > > the cursor. Unfortunately this ended up in the patch.
> > > > > > > > > > 
> > > > > > > > > > Correct this by enabling ANSI again.
> > > > > > > > > > 
> > > > > > > > > > Signed-off-by: Simon Glass 
> > > > > > > > > > Reported-by: Pali Rohár 
> > > > > > > > > > Reported-by: Mark Kettenis 
> > > > > > > > > > Reported-by: Frank Wunderlich 
> > > > > > > > > > Fixes: 32bab0eae51b ("menu: Make use of CLI character 
> > > > > > > > > > processing")
> > > > > > > > > > ---
> > > > > > > > > > 
> > > > > > > > > >   common/menu.c | 2 +-
> > > > > > > > > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > > > > > > 
> > > > > > > > > > diff --git a/common/menu.c b/common/menu.c
> > > > > > > > > > index 94514177e4e9..b55cf7b99967 100644
> > > > > > > > > > --- a/common/menu.c
> > > > > > > > > > +++ b/common/menu.c
> > > > > > > > > > @@ -15,7 +15,7 @@
> > > > > > > > > > 
> > > > > > > > > >   #include "menu.h"
> > > > > > > > > > 
> > > > > > > > > > -#define ansi 0
> > > > > > > > > > +#define ansi 1
> > > > > > > > > > 
> > > > > > > > > >   /*
> > > > > > > > > >* Internally, each item in a menu is represented by a 
> > > > > > > > > > struct menu_item.
> > > > > > > > > > --
> > > > > > > > > > 2.41.0.162.gfafddb0af9-goog
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > Hello, I have tested this change but bootmenu still does not 
> > > > > > > > > work. There
> > > > > > > > > is still same issue which I reported month ago. When I press 
> > > > > > > > > DOWN key
> > > > > > > > > then bootmenu immediately quit instead of moving into the 
> > > > > > > > > next entry.
> > > > > > > > 
> > > > > > > > Thanks for testing this.
> > > > > > > > 
> > > > > > > > Is there a way for me to test this with sandbox? Or does your 
> > > > > > > > Nokia
> > > > > > > > test check it?
> > > > > > > 
> > > > > > > I guess that bootmenu command could work in sandbox. But I have 
> > > > > > > not
> > > > > > > tried it.
> > > > > > > 
> > > > > > > Nokia CI test does not try any terminal, keyboard or VGA 
> > > > > > > interaction, so
> > > > > > > broken rendering or broken keyboard input is not caught by CI.
> > > > > > > 
> > > > > > > But it is possible to test it manually. See U-Boot documentation 
> > > > > > > how to
> > > > > > > run Nokia u-boot image in qemu. Bootmenu is automatically started.
> > > > > > > https://u-boot.readthedocs.io/en/latest/board/nokia/rx51.html#run-in-qemu
> > > > > > 
> > > > > > I tried to follow this but got stuck here:
> > > > > > 
> > > > > > ./configure --enable-system --target-list=arm-softmmu 
> > > > > > --disable-werror
> > > > > > 
> > > > > > ERROR: Cannot use 'python', Python 2.4 or later is required.
> > > > > > Note that Python 3 or later is not yet supported.
> > > > > > Use --python=/path/to/python to specify a supported Python.
> > > > > > 
> > > > > > Python 2 has been deprecated for years and I think it was removed 
> > > > > > recently.
> > 
> > So install all required dependencies? It is really stupid argument to
> > say that _I have removed X from my PC_ and then _I cannot compile Y
> > because it depends on X_.
> 
> We're not talking about adding some random but modern dependency. We're
> talking about adding a language that every person responsible for it
> says to not use and migrate away from.  This is Heinrich's point.
> 
> > > Our Docker image uses Ubuntu 22.04 (Jammy). Ubuntu 22.10 (Kinetic) was
> > > the last Ubuntu release providing Python 2.7. So when upgrading our
> > > Docker image next year we will have to quit emulating that 14 year old
> > > device.
> > 
> > Why to quit? Why you cannot compile and install required dependency?
> 
> We'll have to quit because Python 2.7 won't be available from the
> distribution.  And no, we don't want to add building Python 2.7 to the
> list of things our container does. I don't even know that Python 2.7
> will compile with the gcc and related that will ship in the host. And
> that's wit

Re: [PATCH] menu: Re-enable the ANSI codes

2023-06-24 Thread Pali Rohár
On Saturday 17 June 2023 22:28:24 Heinrich Schuchardt wrote:
> On 6/17/23 12:48, Simon Glass wrote:
> > Hi Pali,
> > 
> > On Thu, 15 Jun 2023 at 17:56, Pali Rohár  wrote:
> > > 
> > > On Thursday 15 June 2023 13:34:09 Simon Glass wrote:
> > > > Hi Pali,
> > > > 
> > > > On Mon, 12 Jun 2023 at 22:33, Pali Rohár  wrote:
> > > > > 
> > > > > On Monday 12 June 2023 22:17:48 Simon Glass wrote:
> > > > > > Hi Pali,
> > > > > > 
> > > > > > On Mon, 12 Jun 2023 at 21:22, Pali Rohár  wrote:
> > > > > > > 
> > > > > > > On Monday 12 June 2023 21:14:32 Simon Glass wrote:
> > > > > > > > The intent here was to allow ANSI codes to be disabled, since 
> > > > > > > > it was
> > > > > > > > proving impoosible to test operation of the menu code when it 
> > > > > > > > kept moving
> > > > > > > > the cursor. Unfortunately this ended up in the patch.
> > > > > > > > 
> > > > > > > > Correct this by enabling ANSI again.
> > > > > > > > 
> > > > > > > > Signed-off-by: Simon Glass 
> > > > > > > > Reported-by: Pali Rohár 
> > > > > > > > Reported-by: Mark Kettenis 
> > > > > > > > Reported-by: Frank Wunderlich 
> > > > > > > > Fixes: 32bab0eae51b ("menu: Make use of CLI character 
> > > > > > > > processing")
> > > > > > > > ---
> > > > > > > > 
> > > > > > > >   common/menu.c | 2 +-
> > > > > > > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > > > > 
> > > > > > > > diff --git a/common/menu.c b/common/menu.c
> > > > > > > > index 94514177e4e9..b55cf7b99967 100644
> > > > > > > > --- a/common/menu.c
> > > > > > > > +++ b/common/menu.c
> > > > > > > > @@ -15,7 +15,7 @@
> > > > > > > > 
> > > > > > > >   #include "menu.h"
> > > > > > > > 
> > > > > > > > -#define ansi 0
> > > > > > > > +#define ansi 1
> > > > > > > > 
> > > > > > > >   /*
> > > > > > > >* Internally, each item in a menu is represented by a struct 
> > > > > > > > menu_item.
> > > > > > > > --
> > > > > > > > 2.41.0.162.gfafddb0af9-goog
> > > > > > > > 
> > > > > > > 
> > > > > > > Hello, I have tested this change but bootmenu still does not 
> > > > > > > work. There
> > > > > > > is still same issue which I reported month ago. When I press DOWN 
> > > > > > > key
> > > > > > > then bootmenu immediately quit instead of moving into the next 
> > > > > > > entry.
> > > > > > 
> > > > > > Thanks for testing this.
> > > > > > 
> > > > > > Is there a way for me to test this with sandbox? Or does your Nokia
> > > > > > test check it?
> > > > > 
> > > > > I guess that bootmenu command could work in sandbox. But I have not
> > > > > tried it.
> > > > > 
> > > > > Nokia CI test does not try any terminal, keyboard or VGA interaction, 
> > > > > so
> > > > > broken rendering or broken keyboard input is not caught by CI.
> > > > > 
> > > > > But it is possible to test it manually. See U-Boot documentation how 
> > > > > to
> > > > > run Nokia u-boot image in qemu. Bootmenu is automatically started.
> > > > > https://u-boot.readthedocs.io/en/latest/board/nokia/rx51.html#run-in-qemu
> > > > 
> > > > I tried to follow this but got stuck here:
> > > > 
> > > > ./configure --enable-system --target-list=arm-softmmu --disable-werror
> > > > 
> > > > ERROR: Cannot use 'python', Python 2.4 or later is required.
> > > > Note that Python 3 or later is not yet supported.
> > > > Use --python=/path/to/python to specify a supported Python.
> > > > 
> > > > Python 2 has been deprecated for years and I think it was removed 
> > > > recently.

So install all required dependencies? It is really stupid argument to
say that _I have removed X from my PC_ and then _I cannot compile Y
because it depends on X_.

> 
> Our Docker image uses Ubuntu 22.04 (Jammy). Ubuntu 22.10 (Kinetic) was
> the last Ubuntu release providing Python 2.7. So when upgrading our
> Docker image next year we will have to quit emulating that 14 year old
> device.

Why to quit? Why you cannot compile and install required dependency?

Also was not the whole purpose of using containers to make easier of
using different languages in different versions and also different
software?

Also what is the problem with 14 year old device and software? It is
_working_. Or are you saying that you do not want to support _working_
device just because it is _old_? What is the logic here?

> > > 
> > > Ach :-( Is not there some configure option to disable python?
> > 
> > I don't know, but the qemu you are using seems to be 10 years old?
> 
> The Nokia N900 support never existed in upstream QEMU. Is is only in a
> Linaro repository that has not been update since 2015. (No clue why our
> CI uses the 2013 version and not the 2015 one.)

We are using the latest version which contains working n900 emulator. It
is written also in the u-boot documentation.

> I anybody cares about N900 being used in U-Boot's CI he should rework
> the N900 patch from the Linaro QEMU archive and get it integrated into
> upstream QEMU.

Why? Emulator was already written and it is _working_. Why to invest new
time for writing a new emul

Re: [PATCH] menu: Re-enable the ANSI codes

2023-06-24 Thread Tom Rini
On Sat, Jun 24, 2023 at 11:01:13AM +0200, Pali Rohár wrote:
> On Saturday 17 June 2023 22:28:24 Heinrich Schuchardt wrote:
> > On 6/17/23 12:48, Simon Glass wrote:
> > > Hi Pali,
> > > 
> > > On Thu, 15 Jun 2023 at 17:56, Pali Rohár  wrote:
> > > > 
> > > > On Thursday 15 June 2023 13:34:09 Simon Glass wrote:
> > > > > Hi Pali,
> > > > > 
> > > > > On Mon, 12 Jun 2023 at 22:33, Pali Rohár  wrote:
> > > > > > 
> > > > > > On Monday 12 June 2023 22:17:48 Simon Glass wrote:
> > > > > > > Hi Pali,
> > > > > > > 
> > > > > > > On Mon, 12 Jun 2023 at 21:22, Pali Rohár  wrote:
> > > > > > > > 
> > > > > > > > On Monday 12 June 2023 21:14:32 Simon Glass wrote:
> > > > > > > > > The intent here was to allow ANSI codes to be disabled, since 
> > > > > > > > > it was
> > > > > > > > > proving impoosible to test operation of the menu code when it 
> > > > > > > > > kept moving
> > > > > > > > > the cursor. Unfortunately this ended up in the patch.
> > > > > > > > > 
> > > > > > > > > Correct this by enabling ANSI again.
> > > > > > > > > 
> > > > > > > > > Signed-off-by: Simon Glass 
> > > > > > > > > Reported-by: Pali Rohár 
> > > > > > > > > Reported-by: Mark Kettenis 
> > > > > > > > > Reported-by: Frank Wunderlich 
> > > > > > > > > Fixes: 32bab0eae51b ("menu: Make use of CLI character 
> > > > > > > > > processing")
> > > > > > > > > ---
> > > > > > > > > 
> > > > > > > > >   common/menu.c | 2 +-
> > > > > > > > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > > > > > 
> > > > > > > > > diff --git a/common/menu.c b/common/menu.c
> > > > > > > > > index 94514177e4e9..b55cf7b99967 100644
> > > > > > > > > --- a/common/menu.c
> > > > > > > > > +++ b/common/menu.c
> > > > > > > > > @@ -15,7 +15,7 @@
> > > > > > > > > 
> > > > > > > > >   #include "menu.h"
> > > > > > > > > 
> > > > > > > > > -#define ansi 0
> > > > > > > > > +#define ansi 1
> > > > > > > > > 
> > > > > > > > >   /*
> > > > > > > > >* Internally, each item in a menu is represented by a 
> > > > > > > > > struct menu_item.
> > > > > > > > > --
> > > > > > > > > 2.41.0.162.gfafddb0af9-goog
> > > > > > > > > 
> > > > > > > > 
> > > > > > > > Hello, I have tested this change but bootmenu still does not 
> > > > > > > > work. There
> > > > > > > > is still same issue which I reported month ago. When I press 
> > > > > > > > DOWN key
> > > > > > > > then bootmenu immediately quit instead of moving into the next 
> > > > > > > > entry.
> > > > > > > 
> > > > > > > Thanks for testing this.
> > > > > > > 
> > > > > > > Is there a way for me to test this with sandbox? Or does your 
> > > > > > > Nokia
> > > > > > > test check it?
> > > > > > 
> > > > > > I guess that bootmenu command could work in sandbox. But I have not
> > > > > > tried it.
> > > > > > 
> > > > > > Nokia CI test does not try any terminal, keyboard or VGA 
> > > > > > interaction, so
> > > > > > broken rendering or broken keyboard input is not caught by CI.
> > > > > > 
> > > > > > But it is possible to test it manually. See U-Boot documentation 
> > > > > > how to
> > > > > > run Nokia u-boot image in qemu. Bootmenu is automatically started.
> > > > > > https://u-boot.readthedocs.io/en/latest/board/nokia/rx51.html#run-in-qemu
> > > > > 
> > > > > I tried to follow this but got stuck here:
> > > > > 
> > > > > ./configure --enable-system --target-list=arm-softmmu --disable-werror
> > > > > 
> > > > > ERROR: Cannot use 'python', Python 2.4 or later is required.
> > > > > Note that Python 3 or later is not yet supported.
> > > > > Use --python=/path/to/python to specify a supported Python.
> > > > > 
> > > > > Python 2 has been deprecated for years and I think it was removed 
> > > > > recently.
> 
> So install all required dependencies? It is really stupid argument to
> say that _I have removed X from my PC_ and then _I cannot compile Y
> because it depends on X_.

We're not talking about adding some random but modern dependency. We're
talking about adding a language that every person responsible for it
says to not use and migrate away from.  This is Heinrich's point.

> > Our Docker image uses Ubuntu 22.04 (Jammy). Ubuntu 22.10 (Kinetic) was
> > the last Ubuntu release providing Python 2.7. So when upgrading our
> > Docker image next year we will have to quit emulating that 14 year old
> > device.
> 
> Why to quit? Why you cannot compile and install required dependency?

We'll have to quit because Python 2.7 won't be available from the
distribution.  And no, we don't want to add building Python 2.7 to the
list of things our container does. I don't even know that Python 2.7
will compile with the gcc and related that will ship in the host. And
that's without repeating what I said above about Python 2.7 being a dead
and do not use language.

> Also was not the whole purpose of using containers to make easier of
> using different languages in different versions and also different
> software?

No, the point of containers here is to give everyone a common and
reproduci

Re: [PATCH] menu: Re-enable the ANSI codes

2023-06-17 Thread Heinrich Schuchardt

On 6/17/23 12:48, Simon Glass wrote:

Hi Pali,

On Thu, 15 Jun 2023 at 17:56, Pali Rohár  wrote:


On Thursday 15 June 2023 13:34:09 Simon Glass wrote:

Hi Pali,

On Mon, 12 Jun 2023 at 22:33, Pali Rohár  wrote:


On Monday 12 June 2023 22:17:48 Simon Glass wrote:

Hi Pali,

On Mon, 12 Jun 2023 at 21:22, Pali Rohár  wrote:


On Monday 12 June 2023 21:14:32 Simon Glass wrote:

The intent here was to allow ANSI codes to be disabled, since it was
proving impoosible to test operation of the menu code when it kept moving
the cursor. Unfortunately this ended up in the patch.

Correct this by enabling ANSI again.

Signed-off-by: Simon Glass 
Reported-by: Pali Rohár 
Reported-by: Mark Kettenis 
Reported-by: Frank Wunderlich 
Fixes: 32bab0eae51b ("menu: Make use of CLI character processing")
---

  common/menu.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/menu.c b/common/menu.c
index 94514177e4e9..b55cf7b99967 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -15,7 +15,7 @@

  #include "menu.h"

-#define ansi 0
+#define ansi 1

  /*
   * Internally, each item in a menu is represented by a struct menu_item.
--
2.41.0.162.gfafddb0af9-goog



Hello, I have tested this change but bootmenu still does not work. There
is still same issue which I reported month ago. When I press DOWN key
then bootmenu immediately quit instead of moving into the next entry.


Thanks for testing this.

Is there a way for me to test this with sandbox? Or does your Nokia
test check it?


I guess that bootmenu command could work in sandbox. But I have not
tried it.

Nokia CI test does not try any terminal, keyboard or VGA interaction, so
broken rendering or broken keyboard input is not caught by CI.

But it is possible to test it manually. See U-Boot documentation how to
run Nokia u-boot image in qemu. Bootmenu is automatically started.
https://u-boot.readthedocs.io/en/latest/board/nokia/rx51.html#run-in-qemu


I tried to follow this but got stuck here:

./configure --enable-system --target-list=arm-softmmu --disable-werror

ERROR: Cannot use 'python', Python 2.4 or later is required.
Note that Python 3 or later is not yet supported.
Use --python=/path/to/python to specify a supported Python.

Python 2 has been deprecated for years and I think it was removed recently.


Our Docker image uses Ubuntu 22.04 (Jammy). Ubuntu 22.10 (Kinetic) was
the last Ubuntu release providing Python 2.7. So when upgrading our
Docker image next year we will have to quit emulating that 14 year old
device.



Ach :-( Is not there some configure option to disable python?


I don't know, but the qemu you are using seems to be 10 years old?


The Nokia N900 support never existed in upstream QEMU. Is is only in a
Linaro repository that has not been update since 2015. (No clue why our
CI uses the 2013 version and not the 2015 one.)

I anybody cares about N900 being used in U-Boot's CI he should rework
the N900 patch from the Linaro QEMU archive and get it integrated into
upstream QEMU.

Best regards

Heinrich






In U-Boot CI is qemu compiling without issues (but variant without GUI).


You mean that it still uses python 2? But for how much longer?

I don't think it is reasonable to base a test on an old version of qemu.





Bootmenu is available on both VGA display and terminal output. Problem
with DOWN key is on the terminal.



I'm sure you have this commit:?

17b45e684af9 ("cli: Correct several bugs in cli_getch()")


Yes, as it is in the master branch already.


I tried the following with sandbox:

setenv bootmenu_0 "my item=echo item 0"
setenv bootmenu_1 "second item=echo item 1"
setenv bootmenu_delay 10
bootmenu

I see that with the ANSI patch the 'press key' prompt now appears in
the right place.

When I press down key repeatedly, it goes down until the last item and
then refuses to go any further.

So I can't repeat this problem.


Hm... so it looks like some ARM or UART specific thing... or something
which is not triggered by sandbox.

Just some suggestions, could you try to add some more entries? Or trying
to wait e.g. 30s before pressing another key (qemu is slow so there can
be some delay issue?)? Or could you try to run bootmenu on some real
hardware via UART?


I did get it going by hacking my machine.

I'll send a series with some debugging, etc. I am not quite sure what
the problem is, but it seems to be timing-related, or perhaps a bug in
the keyboard code (I found one bug already).




I tried looking at the Nokia code. The keyboard driver should be in
drivers/input, but I eventually found it in the board directory.

Are you sure that rx51_kp_tstc() behaves correctly? Can you add
debugging to see what codes it is emitting?

Also you don't need to generate escape sequences in rx51_kp_fill().
You can just use Ctrl-N, Ctrl-P, Ctrl-B and Ctrl-F (see cli_ch_esc()).
That should simplify things a bit.

If you can find a way to repeat this problem and have verified that
the Nokia code is correct, I can take an

Re: [PATCH] menu: Re-enable the ANSI codes

2023-06-17 Thread Simon Glass
Hi Pali,

On Thu, 15 Jun 2023 at 17:56, Pali Rohár  wrote:
>
> On Thursday 15 June 2023 13:34:09 Simon Glass wrote:
> > Hi Pali,
> >
> > On Mon, 12 Jun 2023 at 22:33, Pali Rohár  wrote:
> > >
> > > On Monday 12 June 2023 22:17:48 Simon Glass wrote:
> > > > Hi Pali,
> > > >
> > > > On Mon, 12 Jun 2023 at 21:22, Pali Rohár  wrote:
> > > > >
> > > > > On Monday 12 June 2023 21:14:32 Simon Glass wrote:
> > > > > > The intent here was to allow ANSI codes to be disabled, since it was
> > > > > > proving impoosible to test operation of the menu code when it kept 
> > > > > > moving
> > > > > > the cursor. Unfortunately this ended up in the patch.
> > > > > >
> > > > > > Correct this by enabling ANSI again.
> > > > > >
> > > > > > Signed-off-by: Simon Glass 
> > > > > > Reported-by: Pali Rohár 
> > > > > > Reported-by: Mark Kettenis 
> > > > > > Reported-by: Frank Wunderlich 
> > > > > > Fixes: 32bab0eae51b ("menu: Make use of CLI character processing")
> > > > > > ---
> > > > > >
> > > > > >  common/menu.c | 2 +-
> > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > >
> > > > > > diff --git a/common/menu.c b/common/menu.c
> > > > > > index 94514177e4e9..b55cf7b99967 100644
> > > > > > --- a/common/menu.c
> > > > > > +++ b/common/menu.c
> > > > > > @@ -15,7 +15,7 @@
> > > > > >
> > > > > >  #include "menu.h"
> > > > > >
> > > > > > -#define ansi 0
> > > > > > +#define ansi 1
> > > > > >
> > > > > >  /*
> > > > > >   * Internally, each item in a menu is represented by a struct 
> > > > > > menu_item.
> > > > > > --
> > > > > > 2.41.0.162.gfafddb0af9-goog
> > > > > >
> > > > >
> > > > > Hello, I have tested this change but bootmenu still does not work. 
> > > > > There
> > > > > is still same issue which I reported month ago. When I press DOWN key
> > > > > then bootmenu immediately quit instead of moving into the next entry.
> > > >
> > > > Thanks for testing this.
> > > >
> > > > Is there a way for me to test this with sandbox? Or does your Nokia
> > > > test check it?
> > >
> > > I guess that bootmenu command could work in sandbox. But I have not
> > > tried it.
> > >
> > > Nokia CI test does not try any terminal, keyboard or VGA interaction, so
> > > broken rendering or broken keyboard input is not caught by CI.
> > >
> > > But it is possible to test it manually. See U-Boot documentation how to
> > > run Nokia u-boot image in qemu. Bootmenu is automatically started.
> > > https://u-boot.readthedocs.io/en/latest/board/nokia/rx51.html#run-in-qemu
> >
> > I tried to follow this but got stuck here:
> >
> > ./configure --enable-system --target-list=arm-softmmu --disable-werror
> >
> > ERROR: Cannot use 'python', Python 2.4 or later is required.
> >Note that Python 3 or later is not yet supported.
> >Use --python=/path/to/python to specify a supported Python.
> >
> > Python 2 has been deprecated for years and I think it was removed recently.
>
> Ach :-( Is not there some configure option to disable python?

I don't know, but the qemu you are using seems to be 10 years old?

>
> In U-Boot CI is qemu compiling without issues (but variant without GUI).

You mean that it still uses python 2? But for how much longer?

I don't think it is reasonable to base a test on an old version of qemu.

>
> > >
> > > Bootmenu is available on both VGA display and terminal output. Problem
> > > with DOWN key is on the terminal.
> > >
> > > >
> > > > I'm sure you have this commit:?
> > > >
> > > > 17b45e684af9 ("cli: Correct several bugs in cli_getch()")
> > >
> > > Yes, as it is in the master branch already.
> >
> > I tried the following with sandbox:
> >
> > setenv bootmenu_0 "my item=echo item 0"
> > setenv bootmenu_1 "second item=echo item 1"
> > setenv bootmenu_delay 10
> > bootmenu
> >
> > I see that with the ANSI patch the 'press key' prompt now appears in
> > the right place.
> >
> > When I press down key repeatedly, it goes down until the last item and
> > then refuses to go any further.
> >
> > So I can't repeat this problem.
>
> Hm... so it looks like some ARM or UART specific thing... or something
> which is not triggered by sandbox.
>
> Just some suggestions, could you try to add some more entries? Or trying
> to wait e.g. 30s before pressing another key (qemu is slow so there can
> be some delay issue?)? Or could you try to run bootmenu on some real
> hardware via UART?

I did get it going by hacking my machine.

I'll send a series with some debugging, etc. I am not quite sure what
the problem is, but it seems to be timing-related, or perhaps a bug in
the keyboard code (I found one bug already).

>
> > I tried looking at the Nokia code. The keyboard driver should be in
> > drivers/input, but I eventually found it in the board directory.
> >
> > Are you sure that rx51_kp_tstc() behaves correctly? Can you add
> > debugging to see what codes it is emitting?
> >
> > Also you don't need to generate escape sequences in rx51_kp_fill().
> > You can just use Ctrl-N, Ctrl-P, Ctrl-B and Ctrl-F (see cli_ch

Re: [PATCH] menu: Re-enable the ANSI codes

2023-06-15 Thread Peng Fan




On 6/13/2023 4:14 AM, Simon Glass wrote:

Caution: This is an external email. Please take care when clicking links or 
opening attachments. When in doubt, report the message using the 'Report this 
email' button


The intent here was to allow ANSI codes to be disabled, since it was
proving impoosible to test operation of the menu code when it kept moving
the cursor. Unfortunately this ended up in the patch.


Typo: impoosible->impossible.



Correct this by enabling ANSI again.

Signed-off-by: Simon Glass 
Reported-by: Pali Rohár 
Reported-by: Mark Kettenis 
Reported-by: Frank Wunderlich 
Fixes: 32bab0eae51b ("menu: Make use of CLI character processing")
---

  common/menu.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/menu.c b/common/menu.c
index 94514177e4e9..b55cf7b99967 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -15,7 +15,7 @@

  #include "menu.h"

-#define ansi 0
+#define ansi 1

  /*
   * Internally, each item in a menu is represented by a struct menu_item.
--
2.41.0.162.gfafddb0af9-goog



Re: [PATCH] menu: Re-enable the ANSI codes

2023-06-15 Thread Pali Rohár
On Thursday 15 June 2023 13:34:09 Simon Glass wrote:
> Hi Pali,
> 
> On Mon, 12 Jun 2023 at 22:33, Pali Rohár  wrote:
> >
> > On Monday 12 June 2023 22:17:48 Simon Glass wrote:
> > > Hi Pali,
> > >
> > > On Mon, 12 Jun 2023 at 21:22, Pali Rohár  wrote:
> > > >
> > > > On Monday 12 June 2023 21:14:32 Simon Glass wrote:
> > > > > The intent here was to allow ANSI codes to be disabled, since it was
> > > > > proving impoosible to test operation of the menu code when it kept 
> > > > > moving
> > > > > the cursor. Unfortunately this ended up in the patch.
> > > > >
> > > > > Correct this by enabling ANSI again.
> > > > >
> > > > > Signed-off-by: Simon Glass 
> > > > > Reported-by: Pali Rohár 
> > > > > Reported-by: Mark Kettenis 
> > > > > Reported-by: Frank Wunderlich 
> > > > > Fixes: 32bab0eae51b ("menu: Make use of CLI character processing")
> > > > > ---
> > > > >
> > > > >  common/menu.c | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/common/menu.c b/common/menu.c
> > > > > index 94514177e4e9..b55cf7b99967 100644
> > > > > --- a/common/menu.c
> > > > > +++ b/common/menu.c
> > > > > @@ -15,7 +15,7 @@
> > > > >
> > > > >  #include "menu.h"
> > > > >
> > > > > -#define ansi 0
> > > > > +#define ansi 1
> > > > >
> > > > >  /*
> > > > >   * Internally, each item in a menu is represented by a struct 
> > > > > menu_item.
> > > > > --
> > > > > 2.41.0.162.gfafddb0af9-goog
> > > > >
> > > >
> > > > Hello, I have tested this change but bootmenu still does not work. There
> > > > is still same issue which I reported month ago. When I press DOWN key
> > > > then bootmenu immediately quit instead of moving into the next entry.
> > >
> > > Thanks for testing this.
> > >
> > > Is there a way for me to test this with sandbox? Or does your Nokia
> > > test check it?
> >
> > I guess that bootmenu command could work in sandbox. But I have not
> > tried it.
> >
> > Nokia CI test does not try any terminal, keyboard or VGA interaction, so
> > broken rendering or broken keyboard input is not caught by CI.
> >
> > But it is possible to test it manually. See U-Boot documentation how to
> > run Nokia u-boot image in qemu. Bootmenu is automatically started.
> > https://u-boot.readthedocs.io/en/latest/board/nokia/rx51.html#run-in-qemu
> 
> I tried to follow this but got stuck here:
> 
> ./configure --enable-system --target-list=arm-softmmu --disable-werror
> 
> ERROR: Cannot use 'python', Python 2.4 or later is required.
>Note that Python 3 or later is not yet supported.
>Use --python=/path/to/python to specify a supported Python.
> 
> Python 2 has been deprecated for years and I think it was removed recently.

Ach :-( Is not there some configure option to disable python?

In U-Boot CI is qemu compiling without issues (but variant without GUI).

> >
> > Bootmenu is available on both VGA display and terminal output. Problem
> > with DOWN key is on the terminal.
> >
> > >
> > > I'm sure you have this commit:?
> > >
> > > 17b45e684af9 ("cli: Correct several bugs in cli_getch()")
> >
> > Yes, as it is in the master branch already.
> 
> I tried the following with sandbox:
> 
> setenv bootmenu_0 "my item=echo item 0"
> setenv bootmenu_1 "second item=echo item 1"
> setenv bootmenu_delay 10
> bootmenu
> 
> I see that with the ANSI patch the 'press key' prompt now appears in
> the right place.
> 
> When I press down key repeatedly, it goes down until the last item and
> then refuses to go any further.
> 
> So I can't repeat this problem.

Hm... so it looks like some ARM or UART specific thing... or something
which is not triggered by sandbox.

Just some suggestions, could you try to add some more entries? Or trying
to wait e.g. 30s before pressing another key (qemu is slow so there can
be some delay issue?)? Or could you try to run bootmenu on some real
hardware via UART?

> I tried looking at the Nokia code. The keyboard driver should be in
> drivers/input, but I eventually found it in the board directory.
> 
> Are you sure that rx51_kp_tstc() behaves correctly? Can you add
> debugging to see what codes it is emitting?
> 
> Also you don't need to generate escape sequences in rx51_kp_fill().
> You can just use Ctrl-N, Ctrl-P, Ctrl-B and Ctrl-F (see cli_ch_esc()).
> That should simplify things a bit.
> 
> If you can find a way to repeat this problem and have verified that
> the Nokia code is correct, I can take another look.

Problem with DOWN key is on the terminal, not on the screen or keyboard.
So all those rx51_kp_tstc() and rx51_kp_fill() should not be the cause
(unless some input/output multiplexing in u-boot takes a role).

Terminal to qemu is connected via qemu's UART emulation, so omap2 uart
driver in this case is the one which connects u-boot to the qemu's UART
emulation.

> Regards,
> Simon
> 
> [1] 
> https://patchwork.ozlabs.org/project/uboot/patch/20230612201434.861700-1-...@chromium.org/


Re: [PATCH] menu: Re-enable the ANSI codes

2023-06-15 Thread Simon Glass
Hi Pali,

On Mon, 12 Jun 2023 at 22:33, Pali Rohár  wrote:
>
> On Monday 12 June 2023 22:17:48 Simon Glass wrote:
> > Hi Pali,
> >
> > On Mon, 12 Jun 2023 at 21:22, Pali Rohár  wrote:
> > >
> > > On Monday 12 June 2023 21:14:32 Simon Glass wrote:
> > > > The intent here was to allow ANSI codes to be disabled, since it was
> > > > proving impoosible to test operation of the menu code when it kept 
> > > > moving
> > > > the cursor. Unfortunately this ended up in the patch.
> > > >
> > > > Correct this by enabling ANSI again.
> > > >
> > > > Signed-off-by: Simon Glass 
> > > > Reported-by: Pali Rohár 
> > > > Reported-by: Mark Kettenis 
> > > > Reported-by: Frank Wunderlich 
> > > > Fixes: 32bab0eae51b ("menu: Make use of CLI character processing")
> > > > ---
> > > >
> > > >  common/menu.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/common/menu.c b/common/menu.c
> > > > index 94514177e4e9..b55cf7b99967 100644
> > > > --- a/common/menu.c
> > > > +++ b/common/menu.c
> > > > @@ -15,7 +15,7 @@
> > > >
> > > >  #include "menu.h"
> > > >
> > > > -#define ansi 0
> > > > +#define ansi 1
> > > >
> > > >  /*
> > > >   * Internally, each item in a menu is represented by a struct 
> > > > menu_item.
> > > > --
> > > > 2.41.0.162.gfafddb0af9-goog
> > > >
> > >
> > > Hello, I have tested this change but bootmenu still does not work. There
> > > is still same issue which I reported month ago. When I press DOWN key
> > > then bootmenu immediately quit instead of moving into the next entry.
> >
> > Thanks for testing this.
> >
> > Is there a way for me to test this with sandbox? Or does your Nokia
> > test check it?
>
> I guess that bootmenu command could work in sandbox. But I have not
> tried it.
>
> Nokia CI test does not try any terminal, keyboard or VGA interaction, so
> broken rendering or broken keyboard input is not caught by CI.
>
> But it is possible to test it manually. See U-Boot documentation how to
> run Nokia u-boot image in qemu. Bootmenu is automatically started.
> https://u-boot.readthedocs.io/en/latest/board/nokia/rx51.html#run-in-qemu

I tried to follow this but got stuck here:

./configure --enable-system --target-list=arm-softmmu --disable-werror

ERROR: Cannot use 'python', Python 2.4 or later is required.
   Note that Python 3 or later is not yet supported.
   Use --python=/path/to/python to specify a supported Python.

Python 2 has been deprecated for years and I think it was removed recently.

>
> Bootmenu is available on both VGA display and terminal output. Problem
> with DOWN key is on the terminal.
>
> >
> > I'm sure you have this commit:?
> >
> > 17b45e684af9 ("cli: Correct several bugs in cli_getch()")
>
> Yes, as it is in the master branch already.

I tried the following with sandbox:

setenv bootmenu_0 "my item=echo item 0"
setenv bootmenu_1 "second item=echo item 1"
setenv bootmenu_delay 10
bootmenu

I see that with the ANSI patch the 'press key' prompt now appears in
the right place.

When I press down key repeatedly, it goes down until the last item and
then refuses to go any further.

So I can't repeat this problem.

I tried looking at the Nokia code. The keyboard driver should be in
drivers/input, but I eventually found it in the board directory.

Are you sure that rx51_kp_tstc() behaves correctly? Can you add
debugging to see what codes it is emitting?

Also you don't need to generate escape sequences in rx51_kp_fill().
You can just use Ctrl-N, Ctrl-P, Ctrl-B and Ctrl-F (see cli_ch_esc()).
That should simplify things a bit.

If you can find a way to repeat this problem and have verified that
the Nokia code is correct, I can take another look.

Regards,
Simon

[1] 
https://patchwork.ozlabs.org/project/uboot/patch/20230612201434.861700-1-...@chromium.org/


Re: [PATCH] menu: Re-enable the ANSI codes

2023-06-13 Thread Mark Kettenis
> From: Simon Glass 
> Date: Mon, 12 Jun 2023 21:14:32 +0100
> 
> The intent here was to allow ANSI codes to be disabled, since it was
> proving impoosible to test operation of the menu code when it kept moving
> the cursor. Unfortunately this ended up in the patch.
> 
> Correct this by enabling ANSI again.
> 
> Signed-off-by: Simon Glass 
> Reported-by: Pali Rohár 
> Reported-by: Mark Kettenis 
> Reported-by: Frank Wunderlich 
> Fixes: 32bab0eae51b ("menu: Make use of CLI character processing")

Tested-by: Mark Kettenis 
Reviewed-by: Mark Kettenis 

> ---
> 
>  common/menu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/menu.c b/common/menu.c
> index 94514177e4e9..b55cf7b99967 100644
> --- a/common/menu.c
> +++ b/common/menu.c
> @@ -15,7 +15,7 @@
>  
>  #include "menu.h"
>  
> -#define ansi 0
> +#define ansi 1
>  
>  /*
>   * Internally, each item in a menu is represented by a struct menu_item.
> -- 
> 2.41.0.162.gfafddb0af9-goog
> 
> 


Re: [PATCH] menu: Re-enable the ANSI codes

2023-06-12 Thread Pali Rohár
On Monday 12 June 2023 22:17:48 Simon Glass wrote:
> Hi Pali,
> 
> On Mon, 12 Jun 2023 at 21:22, Pali Rohár  wrote:
> >
> > On Monday 12 June 2023 21:14:32 Simon Glass wrote:
> > > The intent here was to allow ANSI codes to be disabled, since it was
> > > proving impoosible to test operation of the menu code when it kept moving
> > > the cursor. Unfortunately this ended up in the patch.
> > >
> > > Correct this by enabling ANSI again.
> > >
> > > Signed-off-by: Simon Glass 
> > > Reported-by: Pali Rohár 
> > > Reported-by: Mark Kettenis 
> > > Reported-by: Frank Wunderlich 
> > > Fixes: 32bab0eae51b ("menu: Make use of CLI character processing")
> > > ---
> > >
> > >  common/menu.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/common/menu.c b/common/menu.c
> > > index 94514177e4e9..b55cf7b99967 100644
> > > --- a/common/menu.c
> > > +++ b/common/menu.c
> > > @@ -15,7 +15,7 @@
> > >
> > >  #include "menu.h"
> > >
> > > -#define ansi 0
> > > +#define ansi 1
> > >
> > >  /*
> > >   * Internally, each item in a menu is represented by a struct menu_item.
> > > --
> > > 2.41.0.162.gfafddb0af9-goog
> > >
> >
> > Hello, I have tested this change but bootmenu still does not work. There
> > is still same issue which I reported month ago. When I press DOWN key
> > then bootmenu immediately quit instead of moving into the next entry.
> 
> Thanks for testing this.
> 
> Is there a way for me to test this with sandbox? Or does your Nokia
> test check it?

I guess that bootmenu command could work in sandbox. But I have not
tried it.

Nokia CI test does not try any terminal, keyboard or VGA interaction, so
broken rendering or broken keyboard input is not caught by CI.

But it is possible to test it manually. See U-Boot documentation how to
run Nokia u-boot image in qemu. Bootmenu is automatically started.
https://u-boot.readthedocs.io/en/latest/board/nokia/rx51.html#run-in-qemu

Bootmenu is available on both VGA display and terminal output. Problem
with DOWN key is on the terminal.

> 
> I'm sure you have this commit:?
> 
> 17b45e684af9 ("cli: Correct several bugs in cli_getch()")

Yes, as it is in the master branch already.

> Regards,
> Simon


Re: [PATCH] menu: Re-enable the ANSI codes

2023-06-12 Thread Simon Glass
Hi Pali,

On Mon, 12 Jun 2023 at 21:22, Pali Rohár  wrote:
>
> On Monday 12 June 2023 21:14:32 Simon Glass wrote:
> > The intent here was to allow ANSI codes to be disabled, since it was
> > proving impoosible to test operation of the menu code when it kept moving
> > the cursor. Unfortunately this ended up in the patch.
> >
> > Correct this by enabling ANSI again.
> >
> > Signed-off-by: Simon Glass 
> > Reported-by: Pali Rohár 
> > Reported-by: Mark Kettenis 
> > Reported-by: Frank Wunderlich 
> > Fixes: 32bab0eae51b ("menu: Make use of CLI character processing")
> > ---
> >
> >  common/menu.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/common/menu.c b/common/menu.c
> > index 94514177e4e9..b55cf7b99967 100644
> > --- a/common/menu.c
> > +++ b/common/menu.c
> > @@ -15,7 +15,7 @@
> >
> >  #include "menu.h"
> >
> > -#define ansi 0
> > +#define ansi 1
> >
> >  /*
> >   * Internally, each item in a menu is represented by a struct menu_item.
> > --
> > 2.41.0.162.gfafddb0af9-goog
> >
>
> Hello, I have tested this change but bootmenu still does not work. There
> is still same issue which I reported month ago. When I press DOWN key
> then bootmenu immediately quit instead of moving into the next entry.

Thanks for testing this.

Is there a way for me to test this with sandbox? Or does your Nokia
test check it?

I'm sure you have this commit:?

17b45e684af9 ("cli: Correct several bugs in cli_getch()")

Regards,
Simon


Re: [PATCH] menu: Re-enable the ANSI codes

2023-06-12 Thread Pali Rohár
On Monday 12 June 2023 21:14:32 Simon Glass wrote:
> The intent here was to allow ANSI codes to be disabled, since it was
> proving impoosible to test operation of the menu code when it kept moving
> the cursor. Unfortunately this ended up in the patch.
> 
> Correct this by enabling ANSI again.
> 
> Signed-off-by: Simon Glass 
> Reported-by: Pali Rohár 
> Reported-by: Mark Kettenis 
> Reported-by: Frank Wunderlich 
> Fixes: 32bab0eae51b ("menu: Make use of CLI character processing")
> ---
> 
>  common/menu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/menu.c b/common/menu.c
> index 94514177e4e9..b55cf7b99967 100644
> --- a/common/menu.c
> +++ b/common/menu.c
> @@ -15,7 +15,7 @@
>  
>  #include "menu.h"
>  
> -#define ansi 0
> +#define ansi 1
>  
>  /*
>   * Internally, each item in a menu is represented by a struct menu_item.
> -- 
> 2.41.0.162.gfafddb0af9-goog
> 

Hello, I have tested this change but bootmenu still does not work. There
is still same issue which I reported month ago. When I press DOWN key
then bootmenu immediately quit instead of moving into the next entry.


[PATCH] menu: Re-enable the ANSI codes

2023-06-12 Thread Simon Glass
The intent here was to allow ANSI codes to be disabled, since it was
proving impoosible to test operation of the menu code when it kept moving
the cursor. Unfortunately this ended up in the patch.

Correct this by enabling ANSI again.

Signed-off-by: Simon Glass 
Reported-by: Pali Rohár 
Reported-by: Mark Kettenis 
Reported-by: Frank Wunderlich 
Fixes: 32bab0eae51b ("menu: Make use of CLI character processing")
---

 common/menu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/menu.c b/common/menu.c
index 94514177e4e9..b55cf7b99967 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -15,7 +15,7 @@
 
 #include "menu.h"
 
-#define ansi 0
+#define ansi 1
 
 /*
  * Internally, each item in a menu is represented by a struct menu_item.
-- 
2.41.0.162.gfafddb0af9-goog