From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
BAREBOX <barebox@lists.infradead.org>
Subject: Re: [PATCH 09/10] defaultenv: don't use global.linux.bootargs.dyn.* in boot entries
Date: Thu, 12 Nov 2026 09:19:42 +0100 [thread overview]
Message-ID: <55e296a7-8d50-46db-ab5c-a719ee79166b@pengutronix.de> (raw)
In-Reply-To: <20261030-boot-globalvar-stack-v1-9-a03803e1100c@pengutronix.de>
On 10/30/26 11:54, Sascha Hauer wrote:
> Boot entries no longer need to put their Kernel command line options
> into global.linux.bootargs.dyn.*, as boot_entry() reverts all changes to
> global.linux.bootargs.* when the boot entry returns. Use plain names in
> the net and dfu boot entries, the boot entry template and the matching
> example in the documentation.
>
> Unlike the dyn.ip and dyn.root variables, which bootscript_boot()
> creates for compatibility with existing boot scripts, the new variables
> don't exist beforehand, so create them with the global command.
>
> Assisted-by: Claude:claude-opus-5-5
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> Documentation/user/booting-linux.rst | 5 +++--
> defaultenv/defaultenv-2-base/boot/net | 5 +++--
> defaultenv/defaultenv-2-base/data/boot-template | 2 +-
> defaultenv/defaultenv-2-dfu/boot/dfu | 4 ++--
> 4 files changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/Documentation/user/booting-linux.rst b/Documentation/user/booting-linux.rst
> index 158aa8b313..85f7694fe8 100644
> --- a/Documentation/user/booting-linux.rst
> +++ b/Documentation/user/booting-linux.rst
> @@ -442,9 +442,10 @@ If the preconfigured paths or names are not suitable, they can be adjusted in
> fi
>
> nfsroot="/home/${global.user}/nfsroot/${global.hostname}"
> - ip_route_get -b ${global.net.server} global.linux.bootargs.dyn.ip
> + global linux.bootargs.ip
> + ip_route_get -b ${global.net.server} global.linux.bootargs.ip
>
> - global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"
> + global linux.bootargs.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"
>
> ``boot net`` will then retrieve the kernel (and also the device tree and
> initramfs, if used) over TFTP and boot it.
> diff --git a/defaultenv/defaultenv-2-base/boot/net b/defaultenv/defaultenv-2-base/boot/net
> index 8408ceaf39..f025bb4098 100644
> --- a/defaultenv/defaultenv-2-base/boot/net
> +++ b/defaultenv/defaultenv-2-base/boot/net
> @@ -23,6 +23,7 @@ if [ -f "${initramfs}" ]; then
> global.bootm.initrd="$initramfs"
> else
> nfsroot="${nfsserver}:/home/${global.user}/nfsroot/${global.hostname}"
> - ip_route_get -b ${global.net.server} global.linux.bootargs.dyn.ip
> - global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"
> + global linux.bootargs.ip
> + ip_route_get -b ${global.net.server} global.linux.bootargs.ip
> + global linux.bootargs.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"
> fi
> diff --git a/defaultenv/defaultenv-2-base/data/boot-template b/defaultenv/defaultenv-2-base/data/boot-template
> index 689d98e1e9..b63eb86d1a 100644
> --- a/defaultenv/defaultenv-2-base/data/boot-template
> +++ b/defaultenv/defaultenv-2-base/data/boot-template
> @@ -6,4 +6,4 @@ global.bootm.image=<path to image>
>
> #bootargs-ip
>
> -global.linux.bootargs.dyn.root="root=<rootfs here>"
> +global linux.bootargs.root="root=<rootfs here>"
> diff --git a/defaultenv/defaultenv-2-dfu/boot/dfu b/defaultenv/defaultenv-2-dfu/boot/dfu
> index 682091141e..56a88ae0a3 100644
> --- a/defaultenv/defaultenv-2-dfu/boot/dfu
> +++ b/defaultenv/defaultenv-2-dfu/boot/dfu
> @@ -23,8 +23,8 @@ if [ ! -f "$kernel" ]; then
> fi
>
> if [ -f "$cmdline" ]; then
> - global linux.bootargs.dyn.dfu
> - readf $cmdline global.linux.bootargs.dyn.dfu
> + global linux.bootargs.dfu
> + readf $cmdline global.linux.bootargs.dfu
> fi
>
> if [ -f "$dtb" ]; then
>
--
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 |
next prev parent reply other threads:[~2026-11-12 8:20 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
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 [this message]
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=55e296a7-8d50-46db-ab5c-a719ee79166b@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/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