[PATCH] env: ti: ti_common.env: Fix get_overlaystring for FIT Image

Manorit Chawdhry m-chawdhry at ti.com
Thu Sep 21 10:44:07 CEST 2023


Hi 

On 10:28-20230919, Manorit Chawdhry wrote:
> After the refactor with conf- nodes in fitImage, overlaystring wasn't
> didn't handle the new conf- nodes in FIT Booting. Fix get_overlaystring
> to handle conf- nodes.
> 
> Fixes: 837833a724b7 ("environment: ti: Add get_fit_config command to get FIT config string")
> Reported-by: Aniket Limaye <a-limaye at ti.com>
> Signed-off-by: Manorit Chawdhry <m-chawdhry at ti.com>
> ---
> Test Logs:
> => setenv name_overlays ti/k3-dt.dtbo ti/k3-dt1.dtbo
> => run get_overlaystring
> => printenv overlaystring
> overlaystring=#conf-ti_k3-dt.dtbo#conf-ti_k3-dt1.dtbo
> ---
>  include/env/ti/ti_common.env | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/include/env/ti/ti_common.env b/include/env/ti/ti_common.env
> index e87a41a6590b..4d0590912614 100644
> --- a/include/env/ti/ti_common.env
> +++ b/include/env/ti/ti_common.env
> @@ -16,9 +16,14 @@ addr_fit=0x90000000
>  name_fit=fitImage
>  update_to_fit=setenv loadaddr ${addr_fit}; setenv bootfile ${name_fit}
>  get_overlaystring=
> -	for overlay in $name_overlays;
> -	do;
> -	setenv overlaystring ${overlaystring}'#'${overlay};
> +	for overlay in $name_overlays; do;
> +    if test ${boot_fit} -eq 1;
> +      then
> +        setexpr name_fit_overlay gsub / _ conf-${overlay};
> +        setenv overlaystring ${overlaystring}'#'${name_fit_overlay};
> +      else
> +        setenv overlaystring ${overlaystring}'#'${overlay};
> +    fi;

Checkpatch didn't comment but see tabs and spaces mixed in the file...

Would re-roll with the fix.

Regards,
Manorit

>  	done;
>  get_fit_config=setexpr name_fit_config gsub / _ conf-${fdtfile}
>  run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring}
> 
> ---
> base-commit: 2fe4b54556ea6271237b35de68dc458bfceab94c
> change-id: 20230915-b4-upstream-overlaystring-207e28b8c5fb
> 
> Best regards,
> -- 
> Manorit Chawdhry <m-chawdhry at ti.com>
> 


More information about the U-Boot mailing list