[PATCH 08/10] boot: drop the dyn infix from the bootentries bootargs variable
Sascha Hauer
s.hauer at pengutronix.de
Thu Nov 12 05:07:49 PST 2026
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 at 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 |
More information about the barebox
mailing list