[Uboot-stm32] [PATCH 1/2] doc: Switch from setenv to env set
Simon Glass
sjg at chromium.org
Tue Jul 28 11:50:39 UTC 2026
Hi Marek,
On 2026-07-18T23:45:48, Marek Vasut <marek.vasut+renesas at mailbox.org> wrote:
> doc: Switch from setenv to env set
>
> The "env" command is the recommended environment management command,
> its "set" subcommand is the equivalent replacement for legacy "setenv"
> command. Update the documentation to use the contemporary "env set"
> command instead of legacy "setenv" command.
>
> Note that the "setenv" command is unlikely to be removed from U-Boot
> in the near future due to it being integral part of the command line
> ABI.
>
> Implemented using:
> $ sed -i 's@\<setenv\>@env set at g' $(git grep -li '\<setenv\>' doc/) README
>
> Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
> Reviewed-by: Mattijs Korpershoek <mkorpershoek at kernel.org>
> diff --git a/doc/usage/cmd/gpt.rst b/doc/usage/cmd/gpt.rst
> @@ -119,10 +119,10 @@ Sets the bootable flag for all partitions in the table. If the partition name
> -gpt setenv
> +gpt env set
> ~~~~~~~~~~
>
> -The 'gpt setenv' command will set a series of environment variables with
> +The 'gpt env set' command will set a series of environment variables with
Not quite. 'gpt setenv' is a subcommand of gpt, not the standalone
setenv command, so it must not be rewritten. There is no 'gpt env set'
- cmd/gpt.c dispatches on argv[1] == 'setenv' (see gpt_setenv()), so
this documents a command that doesn't exist. The word-boundary sed has
caught it here and in the examples below:
=> gpt env set mmc 0 rootfs
=> gpt env set mmc 0 boot
Please revert these to 'gpt setenv'. It's worth grepping for other
command-prefixed uses (e.g. fdt, i2c) before resending, since the sed
can't tell a subcommand from the standalone command.
Regards,
Simon
More information about the Uboot-stm32
mailing list