[PATCH v3 4/4] bootm: introduce bootm.root_arg variable

Ahmad Fatoum a.fatoum at pengutronix.de
Fri Nov 28 02:07:39 PST 2025


Hi,

On 11/27/25 3:25 PM, Fabian Pflug wrote:
> The bootm.root_arg variable will be responsible for the root= part of
> the kernel commandline if bootm.appendroot is set and a root device has
> been selected.
> root_arg allows to replace the root=/dev/... with verity=/dev/..., which
> is useful in a verified boot context, where you pass the root file
> system to the initramfs, but do not want the kernel to be able to parse
> and mount the rootfs. With renaming the root= to something different,
> you make sure, that the kernel does not mount the rootfs.
> 
> Signed-off-by: Fabian Pflug <f.pflug at pengutronix.de>

With rename (see below):

Reviewed-by: Ahmad Fatoum <a.fatoum at pengutronix.de>

> ---
>  common/bootm.c  | 17 ++++++++++++-----
>  fs/fs.c         | 26 --------------------------
>  include/bootm.h |  1 +
>  include/fs.h    |  1 -
>  4 files changed, 13 insertions(+), 32 deletions(-)
> 
> diff --git a/common/bootm.c b/common/bootm.c
> index 8efe3426fe..c00be384d0 100644
> --- a/common/bootm.c
> +++ b/common/bootm.c
> @@ -70,6 +70,7 @@ void bootm_data_init_defaults(struct bootm_data *data)
>  		data->initrd_file = getenv_nonempty("global.bootm.initrd");
>  	}
>  	data->root_dev = getenv_nonempty("global.bootm.root_dev");
> +	data->root_arg = getenv_nonempty("global.bootm.root_arg");

I know root_arg was my suggestion IIRC, but thinking about it this
should rather be root_param as it's about what's before the =, not
what's after it.

>  				if (!root_cdev)
> -					pr_err("no cdev found for %s, cannot set root= option\n", root_dev_name);
> +					pr_err("no cdev found for %s, cannot set %s= option\n",
> +						root_dev_name, bootm_data->root_arg);

This was two lines before Patch 3/4, Patch 3/4 made it into one line,
now patch 4/4 makes it two lines again.

Cheers,
Ahmad

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