diff mbox series

[meta-ti,master/scarthgap] recipes-bsp: u-boot: Fix PACKAGECONFIG[dm] arguments

Message ID 20250425204857.3271868-1-c-shilwant@ti.com
State Accepted
Delegated to: Ryan Eatmon
Headers show
Series [meta-ti,master/scarthgap] recipes-bsp: u-boot: Fix PACKAGECONFIG[dm] arguments | expand

Commit Message

Chirag Shilwant April 25, 2025, 8:48 p.m. UTC
* As observed in the u-boot makefile [0][1], the argument
anticipated by u-boot binman is "TI_DM" instead of "DM".
Hence, fix the same in meta-ti-bsp.

* The behavior went unnoticed until now because "ti-dm"
was still being sourced from BINMAN_INDIRS, which referred
to "ti-linux-firmware" and the PACKAGECONFIG[dm] feature
was redundant.

[0]: https://github.com/u-boot/u-boot/blob/v2025.01/Makefile#L1408

[1]: https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/Makefile?h=ti-u-boot-2025.01#n1409

Signed-off-by: Chirag Shilwant <c-shilwant@ti.com>
---
 meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrew Davis April 25, 2025, 9:31 p.m. UTC | #1
On 4/25/25 3:48 PM, Chirag Shilwant wrote:
> * As observed in the u-boot makefile [0][1], the argument
> anticipated by u-boot binman is "TI_DM" instead of "DM".
> Hence, fix the same in meta-ti-bsp.
> 
> * The behavior went unnoticed until now because "ti-dm"
> was still being sourced from BINMAN_INDIRS, which referred
> to "ti-linux-firmware" and the PACKAGECONFIG[dm] feature
> was redundant.
> 
> [0]: https://github.com/u-boot/u-boot/blob/v2025.01/Makefile#L1408
> 
> [1]: https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/Makefile?h=ti-u-boot-2025.01#n1409
> 
> Signed-off-by: Chirag Shilwant <c-shilwant@ti.com>
> ---

Acked-by: Andrew Davis <afd@ti.com>

>   meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
> index 9a74b840..e337f84f 100644
> --- a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
> +++ b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
> @@ -63,7 +63,7 @@ PLAT_SFX:am62pxx = "am62pxx"
>   PACKAGECONFIG[ap-trusted-rom] = "BL1=${STAGING_DIR_HOST}/firmware/bl1.bin,,trusted-firmware-a"
>   PACKAGECONFIG[atf] = "BL31=${STAGING_DIR_HOST}/firmware/bl31.bin,,trusted-firmware-a"
>   PACKAGECONFIG[optee] = "TEE=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/bl32.bin,,optee-os"
> -PACKAGECONFIG[dm] = "DM=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/ti-dm/${PLAT_SFX}/${DM_FIRMWARE},,ti-dm-fw"
> +PACKAGECONFIG[dm] = "TI_DM=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/ti-dm/${PLAT_SFX}/${DM_FIRMWARE},,ti-dm-fw"
>   
>   PACKAGECONFIG:append:aarch64 = " atf optee"
>   PACKAGECONFIG:append:j721e = " dm"
Denys Dmytriyenko April 26, 2025, 4:04 p.m. UTC | #2
On Sat, Apr 26, 2025 at 02:18:57AM +0530, Chirag Shilwant wrote:
> * As observed in the u-boot makefile [0][1], the argument
> anticipated by u-boot binman is "TI_DM" instead of "DM".
> Hence, fix the same in meta-ti-bsp.

Was it always "TI_DM", or was it "DM" initially in TI U-boot and later got 
changed tp "TI_DM" in upstream?


> * The behavior went unnoticed until now because "ti-dm"
> was still being sourced from BINMAN_INDIRS, which referred
> to "ti-linux-firmware" and the PACKAGECONFIG[dm] feature
> was redundant.
> 
> [0]: https://github.com/u-boot/u-boot/blob/v2025.01/Makefile#L1408
> 
> [1]: https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/Makefile?h=ti-u-boot-2025.01#n1409
> 
> Signed-off-by: Chirag Shilwant <c-shilwant@ti.com>
> ---
>  meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
> index 9a74b840..e337f84f 100644
> --- a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
> +++ b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
> @@ -63,7 +63,7 @@ PLAT_SFX:am62pxx = "am62pxx"
>  PACKAGECONFIG[ap-trusted-rom] = "BL1=${STAGING_DIR_HOST}/firmware/bl1.bin,,trusted-firmware-a"
>  PACKAGECONFIG[atf] = "BL31=${STAGING_DIR_HOST}/firmware/bl31.bin,,trusted-firmware-a"
>  PACKAGECONFIG[optee] = "TEE=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/bl32.bin,,optee-os"
> -PACKAGECONFIG[dm] = "DM=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/ti-dm/${PLAT_SFX}/${DM_FIRMWARE},,ti-dm-fw"
> +PACKAGECONFIG[dm] = "TI_DM=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/ti-dm/${PLAT_SFX}/${DM_FIRMWARE},,ti-dm-fw"
>  
>  PACKAGECONFIG:append:aarch64 = " atf optee"
>  PACKAGECONFIG:append:j721e = " dm"
> -- 
> 2.34.1
Chirag Shilwant April 28, 2025, 8:48 a.m. UTC | #3
On 26/04/25 21:34, Denys Dmytriyenko wrote:
> On Sat, Apr 26, 2025 at 02:18:57AM +0530, Chirag Shilwant wrote:
>> * As observed in the u-boot makefile [0][1], the argument
>> anticipated by u-boot binman is "TI_DM" instead of "DM".
>> Hence, fix the same in meta-ti-bsp.
> Was it always "TI_DM", or was it "DM" initially in TI U-boot and later got
> changed tp "TI_DM" in upstream?


As per [0] which added the TI_DM support in U-Boot, I see it was always 
TI_DM.
So, it was [1] where we added it as DM under meta-ti-bsp improperly

[0]: 
https://github.com/u-boot/u-boot/commit/23d2ef91efa40d525a4a5557704184bcfd64ca16

[1]: 
https://git.yoctoproject.org/meta-ti/commit/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc?id=b21d29d94694ac49b97a1f4ba428c7d8cd6fb64a

--
Chirag


>
>
>> * The behavior went unnoticed until now because "ti-dm"
>> was still being sourced from BINMAN_INDIRS, which referred
>> to "ti-linux-firmware" and the PACKAGECONFIG[dm] feature
>> was redundant.
>>
>> [0]: https://github.com/u-boot/u-boot/blob/v2025.01/Makefile#L1408
>>
>> [1]: https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/Makefile?h=ti-u-boot-2025.01#n1409
>>
>> Signed-off-by: Chirag Shilwant <c-shilwant@ti.com>
>> ---
>>   meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
>> index 9a74b840..e337f84f 100644
>> --- a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
>> +++ b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
>> @@ -63,7 +63,7 @@ PLAT_SFX:am62pxx = "am62pxx"
>>   PACKAGECONFIG[ap-trusted-rom] = "BL1=${STAGING_DIR_HOST}/firmware/bl1.bin,,trusted-firmware-a"
>>   PACKAGECONFIG[atf] = "BL31=${STAGING_DIR_HOST}/firmware/bl31.bin,,trusted-firmware-a"
>>   PACKAGECONFIG[optee] = "TEE=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/bl32.bin,,optee-os"
>> -PACKAGECONFIG[dm] = "DM=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/ti-dm/${PLAT_SFX}/${DM_FIRMWARE},,ti-dm-fw"
>> +PACKAGECONFIG[dm] = "TI_DM=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/ti-dm/${PLAT_SFX}/${DM_FIRMWARE},,ti-dm-fw"
>>   
>>   PACKAGECONFIG:append:aarch64 = " atf optee"
>>   PACKAGECONFIG:append:j721e = " dm"
>> -- 
>> 2.34.1
Andrew Davis April 28, 2025, 2:12 p.m. UTC | #4
On 4/28/25 3:48 AM, Chirag Shilwant wrote:
> 
> On 26/04/25 21:34, Denys Dmytriyenko wrote:
>> On Sat, Apr 26, 2025 at 02:18:57AM +0530, Chirag Shilwant wrote:
>>> * As observed in the u-boot makefile [0][1], the argument
>>> anticipated by u-boot binman is "TI_DM" instead of "DM".
>>> Hence, fix the same in meta-ti-bsp.
>> Was it always "TI_DM", or was it "DM" initially in TI U-boot and later got
>> changed tp "TI_DM" in upstream?
> 
> 
> As per [0] which added the TI_DM support in U-Boot, I see it was always TI_DM.
> So, it was [1] where we added it as DM under meta-ti-bsp improperly
> 
> [0]: https://github.com/u-boot/u-boot/commit/23d2ef91efa40d525a4a5557704184bcfd64ca16
> 
> [1]: https://git.yoctoproject.org/meta-ti/commit/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc?id=b21d29d94694ac49b97a1f4ba428c7d8cd6fb64a
> 

The original commit adding the line was here in 2020:

https://git.yoctoproject.org/meta-ti/commit/?id=4df0f89bb237c26118bdb239e2aef974333cca58

I almost remember some early version of U-Boot taking "DM" and it was changed to "TI_DM"
for upstream.

Either way it has been wrong for a long time and we have only been saved by BINMAN_INDIRS
just happening to have the default file inside. This will change soon, hence needing this
fix now.

Andrew

> -- 
> Chirag
> 
> 
>>
>>
>>> * The behavior went unnoticed until now because "ti-dm"
>>> was still being sourced from BINMAN_INDIRS, which referred
>>> to "ti-linux-firmware" and the PACKAGECONFIG[dm] feature
>>> was redundant.
>>>
>>> [0]: https://github.com/u-boot/u-boot/blob/v2025.01/Makefile#L1408
>>>
>>> [1]: https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/Makefile?h=ti-u-boot-2025.01#n1409
>>>
>>> Signed-off-by: Chirag Shilwant <c-shilwant@ti.com>
>>> ---
>>>   meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
>>> index 9a74b840..e337f84f 100644
>>> --- a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
>>> +++ b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
>>> @@ -63,7 +63,7 @@ PLAT_SFX:am62pxx = "am62pxx"
>>>   PACKAGECONFIG[ap-trusted-rom] = "BL1=${STAGING_DIR_HOST}/firmware/bl1.bin,,trusted-firmware-a"
>>>   PACKAGECONFIG[atf] = "BL31=${STAGING_DIR_HOST}/firmware/bl31.bin,,trusted-firmware-a"
>>>   PACKAGECONFIG[optee] = "TEE=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/bl32.bin,,optee-os"
>>> -PACKAGECONFIG[dm] = "DM=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/ti-dm/${PLAT_SFX}/${DM_FIRMWARE},,ti-dm-fw"
>>> +PACKAGECONFIG[dm] = "TI_DM=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/ti-dm/${PLAT_SFX}/${DM_FIRMWARE},,ti-dm-fw"
>>>   PACKAGECONFIG:append:aarch64 = " atf optee"
>>>   PACKAGECONFIG:append:j721e = " dm"
>>> -- 
>>> 2.34.1
diff mbox series

Patch

diff --git a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
index 9a74b840..e337f84f 100644
--- a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
+++ b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
@@ -63,7 +63,7 @@  PLAT_SFX:am62pxx = "am62pxx"
 PACKAGECONFIG[ap-trusted-rom] = "BL1=${STAGING_DIR_HOST}/firmware/bl1.bin,,trusted-firmware-a"
 PACKAGECONFIG[atf] = "BL31=${STAGING_DIR_HOST}/firmware/bl31.bin,,trusted-firmware-a"
 PACKAGECONFIG[optee] = "TEE=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/bl32.bin,,optee-os"
-PACKAGECONFIG[dm] = "DM=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/ti-dm/${PLAT_SFX}/${DM_FIRMWARE},,ti-dm-fw"
+PACKAGECONFIG[dm] = "TI_DM=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/ti-dm/${PLAT_SFX}/${DM_FIRMWARE},,ti-dm-fw"
 
 PACKAGECONFIG:append:aarch64 = " atf optee"
 PACKAGECONFIG:append:j721e = " dm"