u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [PATCH] include: configs: Change dtb names in fitImage to match oe-core
@ 2023-03-30 21:06 Ryan Eatmon
  2023-03-31 17:04 ` Nishanth Menon
  0 siblings, 1 reply; 9+ messages in thread
From: Ryan Eatmon @ 2023-03-30 21:06 UTC (permalink / raw)
  To: Praneeth Bajjuri, Tom Rini, Andrew Davis, Bryan Brattlof, u-boot

The oe-core class for assembling the fitImage includes the vendor
sub-directory (with the / changed to _) in the config sections of
the fitImage.  Our env var settings for chosing which section to
boot from needs to be updated to agree with the fitImage.

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
---
 include/configs/am64x_evm.h  | 4 ++--
 include/configs/am65x_evm.h  | 2 +-
 include/configs/j721e_evm.h  | 6 +++---
 include/configs/j721s2_evm.h | 6 +++---
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/configs/am64x_evm.h b/include/configs/am64x_evm.h
index 26a7f2521e..456a44730c 100644
--- a/include/configs/am64x_evm.h
+++ b/include/configs/am64x_evm.h
@@ -26,9 +26,9 @@
 #define EXTRA_ENV_AM642_BOARD_SETTINGS					\
 	"findfdt="							\
 		"if test $board_name = am64x_gpevm; then " \
-			"setenv fdtfile k3-am642-evm.dtb; fi; " \
+			"setenv fdtfile ti_k3-am642-evm.dtb; fi; " \
 		"if test $board_name = am64x_skevm; then " \
-			"setenv fdtfile k3-am642-sk.dtb; fi;" \
+			"setenv fdtfile ti_k3-am642-sk.dtb; fi;" \
 		"if test $fdtfile = undefined; then " \
 			"echo WARNING: Could not determine device tree to use; fi; \0" \
 	"name_kern=Image\0"						\
diff --git a/include/configs/am65x_evm.h b/include/configs/am65x_evm.h
index 33dd6cfdfa..60a7eb1453 100644
--- a/include/configs/am65x_evm.h
+++ b/include/configs/am65x_evm.h
@@ -24,7 +24,7 @@
 /* U-Boot general configuration */
 #define EXTRA_ENV_AM65X_BOARD_SETTINGS					\
 	"findfdt="							\
-		"setenv name_fdt k3-am654-base-board.dtb;"		\
+		"setenv name_fdt ti_k3-am654-base-board.dtb;"		\
 		"setenv fdtfile ${name_fdt}\0"				\
 	"name_kern=Image\0"						\
 	"console=ttyS2,115200n8\0"					\
diff --git a/include/configs/j721e_evm.h b/include/configs/j721e_evm.h
index 48b1cea6e3..eac5cd5b76 100644
--- a/include/configs/j721e_evm.h
+++ b/include/configs/j721e_evm.h
@@ -34,11 +34,11 @@
 #define EXTRA_ENV_J721E_BOARD_SETTINGS					\
 	"default_device_tree=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0"	\
 	"findfdt="							\
-		"setenv name_fdt ${default_device_tree};"		\
+		"setenv name_fdt ti_${default_device_tree};"		\
 		"if test $board_name = j721e; then "			\
-			"setenv name_fdt k3-j721e-common-proc-board.dtb; fi;" \
+			"setenv name_fdt ti_k3-j721e-common-proc-board.dtb; fi;" \
 		"if test $board_name = j721e-eaik || test $board_name = j721e-sk; then "		\
-			"setenv name_fdt k3-j721e-sk.dtb; fi;"	\
+			"setenv name_fdt ti_k3-j721e-sk.dtb; fi;"	\
 		"setenv fdtfile ${name_fdt}\0"				\
 	"name_kern=Image\0"						\
 	"console=ttyS2,115200n8\0"					\
diff --git a/include/configs/j721s2_evm.h b/include/configs/j721s2_evm.h
index bfada9eebc..b30a4a8da4 100644
--- a/include/configs/j721s2_evm.h
+++ b/include/configs/j721s2_evm.h
@@ -31,11 +31,11 @@
 #define EXTRA_ENV_J721S2_BOARD_SETTINGS					\
 	"default_device_tree=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0"	\
 	"findfdt="							\
-		"setenv name_fdt ${default_device_tree};"		\
+		"setenv name_fdt ti_${default_device_tree};"		\
 		"if test $board_name = j721s2; then "			\
-			"setenv name_fdt k3-j721s2-common-proc-board.dtb; fi;" \
+			"setenv name_fdt ti_k3-j721s2-common-proc-board.dtb; fi;" \
 		"if test $board_name = am68-sk; then "			\
-			"setenv name_fdt k3-am68-sk-base-board.dtb; fi;"\
+			"setenv name_fdt ti_k3-am68-sk-base-board.dtb; fi;"\
 		"setenv fdtfile ${name_fdt}\0"				\
 	"name_kern=Image\0"						\
 	"console=ttyS2,115200n8\0"					\
-- 
2.17.1


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

* Re: [PATCH] include: configs: Change dtb names in fitImage to match oe-core
  2023-03-30 21:06 [PATCH] include: configs: Change dtb names in fitImage to match oe-core Ryan Eatmon
@ 2023-03-31 17:04 ` Nishanth Menon
  2023-03-31 17:19   ` Andrew Davis
  0 siblings, 1 reply; 9+ messages in thread
From: Nishanth Menon @ 2023-03-31 17:04 UTC (permalink / raw)
  To: Ryan Eatmon
  Cc: Praneeth Bajjuri, Tom Rini, Andrew Davis, Bryan Brattlof, u-boot

On 16:06-20230330, Ryan Eatmon wrote:
> The oe-core class for assembling the fitImage includes the vendor
> sub-directory (with the / changed to _) in the config sections of
> the fitImage.  Our env var settings for chosing which section to
> boot from needs to be updated to agree with the fitImage.
> 
> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
> ---
>  include/configs/am64x_evm.h  | 4 ++--
>  include/configs/am65x_evm.h  | 2 +-
>  include/configs/j721e_evm.h  | 6 +++---
>  include/configs/j721s2_evm.h | 6 +++---
>  4 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/include/configs/am64x_evm.h b/include/configs/am64x_evm.h
> index 26a7f2521e..456a44730c 100644
> --- a/include/configs/am64x_evm.h
> +++ b/include/configs/am64x_evm.h
> @@ -26,9 +26,9 @@
>  #define EXTRA_ENV_AM642_BOARD_SETTINGS					\
>  	"findfdt="							\
>  		"if test $board_name = am64x_gpevm; then " \
> -			"setenv fdtfile k3-am642-evm.dtb; fi; " \
> +			"setenv fdtfile ti_k3-am642-evm.dtb; fi; " \
>  		"if test $board_name = am64x_skevm; then " \
> -			"setenv fdtfile k3-am642-sk.dtb; fi;" \
> +			"setenv fdtfile ti_k3-am642-sk.dtb; fi;" \


Kernel.org builds k3-am642-sk.dtb

Why would we want to go and fix it with non-standard?

>  		"if test $fdtfile = undefined; then " \
>  			"echo WARNING: Could not determine device tree to use; fi; \0" \
>  	"name_kern=Image\0"						\
> diff --git a/include/configs/am65x_evm.h b/include/configs/am65x_evm.h
> index 33dd6cfdfa..60a7eb1453 100644
> --- a/include/configs/am65x_evm.h
> +++ b/include/configs/am65x_evm.h
> @@ -24,7 +24,7 @@
>  /* U-Boot general configuration */
>  #define EXTRA_ENV_AM65X_BOARD_SETTINGS					\
>  	"findfdt="							\
> -		"setenv name_fdt k3-am654-base-board.dtb;"		\
> +		"setenv name_fdt ti_k3-am654-base-board.dtb;"		\
>  		"setenv fdtfile ${name_fdt}\0"				\
>  	"name_kern=Image\0"						\
>  	"console=ttyS2,115200n8\0"					\
> diff --git a/include/configs/j721e_evm.h b/include/configs/j721e_evm.h
> index 48b1cea6e3..eac5cd5b76 100644
> --- a/include/configs/j721e_evm.h
> +++ b/include/configs/j721e_evm.h
> @@ -34,11 +34,11 @@
>  #define EXTRA_ENV_J721E_BOARD_SETTINGS					\
>  	"default_device_tree=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0"	\
>  	"findfdt="							\
> -		"setenv name_fdt ${default_device_tree};"		\
> +		"setenv name_fdt ti_${default_device_tree};"		\
>  		"if test $board_name = j721e; then "			\
> -			"setenv name_fdt k3-j721e-common-proc-board.dtb; fi;" \
> +			"setenv name_fdt ti_k3-j721e-common-proc-board.dtb; fi;" \
>  		"if test $board_name = j721e-eaik || test $board_name = j721e-sk; then "		\
> -			"setenv name_fdt k3-j721e-sk.dtb; fi;"	\
> +			"setenv name_fdt ti_k3-j721e-sk.dtb; fi;"	\
>  		"setenv fdtfile ${name_fdt}\0"				\
>  	"name_kern=Image\0"						\
>  	"console=ttyS2,115200n8\0"					\
> diff --git a/include/configs/j721s2_evm.h b/include/configs/j721s2_evm.h
> index bfada9eebc..b30a4a8da4 100644
> --- a/include/configs/j721s2_evm.h
> +++ b/include/configs/j721s2_evm.h
> @@ -31,11 +31,11 @@
>  #define EXTRA_ENV_J721S2_BOARD_SETTINGS					\
>  	"default_device_tree=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0"	\
>  	"findfdt="							\
> -		"setenv name_fdt ${default_device_tree};"		\
> +		"setenv name_fdt ti_${default_device_tree};"		\
>  		"if test $board_name = j721s2; then "			\
> -			"setenv name_fdt k3-j721s2-common-proc-board.dtb; fi;" \
> +			"setenv name_fdt ti_k3-j721s2-common-proc-board.dtb; fi;" \
>  		"if test $board_name = am68-sk; then "			\
> -			"setenv name_fdt k3-am68-sk-base-board.dtb; fi;"\
> +			"setenv name_fdt ti_k3-am68-sk-base-board.dtb; fi;"\
>  		"setenv fdtfile ${name_fdt}\0"				\
>  	"name_kern=Image\0"						\
>  	"console=ttyS2,115200n8\0"					\
> -- 
> 2.17.1
> 

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

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

* Re: [PATCH] include: configs: Change dtb names in fitImage to match oe-core
  2023-03-31 17:04 ` Nishanth Menon
@ 2023-03-31 17:19   ` Andrew Davis
  2023-03-31 18:11     ` Tom Rini
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Davis @ 2023-03-31 17:19 UTC (permalink / raw)
  To: Nishanth Menon, Ryan Eatmon
  Cc: Praneeth Bajjuri, Tom Rini, Bryan Brattlof, u-boot

On 3/31/23 12:04 PM, Nishanth Menon wrote:
> On 16:06-20230330, Ryan Eatmon wrote:
>> The oe-core class for assembling the fitImage includes the vendor
>> sub-directory (with the / changed to _) in the config sections of
>> the fitImage.  Our env var settings for chosing which section to
>> boot from needs to be updated to agree with the fitImage.
>>
>> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
>> ---
>>   include/configs/am64x_evm.h  | 4 ++--
>>   include/configs/am65x_evm.h  | 2 +-
>>   include/configs/j721e_evm.h  | 6 +++---
>>   include/configs/j721s2_evm.h | 6 +++---
>>   4 files changed, 9 insertions(+), 9 deletions(-)
>>
>> diff --git a/include/configs/am64x_evm.h b/include/configs/am64x_evm.h
>> index 26a7f2521e..456a44730c 100644
>> --- a/include/configs/am64x_evm.h
>> +++ b/include/configs/am64x_evm.h
>> @@ -26,9 +26,9 @@
>>   #define EXTRA_ENV_AM642_BOARD_SETTINGS					\
>>   	"findfdt="							\
>>   		"if test $board_name = am64x_gpevm; then " \
>> -			"setenv fdtfile k3-am642-evm.dtb; fi; " \
>> +			"setenv fdtfile ti_k3-am642-evm.dtb; fi; " \
>>   		"if test $board_name = am64x_skevm; then " \
>> -			"setenv fdtfile k3-am642-sk.dtb; fi;" \
>> +			"setenv fdtfile ti_k3-am642-sk.dtb; fi;" \
> 
> 
> Kernel.org builds k3-am642-sk.dtb
> 

Nope, kernel.org build ti/k3-am642-sk.dtb

> Why would we want to go and fix it with non-standard?
> 

The dtbs need to have their dir prefixed or there could be collisions

Andrew

>>   		"if test $fdtfile = undefined; then " \
>>   			"echo WARNING: Could not determine device tree to use; fi; \0" \
>>   	"name_kern=Image\0"						\
>> diff --git a/include/configs/am65x_evm.h b/include/configs/am65x_evm.h
>> index 33dd6cfdfa..60a7eb1453 100644
>> --- a/include/configs/am65x_evm.h
>> +++ b/include/configs/am65x_evm.h
>> @@ -24,7 +24,7 @@
>>   /* U-Boot general configuration */
>>   #define EXTRA_ENV_AM65X_BOARD_SETTINGS					\
>>   	"findfdt="							\
>> -		"setenv name_fdt k3-am654-base-board.dtb;"		\
>> +		"setenv name_fdt ti_k3-am654-base-board.dtb;"		\
>>   		"setenv fdtfile ${name_fdt}\0"				\
>>   	"name_kern=Image\0"						\
>>   	"console=ttyS2,115200n8\0"					\
>> diff --git a/include/configs/j721e_evm.h b/include/configs/j721e_evm.h
>> index 48b1cea6e3..eac5cd5b76 100644
>> --- a/include/configs/j721e_evm.h
>> +++ b/include/configs/j721e_evm.h
>> @@ -34,11 +34,11 @@
>>   #define EXTRA_ENV_J721E_BOARD_SETTINGS					\
>>   	"default_device_tree=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0"	\
>>   	"findfdt="							\
>> -		"setenv name_fdt ${default_device_tree};"		\
>> +		"setenv name_fdt ti_${default_device_tree};"		\
>>   		"if test $board_name = j721e; then "			\
>> -			"setenv name_fdt k3-j721e-common-proc-board.dtb; fi;" \
>> +			"setenv name_fdt ti_k3-j721e-common-proc-board.dtb; fi;" \
>>   		"if test $board_name = j721e-eaik || test $board_name = j721e-sk; then "		\
>> -			"setenv name_fdt k3-j721e-sk.dtb; fi;"	\
>> +			"setenv name_fdt ti_k3-j721e-sk.dtb; fi;"	\
>>   		"setenv fdtfile ${name_fdt}\0"				\
>>   	"name_kern=Image\0"						\
>>   	"console=ttyS2,115200n8\0"					\
>> diff --git a/include/configs/j721s2_evm.h b/include/configs/j721s2_evm.h
>> index bfada9eebc..b30a4a8da4 100644
>> --- a/include/configs/j721s2_evm.h
>> +++ b/include/configs/j721s2_evm.h
>> @@ -31,11 +31,11 @@
>>   #define EXTRA_ENV_J721S2_BOARD_SETTINGS					\
>>   	"default_device_tree=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0"	\
>>   	"findfdt="							\
>> -		"setenv name_fdt ${default_device_tree};"		\
>> +		"setenv name_fdt ti_${default_device_tree};"		\
>>   		"if test $board_name = j721s2; then "			\
>> -			"setenv name_fdt k3-j721s2-common-proc-board.dtb; fi;" \
>> +			"setenv name_fdt ti_k3-j721s2-common-proc-board.dtb; fi;" \
>>   		"if test $board_name = am68-sk; then "			\
>> -			"setenv name_fdt k3-am68-sk-base-board.dtb; fi;"\
>> +			"setenv name_fdt ti_k3-am68-sk-base-board.dtb; fi;"\
>>   		"setenv fdtfile ${name_fdt}\0"				\
>>   	"name_kern=Image\0"						\
>>   	"console=ttyS2,115200n8\0"					\
>> -- 
>> 2.17.1
>>
> 

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

* Re: [PATCH] include: configs: Change dtb names in fitImage to match oe-core
  2023-03-31 17:19   ` Andrew Davis
@ 2023-03-31 18:11     ` Tom Rini
  2023-03-31 18:23       ` Andrew Davis
  0 siblings, 1 reply; 9+ messages in thread
From: Tom Rini @ 2023-03-31 18:11 UTC (permalink / raw)
  To: Andrew Davis
  Cc: Nishanth Menon, Ryan Eatmon, Praneeth Bajjuri, Bryan Brattlof, u-boot

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

On Fri, Mar 31, 2023 at 12:19:14PM -0500, Andrew Davis wrote:
> On 3/31/23 12:04 PM, Nishanth Menon wrote:
> > On 16:06-20230330, Ryan Eatmon wrote:
> > > The oe-core class for assembling the fitImage includes the vendor
> > > sub-directory (with the / changed to _) in the config sections of
> > > the fitImage.  Our env var settings for chosing which section to
> > > boot from needs to be updated to agree with the fitImage.
> > > 
> > > Signed-off-by: Ryan Eatmon <reatmon@ti.com>
> > > ---
> > >   include/configs/am64x_evm.h  | 4 ++--
> > >   include/configs/am65x_evm.h  | 2 +-
> > >   include/configs/j721e_evm.h  | 6 +++---
> > >   include/configs/j721s2_evm.h | 6 +++---
> > >   4 files changed, 9 insertions(+), 9 deletions(-)
> > > 
> > > diff --git a/include/configs/am64x_evm.h b/include/configs/am64x_evm.h
> > > index 26a7f2521e..456a44730c 100644
> > > --- a/include/configs/am64x_evm.h
> > > +++ b/include/configs/am64x_evm.h
> > > @@ -26,9 +26,9 @@
> > >   #define EXTRA_ENV_AM642_BOARD_SETTINGS					\
> > >   	"findfdt="							\
> > >   		"if test $board_name = am64x_gpevm; then " \
> > > -			"setenv fdtfile k3-am642-evm.dtb; fi; " \
> > > +			"setenv fdtfile ti_k3-am642-evm.dtb; fi; " \
> > >   		"if test $board_name = am64x_skevm; then " \
> > > -			"setenv fdtfile k3-am642-sk.dtb; fi;" \
> > > +			"setenv fdtfile ti_k3-am642-sk.dtb; fi;" \
> > 
> > 
> > Kernel.org builds k3-am642-sk.dtb
> > 
> 
> Nope, kernel.org build ti/k3-am642-sk.dtb
> 
> > Why would we want to go and fix it with non-standard?
> > 
> 
> The dtbs need to have their dir prefixed or there could be collisions

The key here is we're talking about what's used in FIT images, and not
just loaded directly. All of the cases where fdtfile is used on arm64
platforms in tree today use "/" because it's loading a literal. In this
case, why again is OE mangling the name, and what are we using it for
again here? In other words, why can't it be treated as "/" to match the
load a file case? And if it _must_ be mangled, must we still use fdtfile
and not something else?

-- 
Tom

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

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

* Re: [PATCH] include: configs: Change dtb names in fitImage to match oe-core
  2023-03-31 18:11     ` Tom Rini
@ 2023-03-31 18:23       ` Andrew Davis
  2023-03-31 18:36         ` Tom Rini
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Davis @ 2023-03-31 18:23 UTC (permalink / raw)
  To: Tom Rini
  Cc: Nishanth Menon, Ryan Eatmon, Praneeth Bajjuri, Bryan Brattlof, u-boot

On 3/31/23 1:11 PM, Tom Rini wrote:
> On Fri, Mar 31, 2023 at 12:19:14PM -0500, Andrew Davis wrote:
>> On 3/31/23 12:04 PM, Nishanth Menon wrote:
>>> On 16:06-20230330, Ryan Eatmon wrote:
>>>> The oe-core class for assembling the fitImage includes the vendor
>>>> sub-directory (with the / changed to _) in the config sections of
>>>> the fitImage.  Our env var settings for chosing which section to
>>>> boot from needs to be updated to agree with the fitImage.
>>>>
>>>> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
>>>> ---
>>>>    include/configs/am64x_evm.h  | 4 ++--
>>>>    include/configs/am65x_evm.h  | 2 +-
>>>>    include/configs/j721e_evm.h  | 6 +++---
>>>>    include/configs/j721s2_evm.h | 6 +++---
>>>>    4 files changed, 9 insertions(+), 9 deletions(-)
>>>>
>>>> diff --git a/include/configs/am64x_evm.h b/include/configs/am64x_evm.h
>>>> index 26a7f2521e..456a44730c 100644
>>>> --- a/include/configs/am64x_evm.h
>>>> +++ b/include/configs/am64x_evm.h
>>>> @@ -26,9 +26,9 @@
>>>>    #define EXTRA_ENV_AM642_BOARD_SETTINGS					\
>>>>    	"findfdt="							\
>>>>    		"if test $board_name = am64x_gpevm; then " \
>>>> -			"setenv fdtfile k3-am642-evm.dtb; fi; " \
>>>> +			"setenv fdtfile ti_k3-am642-evm.dtb; fi; " \
>>>>    		"if test $board_name = am64x_skevm; then " \
>>>> -			"setenv fdtfile k3-am642-sk.dtb; fi;" \
>>>> +			"setenv fdtfile ti_k3-am642-sk.dtb; fi;" \
>>>
>>>
>>> Kernel.org builds k3-am642-sk.dtb
>>>
>>
>> Nope, kernel.org build ti/k3-am642-sk.dtb
>>
>>> Why would we want to go and fix it with non-standard?
>>>
>>
>> The dtbs need to have their dir prefixed or there could be collisions
> 
> The key here is we're talking about what's used in FIT images, and not
> just loaded directly. All of the cases where fdtfile is used on arm64
> platforms in tree today use "/" because it's loading a literal. In this
> case, why again is OE mangling the name, and what are we using it for
> again here? In other words, why can't it be treated as "/" to match the
> load a file case? And if it _must_ be mangled, must we still use fdtfile
> and not something else?
> 

So to match other plats, we should:

setenv fdtfile ti/k3-am642-sk.dtb

That way loading works in the non-FIT case (and we just need to stop moving
all the DTBs out of the ti/ to the root dir (which is probably broken on our
part anyway..))

Then when we use "fdtfile" in the FIT case, we just mangle ("/"->"_") it
at that point only before use. That work for everyone?

Andrew

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

* Re: [PATCH] include: configs: Change dtb names in fitImage to match oe-core
  2023-03-31 18:23       ` Andrew Davis
@ 2023-03-31 18:36         ` Tom Rini
  2023-03-31 18:52           ` Andrew Davis
  0 siblings, 1 reply; 9+ messages in thread
From: Tom Rini @ 2023-03-31 18:36 UTC (permalink / raw)
  To: Andrew Davis
  Cc: Nishanth Menon, Ryan Eatmon, Praneeth Bajjuri, Bryan Brattlof, u-boot

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

On Fri, Mar 31, 2023 at 01:23:23PM -0500, Andrew Davis wrote:
> On 3/31/23 1:11 PM, Tom Rini wrote:
> > On Fri, Mar 31, 2023 at 12:19:14PM -0500, Andrew Davis wrote:
> > > On 3/31/23 12:04 PM, Nishanth Menon wrote:
> > > > On 16:06-20230330, Ryan Eatmon wrote:
> > > > > The oe-core class for assembling the fitImage includes the vendor
> > > > > sub-directory (with the / changed to _) in the config sections of
> > > > > the fitImage.  Our env var settings for chosing which section to
> > > > > boot from needs to be updated to agree with the fitImage.
> > > > > 
> > > > > Signed-off-by: Ryan Eatmon <reatmon@ti.com>
> > > > > ---
> > > > >    include/configs/am64x_evm.h  | 4 ++--
> > > > >    include/configs/am65x_evm.h  | 2 +-
> > > > >    include/configs/j721e_evm.h  | 6 +++---
> > > > >    include/configs/j721s2_evm.h | 6 +++---
> > > > >    4 files changed, 9 insertions(+), 9 deletions(-)
> > > > > 
> > > > > diff --git a/include/configs/am64x_evm.h b/include/configs/am64x_evm.h
> > > > > index 26a7f2521e..456a44730c 100644
> > > > > --- a/include/configs/am64x_evm.h
> > > > > +++ b/include/configs/am64x_evm.h
> > > > > @@ -26,9 +26,9 @@
> > > > >    #define EXTRA_ENV_AM642_BOARD_SETTINGS					\
> > > > >    	"findfdt="							\
> > > > >    		"if test $board_name = am64x_gpevm; then " \
> > > > > -			"setenv fdtfile k3-am642-evm.dtb; fi; " \
> > > > > +			"setenv fdtfile ti_k3-am642-evm.dtb; fi; " \
> > > > >    		"if test $board_name = am64x_skevm; then " \
> > > > > -			"setenv fdtfile k3-am642-sk.dtb; fi;" \
> > > > > +			"setenv fdtfile ti_k3-am642-sk.dtb; fi;" \
> > > > 
> > > > 
> > > > Kernel.org builds k3-am642-sk.dtb
> > > > 
> > > 
> > > Nope, kernel.org build ti/k3-am642-sk.dtb
> > > 
> > > > Why would we want to go and fix it with non-standard?
> > > > 
> > > 
> > > The dtbs need to have their dir prefixed or there could be collisions
> > 
> > The key here is we're talking about what's used in FIT images, and not
> > just loaded directly. All of the cases where fdtfile is used on arm64
> > platforms in tree today use "/" because it's loading a literal. In this
> > case, why again is OE mangling the name, and what are we using it for
> > again here? In other words, why can't it be treated as "/" to match the
> > load a file case? And if it _must_ be mangled, must we still use fdtfile
> > and not something else?
> > 
> 
> So to match other plats, we should:
> 
> setenv fdtfile ti/k3-am642-sk.dtb
> 
> That way loading works in the non-FIT case (and we just need to stop moving
> all the DTBs out of the ti/ to the root dir (which is probably broken on our
> part anyway..))

Yes, this sounds right for the non-FIT case to match other platforms /
etc.

> Then when we use "fdtfile" in the FIT case, we just mangle ("/"->"_") it
> at that point only before use. That work for everyone?

Well, what _is_ the FIT case and how does it go exactly? I still want to
know why we're mangling things and come up with something that'll work
for when someone says "I've got an imx8mm and I'm using a FIT image from
OE and this doesn't work!".

-- 
Tom

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

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

* Re: [PATCH] include: configs: Change dtb names in fitImage to match oe-core
  2023-03-31 18:36         ` Tom Rini
@ 2023-03-31 18:52           ` Andrew Davis
  2023-03-31 19:06             ` Tom Rini
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Davis @ 2023-03-31 18:52 UTC (permalink / raw)
  To: Tom Rini
  Cc: Nishanth Menon, Ryan Eatmon, Praneeth Bajjuri, Bryan Brattlof, u-boot

On 3/31/23 1:36 PM, Tom Rini wrote:
> On Fri, Mar 31, 2023 at 01:23:23PM -0500, Andrew Davis wrote:
>> On 3/31/23 1:11 PM, Tom Rini wrote:
>>> On Fri, Mar 31, 2023 at 12:19:14PM -0500, Andrew Davis wrote:
>>>> On 3/31/23 12:04 PM, Nishanth Menon wrote:
>>>>> On 16:06-20230330, Ryan Eatmon wrote:
>>>>>> The oe-core class for assembling the fitImage includes the vendor
>>>>>> sub-directory (with the / changed to _) in the config sections of
>>>>>> the fitImage.  Our env var settings for chosing which section to
>>>>>> boot from needs to be updated to agree with the fitImage.
>>>>>>
>>>>>> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
>>>>>> ---
>>>>>>     include/configs/am64x_evm.h  | 4 ++--
>>>>>>     include/configs/am65x_evm.h  | 2 +-
>>>>>>     include/configs/j721e_evm.h  | 6 +++---
>>>>>>     include/configs/j721s2_evm.h | 6 +++---
>>>>>>     4 files changed, 9 insertions(+), 9 deletions(-)
>>>>>>
>>>>>> diff --git a/include/configs/am64x_evm.h b/include/configs/am64x_evm.h
>>>>>> index 26a7f2521e..456a44730c 100644
>>>>>> --- a/include/configs/am64x_evm.h
>>>>>> +++ b/include/configs/am64x_evm.h
>>>>>> @@ -26,9 +26,9 @@
>>>>>>     #define EXTRA_ENV_AM642_BOARD_SETTINGS					\
>>>>>>     	"findfdt="							\
>>>>>>     		"if test $board_name = am64x_gpevm; then " \
>>>>>> -			"setenv fdtfile k3-am642-evm.dtb; fi; " \
>>>>>> +			"setenv fdtfile ti_k3-am642-evm.dtb; fi; " \
>>>>>>     		"if test $board_name = am64x_skevm; then " \
>>>>>> -			"setenv fdtfile k3-am642-sk.dtb; fi;" \
>>>>>> +			"setenv fdtfile ti_k3-am642-sk.dtb; fi;" \
>>>>>
>>>>>
>>>>> Kernel.org builds k3-am642-sk.dtb
>>>>>
>>>>
>>>> Nope, kernel.org build ti/k3-am642-sk.dtb
>>>>
>>>>> Why would we want to go and fix it with non-standard?
>>>>>
>>>>
>>>> The dtbs need to have their dir prefixed or there could be collisions
>>>
>>> The key here is we're talking about what's used in FIT images, and not
>>> just loaded directly. All of the cases where fdtfile is used on arm64
>>> platforms in tree today use "/" because it's loading a literal. In this
>>> case, why again is OE mangling the name, and what are we using it for
>>> again here? In other words, why can't it be treated as "/" to match the
>>> load a file case? And if it _must_ be mangled, must we still use fdtfile
>>> and not something else?
>>>
>>
>> So to match other plats, we should:
>>
>> setenv fdtfile ti/k3-am642-sk.dtb
>>
>> That way loading works in the non-FIT case (and we just need to stop moving
>> all the DTBs out of the ti/ to the root dir (which is probably broken on our
>> part anyway..))
> 
> Yes, this sounds right for the non-FIT case to match other platforms /
> etc.
> 
>> Then when we use "fdtfile" in the FIT case, we just mangle ("/"->"_") it
>> at that point only before use. That work for everyone?
> 
> Well, what _is_ the FIT case and how does it go exactly? I still want to
> know why we're mangling things and come up with something that'll work
> for when someone says "I've got an imx8mm and I'm using a FIT image from
> OE and this doesn't work!".
> 

So what happens is 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 _ [0]. We select our FIT config using the
"fdtfile" env var so we don't duplicate the above board_name to fdt
logic. Result is fdtfile needs mangled when used to select a config
node from OE made FIT image.

Andrew

[0] https://git.openembedded.org/openembedded-core/tree/meta/classes-recipe/kernel-fitimage.bbclass#n425

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

* Re: [PATCH] include: configs: Change dtb names in fitImage to match oe-core
  2023-03-31 18:52           ` Andrew Davis
@ 2023-03-31 19:06             ` Tom Rini
  0 siblings, 0 replies; 9+ messages in thread
From: Tom Rini @ 2023-03-31 19:06 UTC (permalink / raw)
  To: Andrew Davis
  Cc: Nishanth Menon, Ryan Eatmon, Praneeth Bajjuri, Bryan Brattlof, u-boot

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

On Fri, Mar 31, 2023 at 01:52:44PM -0500, Andrew Davis wrote:
> On 3/31/23 1:36 PM, Tom Rini wrote:
> > On Fri, Mar 31, 2023 at 01:23:23PM -0500, Andrew Davis wrote:
> > > On 3/31/23 1:11 PM, Tom Rini wrote:
> > > > On Fri, Mar 31, 2023 at 12:19:14PM -0500, Andrew Davis wrote:
> > > > > On 3/31/23 12:04 PM, Nishanth Menon wrote:
> > > > > > On 16:06-20230330, Ryan Eatmon wrote:
> > > > > > > The oe-core class for assembling the fitImage includes the vendor
> > > > > > > sub-directory (with the / changed to _) in the config sections of
> > > > > > > the fitImage.  Our env var settings for chosing which section to
> > > > > > > boot from needs to be updated to agree with the fitImage.
> > > > > > > 
> > > > > > > Signed-off-by: Ryan Eatmon <reatmon@ti.com>
> > > > > > > ---
> > > > > > >     include/configs/am64x_evm.h  | 4 ++--
> > > > > > >     include/configs/am65x_evm.h  | 2 +-
> > > > > > >     include/configs/j721e_evm.h  | 6 +++---
> > > > > > >     include/configs/j721s2_evm.h | 6 +++---
> > > > > > >     4 files changed, 9 insertions(+), 9 deletions(-)
> > > > > > > 
> > > > > > > diff --git a/include/configs/am64x_evm.h b/include/configs/am64x_evm.h
> > > > > > > index 26a7f2521e..456a44730c 100644
> > > > > > > --- a/include/configs/am64x_evm.h
> > > > > > > +++ b/include/configs/am64x_evm.h
> > > > > > > @@ -26,9 +26,9 @@
> > > > > > >     #define EXTRA_ENV_AM642_BOARD_SETTINGS					\
> > > > > > >     	"findfdt="							\
> > > > > > >     		"if test $board_name = am64x_gpevm; then " \
> > > > > > > -			"setenv fdtfile k3-am642-evm.dtb; fi; " \
> > > > > > > +			"setenv fdtfile ti_k3-am642-evm.dtb; fi; " \
> > > > > > >     		"if test $board_name = am64x_skevm; then " \
> > > > > > > -			"setenv fdtfile k3-am642-sk.dtb; fi;" \
> > > > > > > +			"setenv fdtfile ti_k3-am642-sk.dtb; fi;" \
> > > > > > 
> > > > > > 
> > > > > > Kernel.org builds k3-am642-sk.dtb
> > > > > > 
> > > > > 
> > > > > Nope, kernel.org build ti/k3-am642-sk.dtb
> > > > > 
> > > > > > Why would we want to go and fix it with non-standard?
> > > > > > 
> > > > > 
> > > > > The dtbs need to have their dir prefixed or there could be collisions
> > > > 
> > > > The key here is we're talking about what's used in FIT images, and not
> > > > just loaded directly. All of the cases where fdtfile is used on arm64
> > > > platforms in tree today use "/" because it's loading a literal. In this
> > > > case, why again is OE mangling the name, and what are we using it for
> > > > again here? In other words, why can't it be treated as "/" to match the
> > > > load a file case? And if it _must_ be mangled, must we still use fdtfile
> > > > and not something else?
> > > > 
> > > 
> > > So to match other plats, we should:
> > > 
> > > setenv fdtfile ti/k3-am642-sk.dtb
> > > 
> > > That way loading works in the non-FIT case (and we just need to stop moving
> > > all the DTBs out of the ti/ to the root dir (which is probably broken on our
> > > part anyway..))
> > 
> > Yes, this sounds right for the non-FIT case to match other platforms /
> > etc.
> > 
> > > Then when we use "fdtfile" in the FIT case, we just mangle ("/"->"_") it
> > > at that point only before use. That work for everyone?
> > 
> > Well, what _is_ the FIT case and how does it go exactly? I still want to
> > know why we're mangling things and come up with something that'll work
> > for when someone says "I've got an imx8mm and I'm using a FIT image from
> > OE and this doesn't work!".
> > 
> 
> So what happens is 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 _ [0]. We select our FIT config using the
> "fdtfile" env var so we don't duplicate the above board_name to fdt
> logic. Result is fdtfile needs mangled when used to select a config
> node from OE made FIT image.

OK, so the next step would be to use setexpr + regex to mangle fdtfile
to get the node name to use, so you don't have to duplicate the logic.

-- 
Tom

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

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

* [PATCH] include: configs: Change dtb names in fitImage to match oe-core
@ 2023-03-30 20:55 Ryan Eatmon
  0 siblings, 0 replies; 9+ messages in thread
From: Ryan Eatmon @ 2023-03-30 20:55 UTC (permalink / raw)
  To: Praneeth Bajjuri, Tom Rini, Andrew Davis, Brattlof, Bryan, u-boot

The oe-core class for assembling the fitImage includes the vendor
sub-directory (with the / changed to _) in the config sections of
the fitImage.  Our env var settings for chosing which section to
boot from needs to be updated to agree with the fitImage.

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
---
 include/configs/am64x_evm.h  | 4 ++--
 include/configs/am65x_evm.h  | 2 +-
 include/configs/j721e_evm.h  | 6 +++---
 include/configs/j721s2_evm.h | 6 +++---
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/configs/am64x_evm.h b/include/configs/am64x_evm.h
index 26a7f2521e..456a44730c 100644
--- a/include/configs/am64x_evm.h
+++ b/include/configs/am64x_evm.h
@@ -26,9 +26,9 @@
 #define EXTRA_ENV_AM642_BOARD_SETTINGS					\
 	"findfdt="							\
 		"if test $board_name = am64x_gpevm; then " \
-			"setenv fdtfile k3-am642-evm.dtb; fi; " \
+			"setenv fdtfile ti_k3-am642-evm.dtb; fi; " \
 		"if test $board_name = am64x_skevm; then " \
-			"setenv fdtfile k3-am642-sk.dtb; fi;" \
+			"setenv fdtfile ti_k3-am642-sk.dtb; fi;" \
 		"if test $fdtfile = undefined; then " \
 			"echo WARNING: Could not determine device tree to use; fi; \0" \
 	"name_kern=Image\0"						\
diff --git a/include/configs/am65x_evm.h b/include/configs/am65x_evm.h
index 33dd6cfdfa..60a7eb1453 100644
--- a/include/configs/am65x_evm.h
+++ b/include/configs/am65x_evm.h
@@ -24,7 +24,7 @@
 /* U-Boot general configuration */
 #define EXTRA_ENV_AM65X_BOARD_SETTINGS					\
 	"findfdt="							\
-		"setenv name_fdt k3-am654-base-board.dtb;"		\
+		"setenv name_fdt ti_k3-am654-base-board.dtb;"		\
 		"setenv fdtfile ${name_fdt}\0"				\
 	"name_kern=Image\0"						\
 	"console=ttyS2,115200n8\0"					\
diff --git a/include/configs/j721e_evm.h b/include/configs/j721e_evm.h
index 48b1cea6e3..eac5cd5b76 100644
--- a/include/configs/j721e_evm.h
+++ b/include/configs/j721e_evm.h
@@ -34,11 +34,11 @@
 #define EXTRA_ENV_J721E_BOARD_SETTINGS					\
 	"default_device_tree=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0"	\
 	"findfdt="							\
-		"setenv name_fdt ${default_device_tree};"		\
+		"setenv name_fdt ti_${default_device_tree};"		\
 		"if test $board_name = j721e; then "			\
-			"setenv name_fdt k3-j721e-common-proc-board.dtb; fi;" \
+			"setenv name_fdt ti_k3-j721e-common-proc-board.dtb; fi;" \
 		"if test $board_name = j721e-eaik || test $board_name = j721e-sk; then "		\
-			"setenv name_fdt k3-j721e-sk.dtb; fi;"	\
+			"setenv name_fdt ti_k3-j721e-sk.dtb; fi;"	\
 		"setenv fdtfile ${name_fdt}\0"				\
 	"name_kern=Image\0"						\
 	"console=ttyS2,115200n8\0"					\
diff --git a/include/configs/j721s2_evm.h b/include/configs/j721s2_evm.h
index bfada9eebc..b30a4a8da4 100644
--- a/include/configs/j721s2_evm.h
+++ b/include/configs/j721s2_evm.h
@@ -31,11 +31,11 @@
 #define EXTRA_ENV_J721S2_BOARD_SETTINGS					\
 	"default_device_tree=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0"	\
 	"findfdt="							\
-		"setenv name_fdt ${default_device_tree};"		\
+		"setenv name_fdt ti_${default_device_tree};"		\
 		"if test $board_name = j721s2; then "			\
-			"setenv name_fdt k3-j721s2-common-proc-board.dtb; fi;" \
+			"setenv name_fdt ti_k3-j721s2-common-proc-board.dtb; fi;" \
 		"if test $board_name = am68-sk; then "			\
-			"setenv name_fdt k3-am68-sk-base-board.dtb; fi;"\
+			"setenv name_fdt ti_k3-am68-sk-base-board.dtb; fi;"\
 		"setenv fdtfile ${name_fdt}\0"				\
 	"name_kern=Image\0"						\
 	"console=ttyS2,115200n8\0"					\
-- 
2.17.1


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

end of thread, other threads:[~2023-03-31 19:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-30 21:06 [PATCH] include: configs: Change dtb names in fitImage to match oe-core Ryan Eatmon
2023-03-31 17:04 ` Nishanth Menon
2023-03-31 17:19   ` Andrew Davis
2023-03-31 18:11     ` Tom Rini
2023-03-31 18:23       ` Andrew Davis
2023-03-31 18:36         ` Tom Rini
2023-03-31 18:52           ` Andrew Davis
2023-03-31 19:06             ` Tom Rini
  -- strict thread matches above, loose matches on Subject: below --
2023-03-30 20:55 Ryan Eatmon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).