All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] env: ti: ti_common.env: Fix get_overlaystring for FIT Image
@ 2023-09-25  6:23 Manorit Chawdhry
  2023-09-25 13:35 ` Andrew Davis
  2023-09-29 13:21 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Manorit Chawdhry @ 2023-09-25  6:23 UTC (permalink / raw)
  To: Tom Rini
  Cc: u-boot, Andrew Davis, Udit Kumar, Neha Malcom Francis,
	Aniket Limaye, Manorit Chawdhry

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@ti.com>
Signed-off-by: Manorit Chawdhry <m-chawdhry@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
---
Changes in v3:
- Refactor to remove dependency on boot_fit ( Andrew )
- Rename it to get_fit_overlaystring as it is not used anywhere else
- Link to v2: https://lore.kernel.org/r/20230921-b4-upstream-overlaystring-v2-1-22e0b71e3334@ti.com
---
 include/env/ti/ti_common.env | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/env/ti/ti_common.env b/include/env/ti/ti_common.env
index e87a41a6590b..f5d84216e3ce 100644
--- a/include/env/ti/ti_common.env
+++ b/include/env/ti/ti_common.env
@@ -15,10 +15,10 @@ boot_fit=0
 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};
+get_fit_overlaystring=
+	for overlay in $name_overlays; do;
+		setexpr name_fit_overlay gsub / _ conf-${overlay};
+		setenv overlaystring ${overlaystring}'#'${name_fit_overlay};
 	done;
 get_fit_config=setexpr name_fit_config gsub / _ conf-${fdtfile}
 run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring}
@@ -28,7 +28,7 @@ bootcmd_ti_mmc=
 	run main_cpsw0_qsgmii_phyinit; run boot_rprocs;
 #endif
 	if test ${boot_fit} -eq 1;
-		then run get_fit_${boot}; run get_overlaystring; run run_fit;
+		then run get_fit_${boot}; run get_fit_overlaystring; run run_fit;
 	else;
 		run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern;
 	fi;

---
base-commit: 2fe4b54556ea6271237b35de68dc458bfceab94c
change-id: 20230915-b4-upstream-overlaystring-207e28b8c5fb

Best regards,
-- 
Manorit Chawdhry <m-chawdhry@ti.com>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] env: ti: ti_common.env: Fix get_overlaystring for FIT Image
  2023-09-25  6:23 [PATCH v3] env: ti: ti_common.env: Fix get_overlaystring for FIT Image Manorit Chawdhry
@ 2023-09-25 13:35 ` Andrew Davis
  2023-09-29 13:21 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Davis @ 2023-09-25 13:35 UTC (permalink / raw)
  To: Manorit Chawdhry, Tom Rini
  Cc: u-boot, Udit Kumar, Neha Malcom Francis, Aniket Limaye

On 9/25/23 1:23 AM, 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@ti.com>
> Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
> ---

Reviewed-by: Andrew Davis <afd@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
> ---
> Changes in v3:
> - Refactor to remove dependency on boot_fit ( Andrew )
> - Rename it to get_fit_overlaystring as it is not used anywhere else
> - Link to v2: https://lore.kernel.org/r/20230921-b4-upstream-overlaystring-v2-1-22e0b71e3334@ti.com
> ---
>   include/env/ti/ti_common.env | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/include/env/ti/ti_common.env b/include/env/ti/ti_common.env
> index e87a41a6590b..f5d84216e3ce 100644
> --- a/include/env/ti/ti_common.env
> +++ b/include/env/ti/ti_common.env
> @@ -15,10 +15,10 @@ boot_fit=0
>   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};
> +get_fit_overlaystring=
> +	for overlay in $name_overlays; do;
> +		setexpr name_fit_overlay gsub / _ conf-${overlay};
> +		setenv overlaystring ${overlaystring}'#'${name_fit_overlay};
>   	done;
>   get_fit_config=setexpr name_fit_config gsub / _ conf-${fdtfile}
>   run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring}
> @@ -28,7 +28,7 @@ bootcmd_ti_mmc=
>   	run main_cpsw0_qsgmii_phyinit; run boot_rprocs;
>   #endif
>   	if test ${boot_fit} -eq 1;
> -		then run get_fit_${boot}; run get_overlaystring; run run_fit;
> +		then run get_fit_${boot}; run get_fit_overlaystring; run run_fit;
>   	else;
>   		run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern;
>   	fi;
> 
> ---
> base-commit: 2fe4b54556ea6271237b35de68dc458bfceab94c
> change-id: 20230915-b4-upstream-overlaystring-207e28b8c5fb
> 
> Best regards,

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] env: ti: ti_common.env: Fix get_overlaystring for FIT Image
  2023-09-25  6:23 [PATCH v3] env: ti: ti_common.env: Fix get_overlaystring for FIT Image Manorit Chawdhry
  2023-09-25 13:35 ` Andrew Davis
@ 2023-09-29 13:21 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2023-09-29 13:21 UTC (permalink / raw)
  To: Manorit Chawdhry
  Cc: u-boot, Andrew Davis, Udit Kumar, Neha Malcom Francis, Aniket Limaye

[-- Attachment #1: Type: text/plain, Size: 537 bytes --]

On Mon, Sep 25, 2023 at 11:53:42AM +0530, 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@ti.com>
> Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
> Reviewed-by: Andrew Davis <afd@ti.com>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-29 13:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-25  6:23 [PATCH v3] env: ti: ti_common.env: Fix get_overlaystring for FIT Image Manorit Chawdhry
2023-09-25 13:35 ` Andrew Davis
2023-09-29 13:21 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.