Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1024329: u-boot: extlinux.conf prompt value is ignored

20 views
Skip to first unread message

Manuel Traut

unread,
Nov 17, 2022, 11:30:04 AM11/17/22
to
Source: u-boot
Version: 2021.01+dfsg-5
Severity: normal
Tags: patch
X-Debbugs-Cc: manuel...@mt.com

Hi vagrant,

during testing on the imx6 colibri board i recognized
that the prompt value of extlinux.conf is ignored.

The attached patch fixes the problem.

Can it be added to debian or shall I try to submit
it upstream first?

cu, Manuel
0011-distro-pxe-boot-read-prompt-value-from-config.patch

Vagrant Cascadian

unread,
Nov 17, 2022, 12:10:04 PM11/17/22
to
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?

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).


> 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...

Depending on how that goes, I'll consider applying and/or backporting in
Debian.

Thanks!

live well,
vagrant

> From: Manuel Traut <manuel...@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...@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:
signature.asc

Manuel Traut

unread,
Nov 17, 2022, 1:10:03 PM11/17/22
to
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

Vagrant Cascadian

unread,
Nov 25, 2022, 4:00:03 PM11/25/22
to
Control: forwarded 1024329 https://lists.denx.de/pipermail/u-boot/2022-November/499967.html

Thanks for taking it upstream!

Sorry I have not gotten a chance to confirm this myself just yet. Also
looking for more people to CC upstream to get some more eyes on it to
avoid it languishing indefinitely...


live well,
vagrant
signature.asc
0 new messages