mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Sascha Hauer" <s.hauer@pengutronix.de>
To: "Ahmad Fatoum" <a.fatoum@pengutronix.de>
Cc: BAREBOX <barebox@lists.infradead.org>
Subject: Re: [PATCH 08/10] boot: drop the dyn infix from the bootentries bootargs variable
Date: Thu, 12 Nov 2026 13:07:49 +0000	[thread overview]
Message-ID: <66529dc7-f965-4202-a2d3-c67e561ebedd@pengutronix.de> (raw)
In-Reply-To: <732b6ad0-6446-46a4-9135-bb70d9657152@pengutronix.de>

On 2026-11-12 09:02, Ahmad Fatoum wrote:
> On 10/30/26 11:54, Sascha Hauer wrote:
> > blspec and extlinux pass the options of a boot entry to the Kernel in
> > global.linux.bootargs.dyn.bootentries. The dyn infix used to be
> > necessary for boot_entry() to clear the variable again after a boot
> > entry returned. Now that boot_entry() reverts all changes to
> > global.linux.bootargs.* anyway, it no longer carries any meaning, so
> > name the variable global.linux.bootargs.bootentries.
> > 
> > As the variables are concatenated in lexicographical order, the boot
> > entry options may end up at a different position in the command line.
> 
> I feel uneasy about this. I would rather leave the old name, even if the
> dyn. serves no purpose any longer just to avoid introducing subtle
> breakage where scripts are overriding something an argument from
> the blspec.
> 
> Is that ok for you?

It's ok to drop this patch for now I guess. Anyway, the current order is
more like an accident rather than well defined.

With global.linux.bootargs.console=console=ttymxc0,115200 currently the
console= argument would be overwritten by a bootspec entry, but
global.linux.bootargs.earlycon would not be overwritable.

So while we should not potentially break stuff for this rather cosmetic
change, we should look into it how to make this less random.

Sascha

> 
> > 
> > Assisted-by: Claude:claude-opus-5-5
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> >  common/blspec.c   | 2 +-
> >  common/extlinux.c | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/common/blspec.c b/common/blspec.c
> > index 0552e93b79..e2fa4956e9 100644
> > --- a/common/blspec.c
> > +++ b/common/blspec.c
> > @@ -128,7 +128,7 @@ static int blspec_boot(struct bootentry *be, int verbose, int dryrun)
> >  	if (initrd)
> >  		data.initrd_file = basprintf("%s/%s", abspath, initrd);
> >  
> > -	globalvar_add_simple("linux.bootargs.dyn.bootentries", options);
> > +	globalvar_add_simple("linux.bootargs.bootentries", options);
> >  
> >  	appendroot = blspec_entry_var_get(entry, "linux-appendroot");
> >  	if (appendroot) {
> > diff --git a/common/extlinux.c b/common/extlinux.c
> > index 1976fe09aa..f502bffc7d 100644
> > --- a/common/extlinux.c
> > +++ b/common/extlinux.c
> > @@ -68,7 +68,7 @@ static int extlinux_boot(struct bootentry *entry, int verbose, int dryrun)
> >  	}
> >  
> >  	if (e->append)
> > -		globalvar_add_simple("linux.bootargs.dyn.bootentries",
> > +		globalvar_add_simple("linux.bootargs.bootentries",
> >  				     e->append);
> >  
> >  	pr_info("Booting extlinux label '%s'\n", e->label);
> > 
> 
> 
> -- 
> Pengutronix e.K.                           |                             |
> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




  reply	other threads:[~2026-11-12 13:09 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30 10:53 [PATCH 00/10] boot: revert boot related globalvars after booting Sascha Hauer
2026-10-30 10:53 ` [PATCH 01/10] globalvar: add scopes to snapshot and restore globalvars Sascha Hauer
2026-11-12  8:41   ` Ahmad Fatoum
2026-11-12 13:25     ` Sascha Hauer
2026-11-12 13:27       ` Ahmad Fatoum
2026-10-30 10:54 ` [PATCH 02/10] bootm: revert globalvar changes in bootm_boot_cleanup() Sascha Hauer
2026-11-12  7:48   ` Ahmad Fatoum
2026-10-30 10:54 ` [PATCH 03/10] boot: revert globalvar changes after each boot entry Sascha Hauer
2026-11-12  7:48   ` Ahmad Fatoum
2026-10-30 10:54 ` [PATCH 04/10] bootchooser: use a globalvar scope for its bootargs Sascha Hauer
2026-11-12  7:49   ` Ahmad Fatoum
2026-10-30 10:54 ` [PATCH 05/10] test: py: add test for reverting globalvars after boot Sascha Hauer
2026-11-12  7:51   ` Ahmad Fatoum
2026-10-30 10:54 ` [PATCH 06/10] bootargs: remove unused linux_bootargs_overwrite() Sascha Hauer
2026-11-12  7:52   ` Ahmad Fatoum
2026-10-30 10:54 ` [PATCH 07/10] of: add watchdog bootarg directly instead of via a globalvar Sascha Hauer
2026-11-12  7:59   ` Ahmad Fatoum
2026-10-30 10:54 ` [PATCH 08/10] boot: drop the dyn infix from the bootentries bootargs variable Sascha Hauer
2026-11-12  8:02   ` Ahmad Fatoum
2026-11-12 13:07     ` Sascha Hauer [this message]
2026-10-30 10:54 ` [PATCH 09/10] defaultenv: don't use global.linux.bootargs.dyn.* in boot entries Sascha Hauer
2026-11-12  8:19   ` Ahmad Fatoum
2026-10-30 10:54 ` [PATCH 10/10] Documentation: migration-guides: describe reverting boot globalvars Sascha Hauer
2026-11-12  8:21   ` Ahmad Fatoum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=66529dc7-f965-4202-a2d3-c67e561ebedd@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox