[PATCH V6 02/20] include: env: ti: mmc: envboot: Only attempt boot.scr if BOOTSTD is not enabled

Mattijs Korpershoek mkorpershoek at baylibre.com
Mon Aug 28 17:25:33 CEST 2023


On ven., août 25, 2023 at 13:02, Nishanth Menon <nm at ti.com> wrote:

> 'script' bootmethod that should be used with CONFIG_BOOTSTD.
>
> Signed-off-by: Nishanth Menon <nm at ti.com>

Reviewed-by: Mattijs Korpershoek <mkorpershoek at baylibre.com>

> ---
>
> Since Simon educated me to realize that the published documentation can
> be stale and bootmeths=script does indeed work for some time despite
> what the docs say..
>
>  include/env/ti/mmc.env | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/include/env/ti/mmc.env b/include/env/ti/mmc.env
> index b8eb51ca1744..0256a2d2aaca 100644
> --- a/include/env/ti/mmc.env
> +++ b/include/env/ti/mmc.env
> @@ -5,7 +5,9 @@ args_mmc=run finduuid;setenv bootargs console=${console}
>  	${optargs}
>  	root=PARTUUID=${uuid} rw
>  	rootfstype=${mmcrootfstype}
> +#ifndef CONFIG_BOOTSTD
>  loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr
> +#endif
>  bootscript=echo Running bootscript from mmc${mmcdev} ...;
>  	source ${loadaddr}
>  bootenvfile=uEnv.txt
> @@ -18,7 +20,7 @@ get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/dtb/${name_fdt}
>  envboot=if mmc dev ${mmcdev}; then
>  	if mmc rescan; then
>  		echo SD/MMC found on device ${mmcdev};
> -		if run loadbootscript; then
> +		if test -n "${loadbootscript}" && run loadbootscript; then
>  			run bootscript;
>  		else
>  			if run loadbootenv; then
> -- 
> 2.40.0


More information about the U-Boot mailing list