All of lore.kernel.org
 help / color / mirror / Atom feed
* [master/scarthgap][PATCH] trusted-firmware-a: simplify TI customizations
@ 2025-02-19 21:48 Denys Dmytriyenko
  2025-02-19 22:23 ` [meta-ti] " Ryan Eatmon
  0 siblings, 1 reply; 4+ messages in thread
From: Denys Dmytriyenko @ 2025-02-19 21:48 UTC (permalink / raw)
  To: meta-ti; +Cc: Denys Dmytriyenko

From: Denys Dmytriyenko <denys@konsulko.com>

The original .bbappend started with just a few customizations behind
a :k3 SoC override, but eventually grew in size. It got converted into
a .inc file, which is behind the same SoC override and hence it gets
included by .bbappend only for K3 platforms:
https://git.yoctoproject.org/meta-ti/commit/?id=389f9a8b726868768a8bed6cbe0b2a1f18c05410

It doesn't make sense to use the same :k3 override inside this .inc
file for every variable. Moreover, it makes it harder to change
those variables downstream for any derivative platform or even for
upstream testing.

This change drops redundant :k3 SoC overrides, w/o changing existing
behavior. It allows easier modifications of such customizations from
downstream layers or a local.conf, e.g. SRC_URI_TRUSTED_FIRMWARE_A

Note that SRC_URI is set exactly the same as in upstream base .inc
file, but version-specific recipes in meta-arm tend to add extra
patches directly to SRC_URI, which is undesirable here. Thus, reset
SRC_URI back to its default.

Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
---
 .../trusted-firmware-a-ti.inc                 | 26 ++++++++++++-------
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ti.inc b/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ti.inc
index 9971e960..21aef489 100644
--- a/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ti.inc
+++ b/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ti.inc
@@ -1,14 +1,20 @@
-PV:k3 = "2.12+git"
-SRCREV_tfa:k3 = "5227171c079d0c7d22a6d37b5cec079c8c5bb4b1"
-LIC_FILES_CHKSUM:k3 = "file://docs/license.rst;md5=1118e32884721c0be33267bd7ae11130"
-SRC_URI:k3 = "git://github.com/TexasInstruments/arm-trusted-firmware.git;protocol=https;name=tfa;branch=ti-master"
-COMPATIBLE_MACHINE:k3 = "k3"
-TFA_BUILD_TARGET:k3 = "all"
-TFA_INSTALL_TARGET:k3 = "bl31"
-TFA_SPD:k3 = "opteed"
+# NOTE: This .inc file with customizations only gets included for K3 platforms
+
+PV = "2.12+git"
+SRCREV_tfa = "5227171c079d0c7d22a6d37b5cec079c8c5bb4b1"
+SRC_URI_TRUSTED_FIRMWARE_A = "git://github.com/TexasInstruments/arm-trusted-firmware.git;protocol=https"
+SRCBRANCH = "ti-master"
+SRC_URI = "${SRC_URI_TRUSTED_FIRMWARE_A};name=tfa;branch=${SRCBRANCH}"
+
+LIC_FILES_CHKSUM = "file://docs/license.rst;md5=1118e32884721c0be33267bd7ae11130"
+COMPATIBLE_MACHINE = "k3"
+
+TFA_BUILD_TARGET = "all"
+TFA_INSTALL_TARGET = "bl31"
+TFA_SPD = "opteed"
 
 # For am62lxx, install bl1 & bl31 using TFA_INSTALL_TARGET
 TFA_INSTALL_TARGET:am62lxx = "bl31 bl1"
 
-EXTRA_OEMAKE:append:k3 = "${@ ' K3_USART=' + d.getVar('TFA_K3_USART') if d.getVar('TFA_K3_USART') else ''}"
-EXTRA_OEMAKE:append:k3 = "${@ ' K3_PM_SYSTEM_SUSPEND=' + d.getVar('TFA_K3_SYSTEM_SUSPEND') if d.getVar('TFA_K3_SYSTEM_SUSPEND') else ''}"
+EXTRA_OEMAKE += "${@ 'K3_USART=' + d.getVar('TFA_K3_USART') if d.getVar('TFA_K3_USART') else ''}"
+EXTRA_OEMAKE += "${@ 'K3_PM_SYSTEM_SUSPEND=' + d.getVar('TFA_K3_SYSTEM_SUSPEND') if d.getVar('TFA_K3_SYSTEM_SUSPEND') else ''}"
-- 
2.25.1



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

* Re: [meta-ti] [master/scarthgap][PATCH] trusted-firmware-a: simplify TI customizations
  2025-02-19 21:48 [master/scarthgap][PATCH] trusted-firmware-a: simplify TI customizations Denys Dmytriyenko
@ 2025-02-19 22:23 ` Ryan Eatmon
  2025-02-19 22:53   ` Denys Dmytriyenko
  0 siblings, 1 reply; 4+ messages in thread
From: Ryan Eatmon @ 2025-02-19 22:23 UTC (permalink / raw)
  To: Denys Dmytriyenko, meta-ti; +Cc: Denys Dmytriyenko



On 2/19/2025 3:48 PM, Denys Dmytriyenko wrote:
> From: Denys Dmytriyenko <denys@konsulko.com>
> 
> The original .bbappend started with just a few customizations behind
> a :k3 SoC override, but eventually grew in size. It got converted into
> a .inc file, which is behind the same SoC override and hence it gets
> included by .bbappend only for K3 platforms:
> https://git.yoctoproject.org/meta-ti/commit/?id=389f9a8b726868768a8bed6cbe0b2a1f18c05410
> 
> It doesn't make sense to use the same :k3 override inside this .inc
> file for every variable. Moreover, it makes it harder to change
> those variables downstream for any derivative platform or even for
> upstream testing.
> 
> This change drops redundant :k3 SoC overrides, w/o changing existing
> behavior. It allows easier modifications of such customizations from
> downstream layers or a local.conf, e.g. SRC_URI_TRUSTED_FIRMWARE_A
> 
> Note that SRC_URI is set exactly the same as in upstream base .inc
> file, but version-specific recipes in meta-arm tend to add extra
> patches directly to SRC_URI, which is undesirable here. Thus, reset
> SRC_URI back to its default.
> 
> Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
> ---
>   .../trusted-firmware-a-ti.inc                 | 26 ++++++++++++-------
>   1 file changed, 16 insertions(+), 10 deletions(-)
> 
> diff --git a/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ti.inc b/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ti.inc
> index 9971e960..21aef489 100644
> --- a/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ti.inc
> +++ b/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ti.inc
> @@ -1,14 +1,20 @@
> -PV:k3 = "2.12+git"
> -SRCREV_tfa:k3 = "5227171c079d0c7d22a6d37b5cec079c8c5bb4b1"
> -LIC_FILES_CHKSUM:k3 = "file://docs/license.rst;md5=1118e32884721c0be33267bd7ae11130"
> -SRC_URI:k3 = "git://github.com/TexasInstruments/arm-trusted-firmware.git;protocol=https;name=tfa;branch=ti-master"
> -COMPATIBLE_MACHINE:k3 = "k3"
> -TFA_BUILD_TARGET:k3 = "all"
> -TFA_INSTALL_TARGET:k3 = "bl31"
> -TFA_SPD:k3 = "opteed"
> +# NOTE: This .inc file with customizations only gets included for K3 platforms
> +
> +PV = "2.12+git"
> +SRCREV_tfa = "5227171c079d0c7d22a6d37b5cec079c8c5bb4b1"
> +SRC_URI_TRUSTED_FIRMWARE_A = "git://github.com/TexasInstruments/arm-trusted-firmware.git;protocol=https"
> +SRCBRANCH = "ti-master"
> +SRC_URI = "${SRC_URI_TRUSTED_FIRMWARE_A};name=tfa;branch=${SRCBRANCH}"

I think this is already the value of SRC_URI from the main recipe...  so 
we shouldn't need to override it here if we are redefining the 
SRC_URI_TRUSTED_FIRMWARE_A variable.



> +LIC_FILES_CHKSUM = "file://docs/license.rst;md5=1118e32884721c0be33267bd7ae11130"
> +COMPATIBLE_MACHINE = "k3"
> +
> +TFA_BUILD_TARGET = "all"
> +TFA_INSTALL_TARGET = "bl31"
> +TFA_SPD = "opteed"
>   
>   # For am62lxx, install bl1 & bl31 using TFA_INSTALL_TARGET
>   TFA_INSTALL_TARGET:am62lxx = "bl31 bl1"
>   
> -EXTRA_OEMAKE:append:k3 = "${@ ' K3_USART=' + d.getVar('TFA_K3_USART') if d.getVar('TFA_K3_USART') else ''}"
> -EXTRA_OEMAKE:append:k3 = "${@ ' K3_PM_SYSTEM_SUSPEND=' + d.getVar('TFA_K3_SYSTEM_SUSPEND') if d.getVar('TFA_K3_SYSTEM_SUSPEND') else ''}"
> +EXTRA_OEMAKE += "${@ 'K3_USART=' + d.getVar('TFA_K3_USART') if d.getVar('TFA_K3_USART') else ''}"
> +EXTRA_OEMAKE += "${@ 'K3_PM_SYSTEM_SUSPEND=' + d.getVar('TFA_K3_SYSTEM_SUSPEND') if d.getVar('TFA_K3_SYSTEM_SUSPEND') else ''}"
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#18327): https://lists.yoctoproject.org/g/meta-ti/message/18327
> Mute This Topic: https://lists.yoctoproject.org/mt/111278675/6551054
> Group Owner: meta-ti+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [reatmon@ti.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 

-- 
Ryan Eatmon                reatmon@ti.com
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS


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

* Re: [meta-ti] [master/scarthgap][PATCH] trusted-firmware-a: simplify TI customizations
  2025-02-19 22:23 ` [meta-ti] " Ryan Eatmon
@ 2025-02-19 22:53   ` Denys Dmytriyenko
  2025-02-20 15:20     ` Ryan Eatmon
  0 siblings, 1 reply; 4+ messages in thread
From: Denys Dmytriyenko @ 2025-02-19 22:53 UTC (permalink / raw)
  To: reatmon; +Cc: meta-ti, Denys Dmytriyenko

On Wed, Feb 19, 2025 at 04:23:55PM -0600, Ryan Eatmon via lists.yoctoproject.org wrote:
> 
> 
> On 2/19/2025 3:48 PM, Denys Dmytriyenko wrote:
> >From: Denys Dmytriyenko <denys@konsulko.com>
> >
> >The original .bbappend started with just a few customizations behind
> >a :k3 SoC override, but eventually grew in size. It got converted into
> >a .inc file, which is behind the same SoC override and hence it gets
> >included by .bbappend only for K3 platforms:
> >https://git.yoctoproject.org/meta-ti/commit/?id=389f9a8b726868768a8bed6cbe0b2a1f18c05410
> >
> >It doesn't make sense to use the same :k3 override inside this .inc
> >file for every variable. Moreover, it makes it harder to change
> >those variables downstream for any derivative platform or even for
> >upstream testing.
> >
> >This change drops redundant :k3 SoC overrides, w/o changing existing
> >behavior. It allows easier modifications of such customizations from
> >downstream layers or a local.conf, e.g. SRC_URI_TRUSTED_FIRMWARE_A
> >
> >Note that SRC_URI is set exactly the same as in upstream base .inc
> >file, but version-specific recipes in meta-arm tend to add extra
> >patches directly to SRC_URI, which is undesirable here. Thus, reset
> >SRC_URI back to its default.
> >
> >Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
> >---
> >  .../trusted-firmware-a-ti.inc                 | 26 ++++++++++++-------
> >  1 file changed, 16 insertions(+), 10 deletions(-)
> >
> >diff --git a/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ti.inc b/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ti.inc
> >index 9971e960..21aef489 100644
> >--- a/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ti.inc
> >+++ b/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ti.inc
> >@@ -1,14 +1,20 @@
> >-PV:k3 = "2.12+git"
> >-SRCREV_tfa:k3 = "5227171c079d0c7d22a6d37b5cec079c8c5bb4b1"
> >-LIC_FILES_CHKSUM:k3 = "file://docs/license.rst;md5=1118e32884721c0be33267bd7ae11130"
> >-SRC_URI:k3 = "git://github.com/TexasInstruments/arm-trusted-firmware.git;protocol=https;name=tfa;branch=ti-master"
> >-COMPATIBLE_MACHINE:k3 = "k3"
> >-TFA_BUILD_TARGET:k3 = "all"
> >-TFA_INSTALL_TARGET:k3 = "bl31"
> >-TFA_SPD:k3 = "opteed"
> >+# NOTE: This .inc file with customizations only gets included for K3 platforms
> >+
> >+PV = "2.12+git"
> >+SRCREV_tfa = "5227171c079d0c7d22a6d37b5cec079c8c5bb4b1"
> >+SRC_URI_TRUSTED_FIRMWARE_A = "git://github.com/TexasInstruments/arm-trusted-firmware.git;protocol=https"
> >+SRCBRANCH = "ti-master"
> >+SRC_URI = "${SRC_URI_TRUSTED_FIRMWARE_A};name=tfa;branch=${SRCBRANCH}"
> 
> I think this is already the value of SRC_URI from the main recipe...
> so we shouldn't need to override it here if we are redefining the
> SRC_URI_TRUSTED_FIRMWARE_A variable.

It was actually explained in the commit log above...


> >+LIC_FILES_CHKSUM = "file://docs/license.rst;md5=1118e32884721c0be33267bd7ae11130"
> >+COMPATIBLE_MACHINE = "k3"
> >+
> >+TFA_BUILD_TARGET = "all"
> >+TFA_INSTALL_TARGET = "bl31"
> >+TFA_SPD = "opteed"
> >  # For am62lxx, install bl1 & bl31 using TFA_INSTALL_TARGET
> >  TFA_INSTALL_TARGET:am62lxx = "bl31 bl1"
> >-EXTRA_OEMAKE:append:k3 = "${@ ' K3_USART=' + d.getVar('TFA_K3_USART') if d.getVar('TFA_K3_USART') else ''}"
> >-EXTRA_OEMAKE:append:k3 = "${@ ' K3_PM_SYSTEM_SUSPEND=' + d.getVar('TFA_K3_SYSTEM_SUSPEND') if d.getVar('TFA_K3_SYSTEM_SUSPEND') else ''}"
> >+EXTRA_OEMAKE += "${@ 'K3_USART=' + d.getVar('TFA_K3_USART') if d.getVar('TFA_K3_USART') else ''}"
> >+EXTRA_OEMAKE += "${@ 'K3_PM_SYSTEM_SUSPEND=' + d.getVar('TFA_K3_SYSTEM_SUSPEND') if d.getVar('TFA_K3_SYSTEM_SUSPEND') else ''}"


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

* Re: [meta-ti] [master/scarthgap][PATCH] trusted-firmware-a: simplify TI customizations
  2025-02-19 22:53   ` Denys Dmytriyenko
@ 2025-02-20 15:20     ` Ryan Eatmon
  0 siblings, 0 replies; 4+ messages in thread
From: Ryan Eatmon @ 2025-02-20 15:20 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: meta-ti, Denys Dmytriyenko



On 2/19/2025 4:53 PM, Denys Dmytriyenko wrote:
> On Wed, Feb 19, 2025 at 04:23:55PM -0600, Ryan Eatmon via lists.yoctoproject.org wrote:
>>
>>
>> On 2/19/2025 3:48 PM, Denys Dmytriyenko wrote:
>>> From: Denys Dmytriyenko <denys@konsulko.com>
>>>
>>> The original .bbappend started with just a few customizations behind
>>> a :k3 SoC override, but eventually grew in size. It got converted into
>>> a .inc file, which is behind the same SoC override and hence it gets
>>> included by .bbappend only for K3 platforms:
>>> https://git.yoctoproject.org/meta-ti/commit/?id=389f9a8b726868768a8bed6cbe0b2a1f18c05410
>>>
>>> It doesn't make sense to use the same :k3 override inside this .inc
>>> file for every variable. Moreover, it makes it harder to change
>>> those variables downstream for any derivative platform or even for
>>> upstream testing.
>>>
>>> This change drops redundant :k3 SoC overrides, w/o changing existing
>>> behavior. It allows easier modifications of such customizations from
>>> downstream layers or a local.conf, e.g. SRC_URI_TRUSTED_FIRMWARE_A
>>>
>>> Note that SRC_URI is set exactly the same as in upstream base .inc
>>> file, but version-specific recipes in meta-arm tend to add extra
>>> patches directly to SRC_URI, which is undesirable here. Thus, reset
>>> SRC_URI back to its default.
>>>
>>> Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
>>> ---
>>>   .../trusted-firmware-a-ti.inc                 | 26 ++++++++++++-------
>>>   1 file changed, 16 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ti.inc b/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ti.inc
>>> index 9971e960..21aef489 100644
>>> --- a/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ti.inc
>>> +++ b/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ti.inc
>>> @@ -1,14 +1,20 @@
>>> -PV:k3 = "2.12+git"
>>> -SRCREV_tfa:k3 = "5227171c079d0c7d22a6d37b5cec079c8c5bb4b1"
>>> -LIC_FILES_CHKSUM:k3 = "file://docs/license.rst;md5=1118e32884721c0be33267bd7ae11130"
>>> -SRC_URI:k3 = "git://github.com/TexasInstruments/arm-trusted-firmware.git;protocol=https;name=tfa;branch=ti-master"
>>> -COMPATIBLE_MACHINE:k3 = "k3"
>>> -TFA_BUILD_TARGET:k3 = "all"
>>> -TFA_INSTALL_TARGET:k3 = "bl31"
>>> -TFA_SPD:k3 = "opteed"
>>> +# NOTE: This .inc file with customizations only gets included for K3 platforms
>>> +
>>> +PV = "2.12+git"
>>> +SRCREV_tfa = "5227171c079d0c7d22a6d37b5cec079c8c5bb4b1"
>>> +SRC_URI_TRUSTED_FIRMWARE_A = "git://github.com/TexasInstruments/arm-trusted-firmware.git;protocol=https"
>>> +SRCBRANCH = "ti-master"
>>> +SRC_URI = "${SRC_URI_TRUSTED_FIRMWARE_A};name=tfa;branch=${SRCBRANCH}"
>>
>> I think this is already the value of SRC_URI from the main recipe...
>> so we shouldn't need to override it here if we are redefining the
>> SRC_URI_TRUSTED_FIRMWARE_A variable.
> 
> It was actually explained in the commit log above...

Got it.


> 
>>> +LIC_FILES_CHKSUM = "file://docs/license.rst;md5=1118e32884721c0be33267bd7ae11130"
>>> +COMPATIBLE_MACHINE = "k3"
>>> +
>>> +TFA_BUILD_TARGET = "all"
>>> +TFA_INSTALL_TARGET = "bl31"
>>> +TFA_SPD = "opteed"
>>>   # For am62lxx, install bl1 & bl31 using TFA_INSTALL_TARGET
>>>   TFA_INSTALL_TARGET:am62lxx = "bl31 bl1"
>>> -EXTRA_OEMAKE:append:k3 = "${@ ' K3_USART=' + d.getVar('TFA_K3_USART') if d.getVar('TFA_K3_USART') else ''}"
>>> -EXTRA_OEMAKE:append:k3 = "${@ ' K3_PM_SYSTEM_SUSPEND=' + d.getVar('TFA_K3_SYSTEM_SUSPEND') if d.getVar('TFA_K3_SYSTEM_SUSPEND') else ''}"
>>> +EXTRA_OEMAKE += "${@ 'K3_USART=' + d.getVar('TFA_K3_USART') if d.getVar('TFA_K3_USART') else ''}"
>>> +EXTRA_OEMAKE += "${@ 'K3_PM_SYSTEM_SUSPEND=' + d.getVar('TFA_K3_SYSTEM_SUSPEND') if d.getVar('TFA_K3_SYSTEM_SUSPEND') else ''}"

-- 
Ryan Eatmon                reatmon@ti.com
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS


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

end of thread, other threads:[~2025-02-20 15:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-19 21:48 [master/scarthgap][PATCH] trusted-firmware-a: simplify TI customizations Denys Dmytriyenko
2025-02-19 22:23 ` [meta-ti] " Ryan Eatmon
2025-02-19 22:53   ` Denys Dmytriyenko
2025-02-20 15:20     ` Ryan Eatmon

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.