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 4/5] boot: implement devboot in C
Date: Fri, 13 Nov 2026 09:48:54 +0000	[thread overview]
Message-ID: <7b2bfabf-37f1-4990-a574-5d7625fbb65b@pengutronix.de> (raw)
In-Reply-To: <0296ef44-3043-49f2-b5c4-959cbd4d72f0@pengutronix.de>

On 2026-11-13 08:51, Ahmad Fatoum wrote:
> Hi,
> 
> On 10/30/26 3:13 PM, Sascha Hauer wrote:
> > devboot is a shell script that brings up the network, sources a per-user,
> > per-board script from global.net.fetchdir and translates the variables it
> > sets into boot -o options. Being a script on top of the boot command, it
> > has a hard time integrating with it: The kernel command line fragments
> > the devboot script sets have to be put into the linux.bootargs.devboot.
> > namespace to be removed afterwards,
> 
> That's resolved by your scoped/stashed/banked globalvar series now,
> isn't it?

Yes, resolved already, this doesn't count for the motivation of this
patch anymore.

> 
> > and the devboot boot target needed
> > to boot with devboot by default takes only a single boot target and boot
> > options.
> 
> So instead of:
> 
> boot -D mmc1 mmc2
> 
> one had to do
> 
> boot devboot@mmc1 devboot@mmc2
> 
> I don't consider that so bad.

It's not so much about the "boot -D mmc1 mmc2" vs. "boot devboot@mmc1
devboot@mmc2", but more that there are too many ways to archieve the
same thing:

- plain "boot" with global.boot.default="devboot@mmc1"
- plain "devboot" with global.boot.default="mmc1"
- plain "devboot" with global.boot.default="devboot@mmc1"

The last line works, but sources the devboot script twice. There was no
way to do a devboot by default for the existing global.boot.default="mmc1"
entry. A plain "devboot" without arguments work, but making it the
default required us to use the "boot" command along with altering
global.boot.default

I think using a flag (-D, global.boot.devboot) makes usage more
consistent.

> > @@ -163,6 +173,16 @@ static int do_boot(int argc, char *argv[])
> >  		next = next_word;
> >  	}
> >  
> > +	/* like -o, devboot doesn't apply to entries booted from the menu */
> > +	if (do_devboot && !do_list && !do_menu) {
> > +		devboot = devboot_start(&overrides);
> > +		if (IS_ERR(devboot)) {
> > +			ret = PTR_ERR(devboot);
> > +			free(freep);
> > +			goto out_overrides;
> > +		}
> > +	}
> 
> That sounds like a bug with the devboot implementation. If you don't
> want to fix it, I think this should have the command fail instead of
> silently ignoring -D.

Right. This should be fixed rather than copying the behaviour to the new
implementation.

Sascha

--
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-13  9:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30 14:13 [PATCH 0/5] " Sascha Hauer
2026-10-30 14:13 ` [PATCH 1/5] boot: report the exit status of failing boot scripts Sascha Hauer
2026-11-12  8:50   ` Ahmad Fatoum
2026-10-30 14:13 ` [PATCH 2/5] hush: export source_script() Sascha Hauer
2026-11-12  8:47   ` Ahmad Fatoum
2026-10-30 14:13 ` [PATCH 3/5] boot: hand overrides on to nested boots and the bootm command Sascha Hauer
2026-11-13  8:52   ` Ahmad Fatoum
2026-10-30 14:13 ` [PATCH 4/5] boot: implement devboot in C Sascha Hauer
2026-11-13  7:51   ` Ahmad Fatoum
2026-11-13  9:48     ` Sascha Hauer [this message]
2026-10-30 14:13 ` [PATCH 5/5] sandbox: defconfig: enable boot overrides and devboot Sascha Hauer
2026-11-12  8:48   ` 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=7b2bfabf-37f1-4990-a574-5d7625fbb65b@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