All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] environment: ti: Add get_fit_config command to get FIT config string
@ 2023-04-25 16:20 Andrew Davis
  2023-04-25 17:20 ` Tom Rini
  2023-05-05  0:59 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Davis @ 2023-04-25 16:20 UTC (permalink / raw)
  To: Simon Glass, Tom Rini, Praneeth Bajjuri, Ryan Eatmon,
	Bryan Brattlof, u-boot
  Cc: Andrew Davis

When OE is packaging a dtb file into the FIT image it names the node based
on the dtb filename. Node names can't have "/" so it is turned into "_".
We select our FIT config using the "fdtfile" env var so we don't duplicate
the board_name to fdt logic. Result is fdtfile needs mangled when used to
select a config node from OE made FIT image. Do this here.

Signed-off-by: Andrew Davis <afd@ti.com>
---
 include/configs/ti_armv7_common.h          | 3 ++-
 include/environment/ti/ti_armv7_common.env | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index d54c208ef66..149a74d98e8 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -55,7 +55,8 @@
 		"do;" \
 		"setenv overlaystring ${overlaystring}'#'${overlay};" \
 		"done;\0" \
-	"run_fit=bootm ${addr_fit}#conf-${fdtfile}${overlaystring}\0" \
+	"get_fit_config=setexpr name_fit_config gsub / _ conf-${fdtfile}\0" \
+	"run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring}\0" \
 
 /*
  * DDR information.  If the CONFIG_NR_DRAM_BANKS is not defined,
diff --git a/include/environment/ti/ti_armv7_common.env b/include/environment/ti/ti_armv7_common.env
index 4d334648c05..0c0929d8628 100644
--- a/include/environment/ti/ti_armv7_common.env
+++ b/include/environment/ti/ti_armv7_common.env
@@ -20,5 +20,6 @@ get_overlaystring=
 	do;
 	setenv overlaystring ${overlaystring}'#'${overlay};
 	done;
-run_fit=bootm ${addr_fit}#conf-${fdtfile}${overlaystring}
+get_fit_config=setexpr name_fit_config gsub / _ conf-${fdtfile}
+run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring}
 
-- 
2.39.2


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

* Re: [PATCH] environment: ti: Add get_fit_config command to get FIT config string
  2023-04-25 16:20 [PATCH] environment: ti: Add get_fit_config command to get FIT config string Andrew Davis
@ 2023-04-25 17:20 ` Tom Rini
  2023-05-05  0:59 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2023-04-25 17:20 UTC (permalink / raw)
  To: Andrew Davis
  Cc: Simon Glass, Praneeth Bajjuri, Ryan Eatmon, Bryan Brattlof,
	u-boot

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

On Tue, Apr 25, 2023 at 11:20:45AM -0500, Andrew Davis wrote:

> When OE is packaging a dtb file into the FIT image it names the node based
> on the dtb filename. Node names can't have "/" so it is turned into "_".
> We select our FIT config using the "fdtfile" env var so we don't duplicate
> the board_name to fdt logic. Result is fdtfile needs mangled when used to
> select a config node from OE made FIT image. Do this here.
> 
> Signed-off-by: Andrew Davis <afd@ti.com>

Thanks for getting this done!

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom

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

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

* Re: [PATCH] environment: ti: Add get_fit_config command to get FIT config string
  2023-04-25 16:20 [PATCH] environment: ti: Add get_fit_config command to get FIT config string Andrew Davis
  2023-04-25 17:20 ` Tom Rini
@ 2023-05-05  0:59 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2023-05-05  0:59 UTC (permalink / raw)
  To: Andrew Davis
  Cc: Simon Glass, Praneeth Bajjuri, Ryan Eatmon, Bryan Brattlof,
	u-boot

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

On Tue, Apr 25, 2023 at 11:20:45AM -0500, Andrew Davis wrote:

> When OE is packaging a dtb file into the FIT image it names the node based
> on the dtb filename. Node names can't have "/" so it is turned into "_".
> We select our FIT config using the "fdtfile" env var so we don't duplicate
> the board_name to fdt logic. Result is fdtfile needs mangled when used to
> select a config node from OE made FIT image. Do this here.
> 
> Signed-off-by: Andrew Davis <afd@ti.com>
> Reviewed-by: Tom Rini <trini@konsulko.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-05-05  0:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-25 16:20 [PATCH] environment: ti: Add get_fit_config command to get FIT config string Andrew Davis
2023-04-25 17:20 ` Tom Rini
2023-05-05  0:59 ` 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.