Hi vagrant,

On Thu, Nov 17, 2022 at 09:01:59AM -0800, Vagrant Cascadian wrote:
> On 2022-11-17, Manuel Traut wrote:
> > during testing on the imx6 colibri board i recognized
> > that the prompt value of extlinux.conf is ignored.
> >
> > The attached patch fixes the problem.
> 
> Could you spell this out in a little more detail exactly what is
> missing? Maybe cut-and-paste what it looks like with and without the
> patch applied?

regarding the documentation if there is

prompt = 0

in the extlinux.conf it shall not ask the user for input.

In combination with timeout = 0 it boots directly into the configured
target.

https://github.com/u-boot/u-boot/blob/master/common/menu.c#L347

However this does not work, because prompt is set to one per default
in the source code and is not read from the extlinux.conf

https://github.com/u-boot/u-boot/blob/master/boot/pxe_utils.c#L1328

> I'm also curious why this is noticed with the imx6 colibri board and
> presumably not other boards... I have definitely used the
> pxeboot/extlinux functionality with many other boards (maybe I'm not
> using this specific functionality in this code path, though).

This feature is probably broken for all boards.
Maybe ordinary users are fine with having a 1 second timeout, however
in our use-case booting as fast as possible is important.

> > Can it be added to debian or shall I try to submit
> > it upstream first?
> 
> Submitting something like this upstream is always a good idea. Feel free
> to CC me. I suspect upstream will want more verbosity in the error
> description too...

Ok, I will do so tomorrow and add you to Cc.

Thanks for your support
Manuel

> Depending on how that goes, I'll consider applying and/or backporting in
> Debian.
> 
> Thanks!
> 
> live well,
>   vagrant
> 
> > From: Manuel Traut <manuel.tr...@mt.com>
> > Date: Thu, 17 Nov 2022 16:38:47 +0100
> > Subject: distro/pxe boot: read prompt value from config
> >
> > Currently the configuration of prompt in extlinux.conf is
> > ignored.
> >
> > Read it from the file, if not given do not fail.
> >
> > Signed-off-by: Manuel Traut <manuel.tr...@mt.com>
> > ---
> >  boot/pxe_utils.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c
> > index 8133006..a6c56e0 100644
> > --- a/boot/pxe_utils.c
> > +++ b/boot/pxe_utils.c
> > @@ -1359,7 +1359,10 @@ static int parse_pxefile_top(struct pxe_context 
> > *ctx, char *p, unsigned long bas
> >                     break;
> >  
> >             case T_PROMPT:
> > -                   eol_or_eof(&p);
> > +                   err = parse_integer(&p, &cfg->prompt);
> > +                   // Do not fail if prompt configuration is missing
> > +            if (err <  0)
> > +                       eol_or_eof(&p);
> >                     break;
> >  
> >             case T_EOL:

Reply via email to