diff mbox series

[master/scarthgap,v3] ti-pka-fw: Add a recipe to package prebuilt PKA firmware

Message ID 20250731021744.1256347-1-b-padhi@ti.com
State Under Review
Delegated to: Ryan Eatmon
Headers show
Series [master/scarthgap,v3] ti-pka-fw: Add a recipe to package prebuilt PKA firmware | expand

Commit Message

Beleswar Padhi July 31, 2025, 2:17 a.m. UTC
Add a recipe to install the PKA firmware in root filesystem needed by
sa2_ul driver for PKA operations across all K3 platforms.

Signed-off-by: Beleswar Padhi <b-padhi@ti.com>
---
v3: Changelog:
1. Add '&' in Licence instead of '|'.
2. Remove alternatives, directly install firmware in /lib/firmware

Link to v2:
https://lore.kernel.org/all/20250730180302.7507-1-b-padhi@ti.com/

v2: Changelog:
1. Use MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS to package PKA firmware from
within meta-ti itself.
2. Update LICENCE name and LIC_FILES_CHKSUM to appropriate licence from
ti-linux-firmware.

Link to v1:
https://lore.kernel.org/all/20250730074831.2640806-1-b-padhi@ti.com/

 meta-ti-bsp/conf/machine/include/k3.inc       |  1 +
 .../recipes-bsp/ti-linux-fw/ti-linux-fw.inc   |  1 +
 .../recipes-bsp/ti-pka-fw/ti-pka-fw_git.bb    | 23 +++++++++++++++++++
 3 files changed, 25 insertions(+)
 create mode 100644 meta-ti-bsp/recipes-bsp/ti-pka-fw/ti-pka-fw_git.bb

Comments

Denys Dmytriyenko July 31, 2025, 6:45 p.m. UTC | #1
On Thu, Jul 31, 2025 at 07:47:44AM +0530, Beleswar Padhi via lists.yoctoproject.org wrote:
> Add a recipe to install the PKA firmware in root filesystem needed by
> sa2_ul driver for PKA operations across all K3 platforms.

So, I see that this firmware is still in the "ti-linux-firmware-next" branch 
and haven't been merged to the main "ti-linux-firmware" branch. Since Ryan 
merged this to "master-wip" of meta-ti, it now breaks my builds...

Also, see below for more comments.


> Signed-off-by: Beleswar Padhi <b-padhi@ti.com>
> ---
> v3: Changelog:
> 1. Add '&' in Licence instead of '|'.
> 2. Remove alternatives, directly install firmware in /lib/firmware
> 
> Link to v2:
> https://lore.kernel.org/all/20250730180302.7507-1-b-padhi@ti.com/
> 
> v2: Changelog:
> 1. Use MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS to package PKA firmware from
> within meta-ti itself.
> 2. Update LICENCE name and LIC_FILES_CHKSUM to appropriate licence from
> ti-linux-firmware.
> 
> Link to v1:
> https://lore.kernel.org/all/20250730074831.2640806-1-b-padhi@ti.com/
> 
>  meta-ti-bsp/conf/machine/include/k3.inc       |  1 +
>  .../recipes-bsp/ti-linux-fw/ti-linux-fw.inc   |  1 +
>  .../recipes-bsp/ti-pka-fw/ti-pka-fw_git.bb    | 23 +++++++++++++++++++
>  3 files changed, 25 insertions(+)
>  create mode 100644 meta-ti-bsp/recipes-bsp/ti-pka-fw/ti-pka-fw_git.bb
> 
> diff --git a/meta-ti-bsp/conf/machine/include/k3.inc b/meta-ti-bsp/conf/machine/include/k3.inc
> index 7ec6b51e..fdcf193d 100644
> --- a/meta-ti-bsp/conf/machine/include/k3.inc
> +++ b/meta-ti-bsp/conf/machine/include/k3.inc
> @@ -40,6 +40,7 @@ UBI_VOLNAME = "rootfs"
>  
>  # List common SoC features, may need to add touchscreen for specific machines
>  MACHINE_FEATURES = "apm usbgadget usbhost vfat ext2 alsa pci optee-ftpm"
> +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "ti-pka-fw"
>  
>  IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap"
>  
> diff --git a/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc b/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc
> index 863d1a7e..7fe2c592 100644
> --- a/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc
> +++ b/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc
> @@ -18,6 +18,7 @@ TI_DM_FW_VERSION = "11.01.09"
>  TI_SYSFW_VERSION = "11.01.05"
>  TI_HSM_DEMO_FW_VERSION = "11.00.09"
>  TAD5212_FW_VERSION = "1.0.0.0"
> +TI_PKA_FW_VERSION = "2.1.0"
>  
>  TI_LINUX_FW_SRCREV ?= "f59a711599249ecac75fea38b7a15ef9137d650d"
>  SRCREV = "${TI_LINUX_FW_SRCREV}"
> diff --git a/meta-ti-bsp/recipes-bsp/ti-pka-fw/ti-pka-fw_git.bb b/meta-ti-bsp/recipes-bsp/ti-pka-fw/ti-pka-fw_git.bb
> new file mode 100644
> index 00000000..49ae0251
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-bsp/ti-pka-fw/ti-pka-fw_git.bb
> @@ -0,0 +1,23 @@
> +SUMMARY = "PKA prebuilt binary firmware image"
> +
> +LICENSE = "TI-TFL & INSIDE Secure"

1. No spaces in the license name allowed. Normally dash "-" is used instead.

2. For every license listed in the LICENSE variable, there should be a 
corresponding file of the same name in one of the LICENSE_PATH. All common 
licenses are provided by OE-Core:
https://git.openembedded.org/openembedded-core/tree/meta/files/common-licenses
But any vendor-specific licenses should be provided by a corresponding layer. 
And meta-ti provides such licenses here:
https://git.yoctoproject.org/meta-ti/tree/meta-ti-bsp/licenses

So, if you need to refer "INSIDE-Secure" license, you should add a 
corresponding file with the license text in meta-ti-bsp/licenses.



> +LIC_FILES_CHKSUM = "file://LICENCE.pka_fw;md5=dc20391b287874f0dce069cf87917206"
> +
> +COMPATIBLE_MACHINE = "k3"
> +
> +require recipes-bsp/ti-linux-fw/ti-linux-fw.inc
> +
> +PV = "${TI_PKA_FW_VERSION}"
> +PR = "${INC_PR}.0"
> +
> +PKA_FW_DIR = "ti-pka"
> +
> +INSTALL_PKA_FW_DIR = "${nonarch_base_libdir}/firmware"
> +
> +PKA_FW_NAME = "eip29t2_2.1.0.bin"
> +
> +do_install() {
> +    # Install Firmware
> +    install -d ${D}${INSTALL_PKA_FW_DIR}
> +    install -m 0644 ${S}/${PKA_FW_DIR}/${PKA_FW_NAME} ${D}/${INSTALL_PKA_FW_DIR}/${PKA_FW_NAME}
> +}
> -- 
> 2.34.1
Ryan Eatmon July 31, 2025, 7:31 p.m. UTC | #2
On 7/31/2025 1:45 PM, Denys Dmytriyenko wrote:
> On Thu, Jul 31, 2025 at 07:47:44AM +0530, Beleswar Padhi via lists.yoctoproject.org wrote:
>> Add a recipe to install the PKA firmware in root filesystem needed by
>> sa2_ul driver for PKA operations across all K3 platforms.
> 
> So, I see that this firmware is still in the "ti-linux-firmware-next" branch
> and haven't been merged to the main "ti-linux-firmware" branch. Since Ryan
> merged this to "master-wip" of meta-ti, it now breaks my builds...

Yeah sorry.  I'll remove it.



> Also, see below for more comments. >
>> Signed-off-by: Beleswar Padhi <b-padhi@ti.com>
>> ---
>> v3: Changelog:
>> 1. Add '&' in Licence instead of '|'.
>> 2. Remove alternatives, directly install firmware in /lib/firmware
>>
>> Link to v2:
>> https://lore.kernel.org/all/20250730180302.7507-1-b-padhi@ti.com/
>>
>> v2: Changelog:
>> 1. Use MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS to package PKA firmware from
>> within meta-ti itself.
>> 2. Update LICENCE name and LIC_FILES_CHKSUM to appropriate licence from
>> ti-linux-firmware.
>>
>> Link to v1:
>> https://lore.kernel.org/all/20250730074831.2640806-1-b-padhi@ti.com/
>>
>>   meta-ti-bsp/conf/machine/include/k3.inc       |  1 +
>>   .../recipes-bsp/ti-linux-fw/ti-linux-fw.inc   |  1 +
>>   .../recipes-bsp/ti-pka-fw/ti-pka-fw_git.bb    | 23 +++++++++++++++++++
>>   3 files changed, 25 insertions(+)
>>   create mode 100644 meta-ti-bsp/recipes-bsp/ti-pka-fw/ti-pka-fw_git.bb
>>
>> diff --git a/meta-ti-bsp/conf/machine/include/k3.inc b/meta-ti-bsp/conf/machine/include/k3.inc
>> index 7ec6b51e..fdcf193d 100644
>> --- a/meta-ti-bsp/conf/machine/include/k3.inc
>> +++ b/meta-ti-bsp/conf/machine/include/k3.inc
>> @@ -40,6 +40,7 @@ UBI_VOLNAME = "rootfs"
>>   
>>   # List common SoC features, may need to add touchscreen for specific machines
>>   MACHINE_FEATURES = "apm usbgadget usbhost vfat ext2 alsa pci optee-ftpm"
>> +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "ti-pka-fw"
>>   
>>   IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap"
>>   
>> diff --git a/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc b/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc
>> index 863d1a7e..7fe2c592 100644
>> --- a/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc
>> +++ b/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc
>> @@ -18,6 +18,7 @@ TI_DM_FW_VERSION = "11.01.09"
>>   TI_SYSFW_VERSION = "11.01.05"
>>   TI_HSM_DEMO_FW_VERSION = "11.00.09"
>>   TAD5212_FW_VERSION = "1.0.0.0"
>> +TI_PKA_FW_VERSION = "2.1.0"
>>   
>>   TI_LINUX_FW_SRCREV ?= "f59a711599249ecac75fea38b7a15ef9137d650d"
>>   SRCREV = "${TI_LINUX_FW_SRCREV}"
>> diff --git a/meta-ti-bsp/recipes-bsp/ti-pka-fw/ti-pka-fw_git.bb b/meta-ti-bsp/recipes-bsp/ti-pka-fw/ti-pka-fw_git.bb
>> new file mode 100644
>> index 00000000..49ae0251
>> --- /dev/null
>> +++ b/meta-ti-bsp/recipes-bsp/ti-pka-fw/ti-pka-fw_git.bb
>> @@ -0,0 +1,23 @@
>> +SUMMARY = "PKA prebuilt binary firmware image"
>> +
>> +LICENSE = "TI-TFL & INSIDE Secure"
> 
> 1. No spaces in the license name allowed. Normally dash "-" is used instead.
> 
> 2. For every license listed in the LICENSE variable, there should be a
> corresponding file of the same name in one of the LICENSE_PATH. All common
> licenses are provided by OE-Core:
> https://git.openembedded.org/openembedded-core/tree/meta/files/common-licenses
> But any vendor-specific licenses should be provided by a corresponding layer.
> And meta-ti provides such licenses here:
> https://git.yoctoproject.org/meta-ti/tree/meta-ti-bsp/licenses
> 
> So, if you need to refer "INSIDE-Secure" license, you should add a
> corresponding file with the license text in meta-ti-bsp/licenses.

We will need to do this in a follow on patch since we are already 
sucking this patch onto next for a CICD promotion.



> 
> 
>> +LIC_FILES_CHKSUM = "file://LICENCE.pka_fw;md5=dc20391b287874f0dce069cf87917206"
>> +
>> +COMPATIBLE_MACHINE = "k3"
>> +
>> +require recipes-bsp/ti-linux-fw/ti-linux-fw.inc
>> +
>> +PV = "${TI_PKA_FW_VERSION}"
>> +PR = "${INC_PR}.0"
>> +
>> +PKA_FW_DIR = "ti-pka"
>> +
>> +INSTALL_PKA_FW_DIR = "${nonarch_base_libdir}/firmware"
>> +
>> +PKA_FW_NAME = "eip29t2_2.1.0.bin"
>> +
>> +do_install() {
>> +    # Install Firmware
>> +    install -d ${D}${INSTALL_PKA_FW_DIR}
>> +    install -m 0644 ${S}/${PKA_FW_DIR}/${PKA_FW_NAME} ${D}/${INSTALL_PKA_FW_DIR}/${PKA_FW_NAME}
>> +}
>> -- 
>> 2.34.1
diff mbox series

Patch

diff --git a/meta-ti-bsp/conf/machine/include/k3.inc b/meta-ti-bsp/conf/machine/include/k3.inc
index 7ec6b51e..fdcf193d 100644
--- a/meta-ti-bsp/conf/machine/include/k3.inc
+++ b/meta-ti-bsp/conf/machine/include/k3.inc
@@ -40,6 +40,7 @@  UBI_VOLNAME = "rootfs"
 
 # List common SoC features, may need to add touchscreen for specific machines
 MACHINE_FEATURES = "apm usbgadget usbhost vfat ext2 alsa pci optee-ftpm"
+MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "ti-pka-fw"
 
 IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap"
 
diff --git a/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc b/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc
index 863d1a7e..7fe2c592 100644
--- a/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc
+++ b/meta-ti-bsp/recipes-bsp/ti-linux-fw/ti-linux-fw.inc
@@ -18,6 +18,7 @@  TI_DM_FW_VERSION = "11.01.09"
 TI_SYSFW_VERSION = "11.01.05"
 TI_HSM_DEMO_FW_VERSION = "11.00.09"
 TAD5212_FW_VERSION = "1.0.0.0"
+TI_PKA_FW_VERSION = "2.1.0"
 
 TI_LINUX_FW_SRCREV ?= "f59a711599249ecac75fea38b7a15ef9137d650d"
 SRCREV = "${TI_LINUX_FW_SRCREV}"
diff --git a/meta-ti-bsp/recipes-bsp/ti-pka-fw/ti-pka-fw_git.bb b/meta-ti-bsp/recipes-bsp/ti-pka-fw/ti-pka-fw_git.bb
new file mode 100644
index 00000000..49ae0251
--- /dev/null
+++ b/meta-ti-bsp/recipes-bsp/ti-pka-fw/ti-pka-fw_git.bb
@@ -0,0 +1,23 @@ 
+SUMMARY = "PKA prebuilt binary firmware image"
+
+LICENSE = "TI-TFL & INSIDE Secure"
+LIC_FILES_CHKSUM = "file://LICENCE.pka_fw;md5=dc20391b287874f0dce069cf87917206"
+
+COMPATIBLE_MACHINE = "k3"
+
+require recipes-bsp/ti-linux-fw/ti-linux-fw.inc
+
+PV = "${TI_PKA_FW_VERSION}"
+PR = "${INC_PR}.0"
+
+PKA_FW_DIR = "ti-pka"
+
+INSTALL_PKA_FW_DIR = "${nonarch_base_libdir}/firmware"
+
+PKA_FW_NAME = "eip29t2_2.1.0.bin"
+
+do_install() {
+    # Install Firmware
+    install -d ${D}${INSTALL_PKA_FW_DIR}
+    install -m 0644 ${S}/${PKA_FW_DIR}/${PKA_FW_NAME} ${D}/${INSTALL_PKA_FW_DIR}/${PKA_FW_NAME}
+}