diff mbox series

[meta-ti,scarthgap/master,1/3] meta-ti-bsp: Split out ti-edgeai-fw from ti-rtos-echo-test-fw

Message ID 20250627202436.582570-1-afd@ti.com
State Changes Requested
Delegated to: Ryan Eatmon
Headers show
Series [meta-ti,scarthgap/master,1/3] meta-ti-bsp: Split out ti-edgeai-fw from ti-rtos-echo-test-fw | expand

Commit Message

Andrew Davis June 27, 2025, 8:24 p.m. UTC
TI EdgeAI firmware is distinct from the other "echo test" firmware
provided by ti-rtos-echo-test-fw. It belongs in its own package.
Split out the EdgeAI firmware from the "echo test" firmware.

Give this a higher ALTERNATIVE_PRIORITY so that if both are installed
the default will still be EdgeAI firmware for AM62A devices.

Signed-off-by: Andrew Davis <afd@ti.com>
---
 .../recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb    | 58 +++++++++++++++++++
 .../ti-rtos-fw/ti-rtos-echo-test-fw.bb        | 29 +++++-----
 2 files changed, 72 insertions(+), 15 deletions(-)
 create mode 100644 meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb

Comments

Chirag Shilwant June 30, 2025, 10:16 a.m. UTC | #1
Hi Andrew,

On 28/06/25 01:54, Andrew Davis via lists.yoctoproject.org wrote:
> TI EdgeAI firmware is distinct from the other "echo test" firmware
> provided by ti-rtos-echo-test-fw. It belongs in its own package.
> Split out the EdgeAI firmware from the "echo test" firmware.


Looks like the corresponding meta-arago patch for adding ti-edgeai-fw in 
filesystem
is missing from the meta-arago lists.

We have added ti-rtos-echo-test-fw in following recipes, so similar 
should be done
for ti-edgeai-fw to ensure that CICD builds [0] have EdgeAI C7x IPC 
firmwares packaged.


~/source/meta-arago$ find . | grep -rn "ti-rtos-echo-test-fw"
meta-arago-test/recipes-core/packagegroups/ti-test.bb:117: 
ti-rtos-echo-test-fw \
meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-console.bb:70: 
ti-rtos-echo-test-fw \
meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bb:61:UTILS:append:k3 
= " ti-rtos-echo-test-fw"



[0]: 
https://software-dl.ti.com/cicd-report/linux/index.html?section=platform&platform=am62axx



--
Chirag



> Give this a higher ALTERNATIVE_PRIORITY so that if both are installed
> the default will still be EdgeAI firmware for AM62A devices.
>
> Signed-off-by: Andrew Davis <afd@ti.com>
> ---
>   .../recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb    | 58 +++++++++++++++++++
>   .../ti-rtos-fw/ti-rtos-echo-test-fw.bb        | 29 +++++-----
>   2 files changed, 72 insertions(+), 15 deletions(-)
>   create mode 100644 meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
>
> diff --git a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
> new file mode 100644
> index 00000000..67150968
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
> @@ -0,0 +1,58 @@
> +SUMMARY = "TI EdgeAI prebuilt binary firmware images"
> +
> +LICENSE = "TI-TFL"
> +LIC_FILES_CHKSUM = "file://${THISDIR}/../../licenses/TI-TFL;md5=a1b59cb7ba626b9dbbcbf00f3fbc438a"
> +
> +COMPATIBLE_MACHINE = "am62axx"
> +
> +PACKAGE_ARCH = "${MACHINE_ARCH}"
> +
> +inherit update-alternatives
> +
> +PLAT_SFX = ""
> +PLAT_SFX:am62axx = "am62axx"
> +
> +require recipes-bsp/ti-linux-fw/ti-linux-fw.inc
> +
> +PV = "${CORESDK_RTOS_VERSION}"
> +PR = "${INC_PR}.1"
> +
> +# Secure Build
> +inherit ti-secdev
> +
> +IPC_FW_DIR = "ti-ipc/${PLAT_SFX}"
> +
> +INSTALL_IPC_FW_DIR = "${nonarch_base_libdir}/firmware/${IPC_FW_DIR}"
> +
> +C7X_1_FW = "dsp_edgeai_c7x_1_release_strip.out"
> +
> +IPC_FW_LIST = ""
> +IPC_FW_LIST:am62axx = "${C7X_1_FW}"
> +
> +do_install() {
> +    # Sign Firmware
> +    for FW_NAME in ${IPC_FW_LIST}
> +    do
> +        ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${S}/${IPC_FW_DIR}/${FW_NAME} ${S}/${IPC_FW_DIR}/${FW_NAME}.signed
> +    done
> +
> +    # Install Firmware
> +    install -d ${D}${INSTALL_IPC_FW_DIR}
> +    for FW_NAME in ${IPC_FW_LIST}
> +    do
> +        install -m 0644 ${S}/${IPC_FW_DIR}/${FW_NAME}        ${D}${INSTALL_IPC_FW_DIR}
> +        install -m 0644 ${S}/${IPC_FW_DIR}/${FW_NAME}.signed ${D}${INSTALL_IPC_FW_DIR}
> +    done
> +}
> +
> +ALTERNATIVE:${PN}:am62axx = "\
> +                    am62a-c71_0-fw        am62a-c71_0-fw-sec \
> +                    "
> +
> +ALTERNATIVE_LINK_NAME[am62a-c71_0-fw]     = "${nonarch_base_libdir}/firmware/am62a-c71_0-fw"
> +ALTERNATIVE_LINK_NAME[am62a-c71_0-fw-sec] = "${nonarch_base_libdir}/firmware/am62a-c71_0-fw-sec"
> +
> +ALTERNATIVE_TARGET[am62a-c71_0-fw]     = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}"
> +ALTERNATIVE_TARGET[am62a-c71_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}.signed"
> +
> +ALTERNATIVE_PRIORITY = "20"
> diff --git a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
> index 7fffc9de..3e4db129 100644
> --- a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
> +++ b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
> @@ -36,21 +36,20 @@ IPC_FW_DIR = "ti-ipc/${PLAT_SFX}"
>   
>   INSTALL_IPC_FW_DIR = "${nonarch_base_libdir}/firmware/${IPC_FW_DIR}"
>   
> -MCU_1_0_FW =       "ipc_echo_test_mcu1_0_release_strip.xer5f"
> -MCU_1_1_FW =       "ipc_echo_test_mcu1_1_release_strip.xer5f"
> -MCU_2_0_FW =       "ipc_echo_test_mcu2_0_release_strip.xer5f"
> -MCU_2_1_FW =       "ipc_echo_test_mcu2_1_release_strip.xer5f"
> -MCU_3_0_FW =       "ipc_echo_test_mcu3_0_release_strip.xer5f"
> -MCU_3_1_FW =       "ipc_echo_test_mcu3_1_release_strip.xer5f"
> -MCU_4_0_FW =       "ipc_echo_test_mcu4_0_release_strip.xer5f"
> -MCU_4_1_FW =       "ipc_echo_test_mcu4_1_release_strip.xer5f"
> -C66_1_FW =         "ipc_echo_test_c66xdsp_1_release_strip.xe66"
> -C66_2_FW =         "ipc_echo_test_c66xdsp_2_release_strip.xe66"
> -C7X_1_FW =         "ipc_echo_test_c7x_1_release_strip.xe71"
> -C7X_1_FW:am62axx = "dsp_edgeai_c7x_1_release_strip.out"
> -C7X_2_FW =         "ipc_echo_test_c7x_2_release_strip.xe71"
> -C7X_3_FW =         "ipc_echo_test_c7x_3_release_strip.xe71"
> -C7X_4_FW =         "ipc_echo_test_c7x_4_release_strip.xe71"
> +MCU_1_0_FW = "ipc_echo_test_mcu1_0_release_strip.xer5f"
> +MCU_1_1_FW = "ipc_echo_test_mcu1_1_release_strip.xer5f"
> +MCU_2_0_FW = "ipc_echo_test_mcu2_0_release_strip.xer5f"
> +MCU_2_1_FW = "ipc_echo_test_mcu2_1_release_strip.xer5f"
> +MCU_3_0_FW = "ipc_echo_test_mcu3_0_release_strip.xer5f"
> +MCU_3_1_FW = "ipc_echo_test_mcu3_1_release_strip.xer5f"
> +MCU_4_0_FW = "ipc_echo_test_mcu4_0_release_strip.xer5f"
> +MCU_4_1_FW = "ipc_echo_test_mcu4_1_release_strip.xer5f"
> +C66_1_FW   = "ipc_echo_test_c66xdsp_1_release_strip.xe66"
> +C66_2_FW   = "ipc_echo_test_c66xdsp_2_release_strip.xe66"
> +C7X_1_FW   = "ipc_echo_test_c7x_1_release_strip.xe71"
> +C7X_2_FW   = "ipc_echo_test_c7x_2_release_strip.xe71"
> +C7X_3_FW   = "ipc_echo_test_c7x_3_release_strip.xe71"
> +C7X_4_FW   = "ipc_echo_test_c7x_4_release_strip.xe71"
>   
>   IPC_FW_LIST = ""
>   IPC_FW_LIST:am65xx =  "${MCU_1_0_FW} ${MCU_1_1_FW}"
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#18717): https://lists.yoctoproject.org/g/meta-ti/message/18717
> Mute This Topic: https://lists.yoctoproject.org/mt/113868641/7030289
> Group Owner: meta-ti+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [c-shilwant@ti.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Denys Dmytriyenko July 1, 2025, 12:28 a.m. UTC | #2
On Mon, Jun 30, 2025 at 03:46:14PM +0530, Chirag Shilwant via lists.yoctoproject.org wrote:
> Hi Andrew,
> 
> On 28/06/25 01:54, Andrew Davis via lists.yoctoproject.org wrote:
> >TI EdgeAI firmware is distinct from the other "echo test" firmware
> >provided by ti-rtos-echo-test-fw. It belongs in its own package.
> >Split out the EdgeAI firmware from the "echo test" firmware.
> 
> 
> Looks like the corresponding meta-arago patch for adding
> ti-edgeai-fw in filesystem
> is missing from the meta-arago lists.
> 
> We have added ti-rtos-echo-test-fw in following recipes, so similar
> should be done
> for ti-edgeai-fw to ensure that CICD builds [0] have EdgeAI C7x IPC
> firmwares packaged.
> 
> 
> ~/source/meta-arago$ find . | grep -rn "ti-rtos-echo-test-fw"
> meta-arago-test/recipes-core/packagegroups/ti-test.bb:117:
> ti-rtos-echo-test-fw \
> meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-console.bb:70:
> ti-rtos-echo-test-fw \
> meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bb:61:UTILS:append:k3
> = " ti-rtos-echo-test-fw"

Instead of doing it in images or packagegroups, a better alternative would 
be to list FW images in either MACHINE_ESSENTIAL_EXTRA_RDEPENDS or 
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS, as we already do for most of the FWs.

That way it will work for any distro or image built for the same platform.


> [0]: https://software-dl.ti.com/cicd-report/linux/index.html?section=platform&platform=am62axx
> 
> 
> 
> --
> Chirag
> 
> 
> 
> >Give this a higher ALTERNATIVE_PRIORITY so that if both are installed
> >the default will still be EdgeAI firmware for AM62A devices.
> >
> >Signed-off-by: Andrew Davis <afd@ti.com>
> >---
> >  .../recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb    | 58 +++++++++++++++++++
> >  .../ti-rtos-fw/ti-rtos-echo-test-fw.bb        | 29 +++++-----
> >  2 files changed, 72 insertions(+), 15 deletions(-)
> >  create mode 100644 meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
> >
> >diff --git a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
> >new file mode 100644
> >index 00000000..67150968
> >--- /dev/null
> >+++ b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
> >@@ -0,0 +1,58 @@
> >+SUMMARY = "TI EdgeAI prebuilt binary firmware images"
> >+
> >+LICENSE = "TI-TFL"
> >+LIC_FILES_CHKSUM = "file://${THISDIR}/../../licenses/TI-TFL;md5=a1b59cb7ba626b9dbbcbf00f3fbc438a"
> >+
> >+COMPATIBLE_MACHINE = "am62axx"
> >+
> >+PACKAGE_ARCH = "${MACHINE_ARCH}"
> >+
> >+inherit update-alternatives
> >+
> >+PLAT_SFX = ""
> >+PLAT_SFX:am62axx = "am62axx"
> >+
> >+require recipes-bsp/ti-linux-fw/ti-linux-fw.inc
> >+
> >+PV = "${CORESDK_RTOS_VERSION}"
> >+PR = "${INC_PR}.1"
> >+
> >+# Secure Build
> >+inherit ti-secdev
> >+
> >+IPC_FW_DIR = "ti-ipc/${PLAT_SFX}"
> >+
> >+INSTALL_IPC_FW_DIR = "${nonarch_base_libdir}/firmware/${IPC_FW_DIR}"
> >+
> >+C7X_1_FW = "dsp_edgeai_c7x_1_release_strip.out"
> >+
> >+IPC_FW_LIST = ""
> >+IPC_FW_LIST:am62axx = "${C7X_1_FW}"
> >+
> >+do_install() {
> >+    # Sign Firmware
> >+    for FW_NAME in ${IPC_FW_LIST}
> >+    do
> >+        ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${S}/${IPC_FW_DIR}/${FW_NAME} ${S}/${IPC_FW_DIR}/${FW_NAME}.signed
> >+    done
> >+
> >+    # Install Firmware
> >+    install -d ${D}${INSTALL_IPC_FW_DIR}
> >+    for FW_NAME in ${IPC_FW_LIST}
> >+    do
> >+        install -m 0644 ${S}/${IPC_FW_DIR}/${FW_NAME}        ${D}${INSTALL_IPC_FW_DIR}
> >+        install -m 0644 ${S}/${IPC_FW_DIR}/${FW_NAME}.signed ${D}${INSTALL_IPC_FW_DIR}
> >+    done
> >+}
> >+
> >+ALTERNATIVE:${PN}:am62axx = "\
> >+                    am62a-c71_0-fw        am62a-c71_0-fw-sec \
> >+                    "
> >+
> >+ALTERNATIVE_LINK_NAME[am62a-c71_0-fw]     = "${nonarch_base_libdir}/firmware/am62a-c71_0-fw"
> >+ALTERNATIVE_LINK_NAME[am62a-c71_0-fw-sec] = "${nonarch_base_libdir}/firmware/am62a-c71_0-fw-sec"
> >+
> >+ALTERNATIVE_TARGET[am62a-c71_0-fw]     = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}"
> >+ALTERNATIVE_TARGET[am62a-c71_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}.signed"
> >+
> >+ALTERNATIVE_PRIORITY = "20"
> >diff --git a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
> >index 7fffc9de..3e4db129 100644
> >--- a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
> >+++ b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
> >@@ -36,21 +36,20 @@ IPC_FW_DIR = "ti-ipc/${PLAT_SFX}"
> >  INSTALL_IPC_FW_DIR = "${nonarch_base_libdir}/firmware/${IPC_FW_DIR}"
> >-MCU_1_0_FW =       "ipc_echo_test_mcu1_0_release_strip.xer5f"
> >-MCU_1_1_FW =       "ipc_echo_test_mcu1_1_release_strip.xer5f"
> >-MCU_2_0_FW =       "ipc_echo_test_mcu2_0_release_strip.xer5f"
> >-MCU_2_1_FW =       "ipc_echo_test_mcu2_1_release_strip.xer5f"
> >-MCU_3_0_FW =       "ipc_echo_test_mcu3_0_release_strip.xer5f"
> >-MCU_3_1_FW =       "ipc_echo_test_mcu3_1_release_strip.xer5f"
> >-MCU_4_0_FW =       "ipc_echo_test_mcu4_0_release_strip.xer5f"
> >-MCU_4_1_FW =       "ipc_echo_test_mcu4_1_release_strip.xer5f"
> >-C66_1_FW =         "ipc_echo_test_c66xdsp_1_release_strip.xe66"
> >-C66_2_FW =         "ipc_echo_test_c66xdsp_2_release_strip.xe66"
> >-C7X_1_FW =         "ipc_echo_test_c7x_1_release_strip.xe71"
> >-C7X_1_FW:am62axx = "dsp_edgeai_c7x_1_release_strip.out"
> >-C7X_2_FW =         "ipc_echo_test_c7x_2_release_strip.xe71"
> >-C7X_3_FW =         "ipc_echo_test_c7x_3_release_strip.xe71"
> >-C7X_4_FW =         "ipc_echo_test_c7x_4_release_strip.xe71"
> >+MCU_1_0_FW = "ipc_echo_test_mcu1_0_release_strip.xer5f"
> >+MCU_1_1_FW = "ipc_echo_test_mcu1_1_release_strip.xer5f"
> >+MCU_2_0_FW = "ipc_echo_test_mcu2_0_release_strip.xer5f"
> >+MCU_2_1_FW = "ipc_echo_test_mcu2_1_release_strip.xer5f"
> >+MCU_3_0_FW = "ipc_echo_test_mcu3_0_release_strip.xer5f"
> >+MCU_3_1_FW = "ipc_echo_test_mcu3_1_release_strip.xer5f"
> >+MCU_4_0_FW = "ipc_echo_test_mcu4_0_release_strip.xer5f"
> >+MCU_4_1_FW = "ipc_echo_test_mcu4_1_release_strip.xer5f"
> >+C66_1_FW   = "ipc_echo_test_c66xdsp_1_release_strip.xe66"
> >+C66_2_FW   = "ipc_echo_test_c66xdsp_2_release_strip.xe66"
> >+C7X_1_FW   = "ipc_echo_test_c7x_1_release_strip.xe71"
> >+C7X_2_FW   = "ipc_echo_test_c7x_2_release_strip.xe71"
> >+C7X_3_FW   = "ipc_echo_test_c7x_3_release_strip.xe71"
> >+C7X_4_FW   = "ipc_echo_test_c7x_4_release_strip.xe71"
> >  IPC_FW_LIST = ""
> >  IPC_FW_LIST:am65xx =  "${MCU_1_0_FW} ${MCU_1_1_FW}"
Andrew Davis July 1, 2025, 2:45 p.m. UTC | #3
On 6/30/25 7:28 PM, Denys Dmytriyenko wrote:
> On Mon, Jun 30, 2025 at 03:46:14PM +0530, Chirag Shilwant via lists.yoctoproject.org wrote:
>> Hi Andrew,
>>
>> On 28/06/25 01:54, Andrew Davis via lists.yoctoproject.org wrote:
>>> TI EdgeAI firmware is distinct from the other "echo test" firmware
>>> provided by ti-rtos-echo-test-fw. It belongs in its own package.
>>> Split out the EdgeAI firmware from the "echo test" firmware.
>>
>>
>> Looks like the corresponding meta-arago patch for adding
>> ti-edgeai-fw in filesystem
>> is missing from the meta-arago lists.
>>
>> We have added ti-rtos-echo-test-fw in following recipes, so similar
>> should be done
>> for ti-edgeai-fw to ensure that CICD builds [0] have EdgeAI C7x IPC
>> firmwares packaged.
>>
>>
>> ~/source/meta-arago$ find . | grep -rn "ti-rtos-echo-test-fw"
>> meta-arago-test/recipes-core/packagegroups/ti-test.bb:117:
>> ti-rtos-echo-test-fw \
>> meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-console.bb:70:
>> ti-rtos-echo-test-fw \
>> meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bb:61:UTILS:append:k3
>> = " ti-rtos-echo-test-fw"
> 
> Instead of doing it in images or packagegroups, a better alternative would
> be to list FW images in either MACHINE_ESSENTIAL_EXTRA_RDEPENDS or
> MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS, as we already do for most of the FWs.
> 
> That way it will work for any distro or image built for the same platform.
> 

I like this idea in general for most firmware, but our remoteproc firmware
is a little different in that is has multiple valid options and selection
depends on use-case. The echo test firmware is probably only useful for test
images, and EdgeAI firmware might only be useful for EdgeAI images, etc..

So selection of remoteproc firmware should stay in distro layer IMHO

Andrew

> 
>> [0]: https://software-dl.ti.com/cicd-report/linux/index.html?section=platform&platform=am62axx
>>
>>
>>
>> --
>> Chirag
>>
>>
>>
>>> Give this a higher ALTERNATIVE_PRIORITY so that if both are installed
>>> the default will still be EdgeAI firmware for AM62A devices.
>>>
>>> Signed-off-by: Andrew Davis <afd@ti.com>
>>> ---
>>>   .../recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb    | 58 +++++++++++++++++++
>>>   .../ti-rtos-fw/ti-rtos-echo-test-fw.bb        | 29 +++++-----
>>>   2 files changed, 72 insertions(+), 15 deletions(-)
>>>   create mode 100644 meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
>>>
>>> diff --git a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
>>> new file mode 100644
>>> index 00000000..67150968
>>> --- /dev/null
>>> +++ b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
>>> @@ -0,0 +1,58 @@
>>> +SUMMARY = "TI EdgeAI prebuilt binary firmware images"
>>> +
>>> +LICENSE = "TI-TFL"
>>> +LIC_FILES_CHKSUM = "file://${THISDIR}/../../licenses/TI-TFL;md5=a1b59cb7ba626b9dbbcbf00f3fbc438a"
>>> +
>>> +COMPATIBLE_MACHINE = "am62axx"
>>> +
>>> +PACKAGE_ARCH = "${MACHINE_ARCH}"
>>> +
>>> +inherit update-alternatives
>>> +
>>> +PLAT_SFX = ""
>>> +PLAT_SFX:am62axx = "am62axx"
>>> +
>>> +require recipes-bsp/ti-linux-fw/ti-linux-fw.inc
>>> +
>>> +PV = "${CORESDK_RTOS_VERSION}"
>>> +PR = "${INC_PR}.1"
>>> +
>>> +# Secure Build
>>> +inherit ti-secdev
>>> +
>>> +IPC_FW_DIR = "ti-ipc/${PLAT_SFX}"
>>> +
>>> +INSTALL_IPC_FW_DIR = "${nonarch_base_libdir}/firmware/${IPC_FW_DIR}"
>>> +
>>> +C7X_1_FW = "dsp_edgeai_c7x_1_release_strip.out"
>>> +
>>> +IPC_FW_LIST = ""
>>> +IPC_FW_LIST:am62axx = "${C7X_1_FW}"
>>> +
>>> +do_install() {
>>> +    # Sign Firmware
>>> +    for FW_NAME in ${IPC_FW_LIST}
>>> +    do
>>> +        ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${S}/${IPC_FW_DIR}/${FW_NAME} ${S}/${IPC_FW_DIR}/${FW_NAME}.signed
>>> +    done
>>> +
>>> +    # Install Firmware
>>> +    install -d ${D}${INSTALL_IPC_FW_DIR}
>>> +    for FW_NAME in ${IPC_FW_LIST}
>>> +    do
>>> +        install -m 0644 ${S}/${IPC_FW_DIR}/${FW_NAME}        ${D}${INSTALL_IPC_FW_DIR}
>>> +        install -m 0644 ${S}/${IPC_FW_DIR}/${FW_NAME}.signed ${D}${INSTALL_IPC_FW_DIR}
>>> +    done
>>> +}
>>> +
>>> +ALTERNATIVE:${PN}:am62axx = "\
>>> +                    am62a-c71_0-fw        am62a-c71_0-fw-sec \
>>> +                    "
>>> +
>>> +ALTERNATIVE_LINK_NAME[am62a-c71_0-fw]     = "${nonarch_base_libdir}/firmware/am62a-c71_0-fw"
>>> +ALTERNATIVE_LINK_NAME[am62a-c71_0-fw-sec] = "${nonarch_base_libdir}/firmware/am62a-c71_0-fw-sec"
>>> +
>>> +ALTERNATIVE_TARGET[am62a-c71_0-fw]     = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}"
>>> +ALTERNATIVE_TARGET[am62a-c71_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}.signed"
>>> +
>>> +ALTERNATIVE_PRIORITY = "20"
>>> diff --git a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
>>> index 7fffc9de..3e4db129 100644
>>> --- a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
>>> +++ b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
>>> @@ -36,21 +36,20 @@ IPC_FW_DIR = "ti-ipc/${PLAT_SFX}"
>>>   INSTALL_IPC_FW_DIR = "${nonarch_base_libdir}/firmware/${IPC_FW_DIR}"
>>> -MCU_1_0_FW =       "ipc_echo_test_mcu1_0_release_strip.xer5f"
>>> -MCU_1_1_FW =       "ipc_echo_test_mcu1_1_release_strip.xer5f"
>>> -MCU_2_0_FW =       "ipc_echo_test_mcu2_0_release_strip.xer5f"
>>> -MCU_2_1_FW =       "ipc_echo_test_mcu2_1_release_strip.xer5f"
>>> -MCU_3_0_FW =       "ipc_echo_test_mcu3_0_release_strip.xer5f"
>>> -MCU_3_1_FW =       "ipc_echo_test_mcu3_1_release_strip.xer5f"
>>> -MCU_4_0_FW =       "ipc_echo_test_mcu4_0_release_strip.xer5f"
>>> -MCU_4_1_FW =       "ipc_echo_test_mcu4_1_release_strip.xer5f"
>>> -C66_1_FW =         "ipc_echo_test_c66xdsp_1_release_strip.xe66"
>>> -C66_2_FW =         "ipc_echo_test_c66xdsp_2_release_strip.xe66"
>>> -C7X_1_FW =         "ipc_echo_test_c7x_1_release_strip.xe71"
>>> -C7X_1_FW:am62axx = "dsp_edgeai_c7x_1_release_strip.out"
>>> -C7X_2_FW =         "ipc_echo_test_c7x_2_release_strip.xe71"
>>> -C7X_3_FW =         "ipc_echo_test_c7x_3_release_strip.xe71"
>>> -C7X_4_FW =         "ipc_echo_test_c7x_4_release_strip.xe71"
>>> +MCU_1_0_FW = "ipc_echo_test_mcu1_0_release_strip.xer5f"
>>> +MCU_1_1_FW = "ipc_echo_test_mcu1_1_release_strip.xer5f"
>>> +MCU_2_0_FW = "ipc_echo_test_mcu2_0_release_strip.xer5f"
>>> +MCU_2_1_FW = "ipc_echo_test_mcu2_1_release_strip.xer5f"
>>> +MCU_3_0_FW = "ipc_echo_test_mcu3_0_release_strip.xer5f"
>>> +MCU_3_1_FW = "ipc_echo_test_mcu3_1_release_strip.xer5f"
>>> +MCU_4_0_FW = "ipc_echo_test_mcu4_0_release_strip.xer5f"
>>> +MCU_4_1_FW = "ipc_echo_test_mcu4_1_release_strip.xer5f"
>>> +C66_1_FW   = "ipc_echo_test_c66xdsp_1_release_strip.xe66"
>>> +C66_2_FW   = "ipc_echo_test_c66xdsp_2_release_strip.xe66"
>>> +C7X_1_FW   = "ipc_echo_test_c7x_1_release_strip.xe71"
>>> +C7X_2_FW   = "ipc_echo_test_c7x_2_release_strip.xe71"
>>> +C7X_3_FW   = "ipc_echo_test_c7x_3_release_strip.xe71"
>>> +C7X_4_FW   = "ipc_echo_test_c7x_4_release_strip.xe71"
>>>   IPC_FW_LIST = ""
>>>   IPC_FW_LIST:am65xx =  "${MCU_1_0_FW} ${MCU_1_1_FW}"
Ryan Eatmon July 1, 2025, 3:39 p.m. UTC | #4
On 7/1/2025 9:45 AM, Andrew Davis wrote:
> On 6/30/25 7:28 PM, Denys Dmytriyenko wrote:
>> On Mon, Jun 30, 2025 at 03:46:14PM +0530, Chirag Shilwant via 
>> lists.yoctoproject.org wrote:
>>> Hi Andrew,
>>>
>>> On 28/06/25 01:54, Andrew Davis via lists.yoctoproject.org wrote:
>>>> TI EdgeAI firmware is distinct from the other "echo test" firmware
>>>> provided by ti-rtos-echo-test-fw. It belongs in its own package.
>>>> Split out the EdgeAI firmware from the "echo test" firmware.
>>>
>>>
>>> Looks like the corresponding meta-arago patch for adding
>>> ti-edgeai-fw in filesystem
>>> is missing from the meta-arago lists.
>>>
>>> We have added ti-rtos-echo-test-fw in following recipes, so similar
>>> should be done
>>> for ti-edgeai-fw to ensure that CICD builds [0] have EdgeAI C7x IPC
>>> firmwares packaged.
>>>
>>>
>>> ~/source/meta-arago$ find . | grep -rn "ti-rtos-echo-test-fw"
>>> meta-arago-test/recipes-core/packagegroups/ti-test.bb:117:
>>> ti-rtos-echo-test-fw \
>>> meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-console.bb:70:
>>> ti-rtos-echo-test-fw \
>>> meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bb:61:UTILS:append:k3
>>> = " ti-rtos-echo-test-fw"
>>
>> Instead of doing it in images or packagegroups, a better alternative 
>> would
>> be to list FW images in either MACHINE_ESSENTIAL_EXTRA_RDEPENDS or
>> MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS, as we already do for most of the 
>> FWs.
>>
>> That way it will work for any distro or image built for the same 
>> platform.
>>
> 
> I like this idea in general for most firmware, but our remoteproc firmware
> is a little different in that is has multiple valid options and selection
> depends on use-case. The echo test firmware is probably only useful for 
> test
> images, and EdgeAI firmware might only be useful for EdgeAI images, etc..
> 
> So selection of remoteproc firmware should stay in distro layer IMHO

Is it possible to specify that two packages cannot be built/installed at 
the same time?  I think there is a way.  For this specific case I think 
we should use that.


> Andrew
> 
>>
>>> [0]: 
>>> https://software-dl.ti.com/cicd-report/linux/index.html?section=platform&platform=am62axx
>>>
>>>
>>>
>>> -- 
>>> Chirag
>>>
>>>
>>>
>>>> Give this a higher ALTERNATIVE_PRIORITY so that if both are installed
>>>> the default will still be EdgeAI firmware for AM62A devices.
>>>>
>>>> Signed-off-by: Andrew Davis <afd@ti.com>
>>>> ---
>>>>   .../recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb    | 58 
>>>> +++++++++++++++++++
>>>>   .../ti-rtos-fw/ti-rtos-echo-test-fw.bb        | 29 +++++-----
>>>>   2 files changed, 72 insertions(+), 15 deletions(-)
>>>>   create mode 100644 meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
>>>>
>>>> diff --git a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb 
>>>> b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
>>>> new file mode 100644
>>>> index 00000000..67150968
>>>> --- /dev/null
>>>> +++ b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
>>>> @@ -0,0 +1,58 @@
>>>> +SUMMARY = "TI EdgeAI prebuilt binary firmware images"
>>>> +
>>>> +LICENSE = "TI-TFL"
>>>> +LIC_FILES_CHKSUM = 
>>>> "file://${THISDIR}/../../licenses/TI-TFL;md5=a1b59cb7ba626b9dbbcbf00f3fbc438a"
>>>> +
>>>> +COMPATIBLE_MACHINE = "am62axx"
>>>> +
>>>> +PACKAGE_ARCH = "${MACHINE_ARCH}"
>>>> +
>>>> +inherit update-alternatives
>>>> +
>>>> +PLAT_SFX = ""
>>>> +PLAT_SFX:am62axx = "am62axx"
>>>> +
>>>> +require recipes-bsp/ti-linux-fw/ti-linux-fw.inc
>>>> +
>>>> +PV = "${CORESDK_RTOS_VERSION}"
>>>> +PR = "${INC_PR}.1"
>>>> +
>>>> +# Secure Build
>>>> +inherit ti-secdev
>>>> +
>>>> +IPC_FW_DIR = "ti-ipc/${PLAT_SFX}"
>>>> +
>>>> +INSTALL_IPC_FW_DIR = "${nonarch_base_libdir}/firmware/${IPC_FW_DIR}"
>>>> +
>>>> +C7X_1_FW = "dsp_edgeai_c7x_1_release_strip.out"
>>>> +
>>>> +IPC_FW_LIST = ""
>>>> +IPC_FW_LIST:am62axx = "${C7X_1_FW}"
>>>> +
>>>> +do_install() {
>>>> +    # Sign Firmware
>>>> +    for FW_NAME in ${IPC_FW_LIST}
>>>> +    do
>>>> +        ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh 
>>>> ${S}/${IPC_FW_DIR}/${FW_NAME} ${S}/${IPC_FW_DIR}/${FW_NAME}.signed
>>>> +    done
>>>> +
>>>> +    # Install Firmware
>>>> +    install -d ${D}${INSTALL_IPC_FW_DIR}
>>>> +    for FW_NAME in ${IPC_FW_LIST}
>>>> +    do
>>>> +        install -m 0644 ${S}/${IPC_FW_DIR}/${FW_NAME}        
>>>> ${D}${INSTALL_IPC_FW_DIR}
>>>> +        install -m 0644 ${S}/${IPC_FW_DIR}/${FW_NAME}.signed 
>>>> ${D}${INSTALL_IPC_FW_DIR}
>>>> +    done
>>>> +}
>>>> +
>>>> +ALTERNATIVE:${PN}:am62axx = "\
>>>> +                    am62a-c71_0-fw        am62a-c71_0-fw-sec \
>>>> +                    "
>>>> +
>>>> +ALTERNATIVE_LINK_NAME[am62a-c71_0-fw]     = 
>>>> "${nonarch_base_libdir}/firmware/am62a-c71_0-fw"
>>>> +ALTERNATIVE_LINK_NAME[am62a-c71_0-fw-sec] = 
>>>> "${nonarch_base_libdir}/firmware/am62a-c71_0-fw-sec"
>>>> +
>>>> +ALTERNATIVE_TARGET[am62a-c71_0-fw]     = 
>>>> "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}"
>>>> +ALTERNATIVE_TARGET[am62a-c71_0-fw-sec] = 
>>>> "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}.signed"
>>>> +
>>>> +ALTERNATIVE_PRIORITY = "20"
>>>> diff --git 
>>>> a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb 
>>>> b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
>>>> index 7fffc9de..3e4db129 100644
>>>> --- a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
>>>> +++ b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
>>>> @@ -36,21 +36,20 @@ IPC_FW_DIR = "ti-ipc/${PLAT_SFX}"
>>>>   INSTALL_IPC_FW_DIR = "${nonarch_base_libdir}/firmware/${IPC_FW_DIR}"
>>>> -MCU_1_0_FW =       "ipc_echo_test_mcu1_0_release_strip.xer5f"
>>>> -MCU_1_1_FW =       "ipc_echo_test_mcu1_1_release_strip.xer5f"
>>>> -MCU_2_0_FW =       "ipc_echo_test_mcu2_0_release_strip.xer5f"
>>>> -MCU_2_1_FW =       "ipc_echo_test_mcu2_1_release_strip.xer5f"
>>>> -MCU_3_0_FW =       "ipc_echo_test_mcu3_0_release_strip.xer5f"
>>>> -MCU_3_1_FW =       "ipc_echo_test_mcu3_1_release_strip.xer5f"
>>>> -MCU_4_0_FW =       "ipc_echo_test_mcu4_0_release_strip.xer5f"
>>>> -MCU_4_1_FW =       "ipc_echo_test_mcu4_1_release_strip.xer5f"
>>>> -C66_1_FW =         "ipc_echo_test_c66xdsp_1_release_strip.xe66"
>>>> -C66_2_FW =         "ipc_echo_test_c66xdsp_2_release_strip.xe66"
>>>> -C7X_1_FW =         "ipc_echo_test_c7x_1_release_strip.xe71"
>>>> -C7X_1_FW:am62axx = "dsp_edgeai_c7x_1_release_strip.out"
>>>> -C7X_2_FW =         "ipc_echo_test_c7x_2_release_strip.xe71"
>>>> -C7X_3_FW =         "ipc_echo_test_c7x_3_release_strip.xe71"
>>>> -C7X_4_FW =         "ipc_echo_test_c7x_4_release_strip.xe71"
>>>> +MCU_1_0_FW = "ipc_echo_test_mcu1_0_release_strip.xer5f"
>>>> +MCU_1_1_FW = "ipc_echo_test_mcu1_1_release_strip.xer5f"
>>>> +MCU_2_0_FW = "ipc_echo_test_mcu2_0_release_strip.xer5f"
>>>> +MCU_2_1_FW = "ipc_echo_test_mcu2_1_release_strip.xer5f"
>>>> +MCU_3_0_FW = "ipc_echo_test_mcu3_0_release_strip.xer5f"
>>>> +MCU_3_1_FW = "ipc_echo_test_mcu3_1_release_strip.xer5f"
>>>> +MCU_4_0_FW = "ipc_echo_test_mcu4_0_release_strip.xer5f"
>>>> +MCU_4_1_FW = "ipc_echo_test_mcu4_1_release_strip.xer5f"
>>>> +C66_1_FW   = "ipc_echo_test_c66xdsp_1_release_strip.xe66"
>>>> +C66_2_FW   = "ipc_echo_test_c66xdsp_2_release_strip.xe66"
>>>> +C7X_1_FW   = "ipc_echo_test_c7x_1_release_strip.xe71"
>>>> +C7X_2_FW   = "ipc_echo_test_c7x_2_release_strip.xe71"
>>>> +C7X_3_FW   = "ipc_echo_test_c7x_3_release_strip.xe71"
>>>> +C7X_4_FW   = "ipc_echo_test_c7x_4_release_strip.xe71"
>>>>   IPC_FW_LIST = ""
>>>>   IPC_FW_LIST:am65xx =  "${MCU_1_0_FW} ${MCU_1_1_FW}"
Andrew Davis July 1, 2025, 3:58 p.m. UTC | #5
On 7/1/25 10:39 AM, Ryan Eatmon wrote:
> 
> 
> On 7/1/2025 9:45 AM, Andrew Davis wrote:
>> On 6/30/25 7:28 PM, Denys Dmytriyenko wrote:
>>> On Mon, Jun 30, 2025 at 03:46:14PM +0530, Chirag Shilwant via lists.yoctoproject.org wrote:
>>>> Hi Andrew,
>>>>
>>>> On 28/06/25 01:54, Andrew Davis via lists.yoctoproject.org wrote:
>>>>> TI EdgeAI firmware is distinct from the other "echo test" firmware
>>>>> provided by ti-rtos-echo-test-fw. It belongs in its own package.
>>>>> Split out the EdgeAI firmware from the "echo test" firmware.
>>>>
>>>>
>>>> Looks like the corresponding meta-arago patch for adding
>>>> ti-edgeai-fw in filesystem
>>>> is missing from the meta-arago lists.
>>>>
>>>> We have added ti-rtos-echo-test-fw in following recipes, so similar
>>>> should be done
>>>> for ti-edgeai-fw to ensure that CICD builds [0] have EdgeAI C7x IPC
>>>> firmwares packaged.
>>>>
>>>>
>>>> ~/source/meta-arago$ find . | grep -rn "ti-rtos-echo-test-fw"
>>>> meta-arago-test/recipes-core/packagegroups/ti-test.bb:117:
>>>> ti-rtos-echo-test-fw \
>>>> meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-console.bb:70:
>>>> ti-rtos-echo-test-fw \
>>>> meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bb:61:UTILS:append:k3
>>>> = " ti-rtos-echo-test-fw"
>>>
>>> Instead of doing it in images or packagegroups, a better alternative would
>>> be to list FW images in either MACHINE_ESSENTIAL_EXTRA_RDEPENDS or
>>> MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS, as we already do for most of the FWs.
>>>
>>> That way it will work for any distro or image built for the same platform.
>>>
>>
>> I like this idea in general for most firmware, but our remoteproc firmware
>> is a little different in that is has multiple valid options and selection
>> depends on use-case. The echo test firmware is probably only useful for test
>> images, and EdgeAI firmware might only be useful for EdgeAI images, etc..
>>
>> So selection of remoteproc firmware should stay in distro layer IMHO
> 
> Is it possible to specify that two packages cannot be built/installed at the same time?  I think there is a way.  For this specific case I think we should use that.
> 

In this case, we can build and install both at the same time, they both use update
alternatives and should live happily together. EdgeAI firmware, if installed, will
be higher priority so will be the default loaded by kernel, this matches existing
behavior (once we add ti-edgeai-fw to the images).

Andrew

> 
>> Andrew
>>
>>>
>>>> [0]: https://software-dl.ti.com/cicd-report/linux/index.html?section=platform&platform=am62axx
>>>>
>>>>
>>>>
>>>> -- 
>>>> Chirag
>>>>
>>>>
>>>>
>>>>> Give this a higher ALTERNATIVE_PRIORITY so that if both are installed
>>>>> the default will still be EdgeAI firmware for AM62A devices.
>>>>>
>>>>> Signed-off-by: Andrew Davis <afd@ti.com>
>>>>> ---
>>>>>   .../recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb    | 58 +++++++++++++++++++
>>>>>   .../ti-rtos-fw/ti-rtos-echo-test-fw.bb        | 29 +++++-----
>>>>>   2 files changed, 72 insertions(+), 15 deletions(-)
>>>>>   create mode 100644 meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
>>>>>
>>>>> diff --git a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
>>>>> new file mode 100644
>>>>> index 00000000..67150968
>>>>> --- /dev/null
>>>>> +++ b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
>>>>> @@ -0,0 +1,58 @@
>>>>> +SUMMARY = "TI EdgeAI prebuilt binary firmware images"
>>>>> +
>>>>> +LICENSE = "TI-TFL"
>>>>> +LIC_FILES_CHKSUM = "file://${THISDIR}/../../licenses/TI-TFL;md5=a1b59cb7ba626b9dbbcbf00f3fbc438a"
>>>>> +
>>>>> +COMPATIBLE_MACHINE = "am62axx"
>>>>> +
>>>>> +PACKAGE_ARCH = "${MACHINE_ARCH}"
>>>>> +
>>>>> +inherit update-alternatives
>>>>> +
>>>>> +PLAT_SFX = ""
>>>>> +PLAT_SFX:am62axx = "am62axx"
>>>>> +
>>>>> +require recipes-bsp/ti-linux-fw/ti-linux-fw.inc
>>>>> +
>>>>> +PV = "${CORESDK_RTOS_VERSION}"
>>>>> +PR = "${INC_PR}.1"
>>>>> +
>>>>> +# Secure Build
>>>>> +inherit ti-secdev
>>>>> +
>>>>> +IPC_FW_DIR = "ti-ipc/${PLAT_SFX}"
>>>>> +
>>>>> +INSTALL_IPC_FW_DIR = "${nonarch_base_libdir}/firmware/${IPC_FW_DIR}"
>>>>> +
>>>>> +C7X_1_FW = "dsp_edgeai_c7x_1_release_strip.out"
>>>>> +
>>>>> +IPC_FW_LIST = ""
>>>>> +IPC_FW_LIST:am62axx = "${C7X_1_FW}"
>>>>> +
>>>>> +do_install() {
>>>>> +    # Sign Firmware
>>>>> +    for FW_NAME in ${IPC_FW_LIST}
>>>>> +    do
>>>>> +        ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${S}/${IPC_FW_DIR}/${FW_NAME} ${S}/${IPC_FW_DIR}/${FW_NAME}.signed
>>>>> +    done
>>>>> +
>>>>> +    # Install Firmware
>>>>> +    install -d ${D}${INSTALL_IPC_FW_DIR}
>>>>> +    for FW_NAME in ${IPC_FW_LIST}
>>>>> +    do
>>>>> +        install -m 0644 ${S}/${IPC_FW_DIR}/${FW_NAME} ${D}${INSTALL_IPC_FW_DIR}
>>>>> +        install -m 0644 ${S}/${IPC_FW_DIR}/${FW_NAME}.signed ${D}${INSTALL_IPC_FW_DIR}
>>>>> +    done
>>>>> +}
>>>>> +
>>>>> +ALTERNATIVE:${PN}:am62axx = "\
>>>>> +                    am62a-c71_0-fw        am62a-c71_0-fw-sec \
>>>>> +                    "
>>>>> +
>>>>> +ALTERNATIVE_LINK_NAME[am62a-c71_0-fw]     = "${nonarch_base_libdir}/firmware/am62a-c71_0-fw"
>>>>> +ALTERNATIVE_LINK_NAME[am62a-c71_0-fw-sec] = "${nonarch_base_libdir}/firmware/am62a-c71_0-fw-sec"
>>>>> +
>>>>> +ALTERNATIVE_TARGET[am62a-c71_0-fw]     = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}"
>>>>> +ALTERNATIVE_TARGET[am62a-c71_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}.signed"
>>>>> +
>>>>> +ALTERNATIVE_PRIORITY = "20"
>>>>> diff --git a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
>>>>> index 7fffc9de..3e4db129 100644
>>>>> --- a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
>>>>> +++ b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
>>>>> @@ -36,21 +36,20 @@ IPC_FW_DIR = "ti-ipc/${PLAT_SFX}"
>>>>>   INSTALL_IPC_FW_DIR = "${nonarch_base_libdir}/firmware/${IPC_FW_DIR}"
>>>>> -MCU_1_0_FW =       "ipc_echo_test_mcu1_0_release_strip.xer5f"
>>>>> -MCU_1_1_FW =       "ipc_echo_test_mcu1_1_release_strip.xer5f"
>>>>> -MCU_2_0_FW =       "ipc_echo_test_mcu2_0_release_strip.xer5f"
>>>>> -MCU_2_1_FW =       "ipc_echo_test_mcu2_1_release_strip.xer5f"
>>>>> -MCU_3_0_FW =       "ipc_echo_test_mcu3_0_release_strip.xer5f"
>>>>> -MCU_3_1_FW =       "ipc_echo_test_mcu3_1_release_strip.xer5f"
>>>>> -MCU_4_0_FW =       "ipc_echo_test_mcu4_0_release_strip.xer5f"
>>>>> -MCU_4_1_FW =       "ipc_echo_test_mcu4_1_release_strip.xer5f"
>>>>> -C66_1_FW =         "ipc_echo_test_c66xdsp_1_release_strip.xe66"
>>>>> -C66_2_FW =         "ipc_echo_test_c66xdsp_2_release_strip.xe66"
>>>>> -C7X_1_FW =         "ipc_echo_test_c7x_1_release_strip.xe71"
>>>>> -C7X_1_FW:am62axx = "dsp_edgeai_c7x_1_release_strip.out"
>>>>> -C7X_2_FW =         "ipc_echo_test_c7x_2_release_strip.xe71"
>>>>> -C7X_3_FW =         "ipc_echo_test_c7x_3_release_strip.xe71"
>>>>> -C7X_4_FW =         "ipc_echo_test_c7x_4_release_strip.xe71"
>>>>> +MCU_1_0_FW = "ipc_echo_test_mcu1_0_release_strip.xer5f"
>>>>> +MCU_1_1_FW = "ipc_echo_test_mcu1_1_release_strip.xer5f"
>>>>> +MCU_2_0_FW = "ipc_echo_test_mcu2_0_release_strip.xer5f"
>>>>> +MCU_2_1_FW = "ipc_echo_test_mcu2_1_release_strip.xer5f"
>>>>> +MCU_3_0_FW = "ipc_echo_test_mcu3_0_release_strip.xer5f"
>>>>> +MCU_3_1_FW = "ipc_echo_test_mcu3_1_release_strip.xer5f"
>>>>> +MCU_4_0_FW = "ipc_echo_test_mcu4_0_release_strip.xer5f"
>>>>> +MCU_4_1_FW = "ipc_echo_test_mcu4_1_release_strip.xer5f"
>>>>> +C66_1_FW   = "ipc_echo_test_c66xdsp_1_release_strip.xe66"
>>>>> +C66_2_FW   = "ipc_echo_test_c66xdsp_2_release_strip.xe66"
>>>>> +C7X_1_FW   = "ipc_echo_test_c7x_1_release_strip.xe71"
>>>>> +C7X_2_FW   = "ipc_echo_test_c7x_2_release_strip.xe71"
>>>>> +C7X_3_FW   = "ipc_echo_test_c7x_3_release_strip.xe71"
>>>>> +C7X_4_FW   = "ipc_echo_test_c7x_4_release_strip.xe71"
>>>>>   IPC_FW_LIST = ""
>>>>>   IPC_FW_LIST:am65xx =  "${MCU_1_0_FW} ${MCU_1_1_FW}"
>
Denys Dmytriyenko July 1, 2025, 4:04 p.m. UTC | #6
On Tue, Jul 01, 2025 at 10:39:12AM -0500, Ryan Eatmon wrote:
> 
> 
> On 7/1/2025 9:45 AM, Andrew Davis wrote:
> >On 6/30/25 7:28 PM, Denys Dmytriyenko wrote:
> >>On Mon, Jun 30, 2025 at 03:46:14PM +0530, Chirag Shilwant via
> >>lists.yoctoproject.org wrote:
> >>>Hi Andrew,
> >>>
> >>>On 28/06/25 01:54, Andrew Davis via lists.yoctoproject.org wrote:
> >>>>TI EdgeAI firmware is distinct from the other "echo test" firmware
> >>>>provided by ti-rtos-echo-test-fw. It belongs in its own package.
> >>>>Split out the EdgeAI firmware from the "echo test" firmware.
> >>>
> >>>
> >>>Looks like the corresponding meta-arago patch for adding
> >>>ti-edgeai-fw in filesystem
> >>>is missing from the meta-arago lists.
> >>>
> >>>We have added ti-rtos-echo-test-fw in following recipes, so similar
> >>>should be done
> >>>for ti-edgeai-fw to ensure that CICD builds [0] have EdgeAI C7x IPC
> >>>firmwares packaged.
> >>>
> >>>
> >>>~/source/meta-arago$ find . | grep -rn "ti-rtos-echo-test-fw"
> >>>meta-arago-test/recipes-core/packagegroups/ti-test.bb:117:
> >>>ti-rtos-echo-test-fw \
> >>>meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-console.bb:70:
> >>>ti-rtos-echo-test-fw \
> >>>meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bb:61:UTILS:append:k3
> >>>= " ti-rtos-echo-test-fw"
> >>
> >>Instead of doing it in images or packagegroups, a better
> >>alternative would
> >>be to list FW images in either MACHINE_ESSENTIAL_EXTRA_RDEPENDS or
> >>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS, as we already do for most
> >>of the FWs.
> >>
> >>That way it will work for any distro or image built for the same
> >>platform.
> >>
> >
> >I like this idea in general for most firmware, but our remoteproc firmware
> >is a little different in that is has multiple valid options and selection
> >depends on use-case. The echo test firmware is probably only
> >useful for test
> >images, and EdgeAI firmware might only be useful for EdgeAI images, etc..
> >
> >So selection of remoteproc firmware should stay in distro layer IMHO
> 
> Is it possible to specify that two packages cannot be
> built/installed at the same time?  I think there is a way.  For this
> specific case I think we should use that.

Yeah, FW packages already use "alternatives" from update-alternatives, where 
you can adjust priorities to select one FW over another, when they conflict 
each other. Specifically, you can install both, but then a symlink gets 
created to point to one or another based on priorities, plus you can change 
that at runtime as well.

The default priority adjustment should be done by a distro and we've had some 
instances of that in the past, where a generic FW gets selected by default, 
but then a more specific FW gets selected when a specific branded distro gets 
built.

Here's a remnant from it, showing how this can be done:
https://git.yoctoproject.org/meta-arago/tree/meta-arago-distro/conf/distro/include/branding-core.inc#n8


> >Andrew
> >
> >>
> >>>[0]: https://software-dl.ti.com/cicd-report/linux/index.html?section=platform&platform=am62axx
> >>>
> >>>
> >>>
> >>>-- 
> >>>Chirag
> >>>
> >>>
> >>>
> >>>>Give this a higher ALTERNATIVE_PRIORITY so that if both are installed
> >>>>the default will still be EdgeAI firmware for AM62A devices.
> >>>>
> >>>>Signed-off-by: Andrew Davis <afd@ti.com>
> >>>>---
> >>>>  .../recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb    | 58
> >>>>+++++++++++++++++++
> >>>>  .../ti-rtos-fw/ti-rtos-echo-test-fw.bb        | 29 +++++-----
> >>>>  2 files changed, 72 insertions(+), 15 deletions(-)
> >>>>  create mode 100644 meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
> >>>>
> >>>>diff --git
> >>>>a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
> >>>>b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
> >>>>new file mode 100644
> >>>>index 00000000..67150968
> >>>>--- /dev/null
> >>>>+++ b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
> >>>>@@ -0,0 +1,58 @@
> >>>>+SUMMARY = "TI EdgeAI prebuilt binary firmware images"
> >>>>+
> >>>>+LICENSE = "TI-TFL"
> >>>>+LIC_FILES_CHKSUM = "file://${THISDIR}/../../licenses/TI-TFL;md5=a1b59cb7ba626b9dbbcbf00f3fbc438a"
> >>>>+
> >>>>+COMPATIBLE_MACHINE = "am62axx"
> >>>>+
> >>>>+PACKAGE_ARCH = "${MACHINE_ARCH}"
> >>>>+
> >>>>+inherit update-alternatives
> >>>>+
> >>>>+PLAT_SFX = ""
> >>>>+PLAT_SFX:am62axx = "am62axx"
> >>>>+
> >>>>+require recipes-bsp/ti-linux-fw/ti-linux-fw.inc
> >>>>+
> >>>>+PV = "${CORESDK_RTOS_VERSION}"
> >>>>+PR = "${INC_PR}.1"
> >>>>+
> >>>>+# Secure Build
> >>>>+inherit ti-secdev
> >>>>+
> >>>>+IPC_FW_DIR = "ti-ipc/${PLAT_SFX}"
> >>>>+
> >>>>+INSTALL_IPC_FW_DIR = "${nonarch_base_libdir}/firmware/${IPC_FW_DIR}"
> >>>>+
> >>>>+C7X_1_FW = "dsp_edgeai_c7x_1_release_strip.out"
> >>>>+
> >>>>+IPC_FW_LIST = ""
> >>>>+IPC_FW_LIST:am62axx = "${C7X_1_FW}"
> >>>>+
> >>>>+do_install() {
> >>>>+    # Sign Firmware
> >>>>+    for FW_NAME in ${IPC_FW_LIST}
> >>>>+    do
> >>>>+        ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh
> >>>>${S}/${IPC_FW_DIR}/${FW_NAME}
> >>>>${S}/${IPC_FW_DIR}/${FW_NAME}.signed
> >>>>+    done
> >>>>+
> >>>>+    # Install Firmware
> >>>>+    install -d ${D}${INSTALL_IPC_FW_DIR}
> >>>>+    for FW_NAME in ${IPC_FW_LIST}
> >>>>+    do
> >>>>+        install -m 0644 ${S}/${IPC_FW_DIR}/${FW_NAME}
> >>>>${D}${INSTALL_IPC_FW_DIR}
> >>>>+        install -m 0644
> >>>>${S}/${IPC_FW_DIR}/${FW_NAME}.signed
> >>>>${D}${INSTALL_IPC_FW_DIR}
> >>>>+    done
> >>>>+}
> >>>>+
> >>>>+ALTERNATIVE:${PN}:am62axx = "\
> >>>>+                    am62a-c71_0-fw        am62a-c71_0-fw-sec \
> >>>>+                    "
> >>>>+
> >>>>+ALTERNATIVE_LINK_NAME[am62a-c71_0-fw]     =
> >>>>"${nonarch_base_libdir}/firmware/am62a-c71_0-fw"
> >>>>+ALTERNATIVE_LINK_NAME[am62a-c71_0-fw-sec] =
> >>>>"${nonarch_base_libdir}/firmware/am62a-c71_0-fw-sec"
> >>>>+
> >>>>+ALTERNATIVE_TARGET[am62a-c71_0-fw]     =
> >>>>"${INSTALL_IPC_FW_DIR}/${C7X_1_FW}"
> >>>>+ALTERNATIVE_TARGET[am62a-c71_0-fw-sec] =
> >>>>"${INSTALL_IPC_FW_DIR}/${C7X_1_FW}.signed"
> >>>>+
> >>>>+ALTERNATIVE_PRIORITY = "20"
> >>>>diff --git
> >>>>a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
> >>>>b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
> >>>>index 7fffc9de..3e4db129 100644
> >>>>--- a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
> >>>>+++ b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
> >>>>@@ -36,21 +36,20 @@ IPC_FW_DIR = "ti-ipc/${PLAT_SFX}"
> >>>>  INSTALL_IPC_FW_DIR = "${nonarch_base_libdir}/firmware/${IPC_FW_DIR}"
> >>>>-MCU_1_0_FW =       "ipc_echo_test_mcu1_0_release_strip.xer5f"
> >>>>-MCU_1_1_FW =       "ipc_echo_test_mcu1_1_release_strip.xer5f"
> >>>>-MCU_2_0_FW =       "ipc_echo_test_mcu2_0_release_strip.xer5f"
> >>>>-MCU_2_1_FW =       "ipc_echo_test_mcu2_1_release_strip.xer5f"
> >>>>-MCU_3_0_FW =       "ipc_echo_test_mcu3_0_release_strip.xer5f"
> >>>>-MCU_3_1_FW =       "ipc_echo_test_mcu3_1_release_strip.xer5f"
> >>>>-MCU_4_0_FW =       "ipc_echo_test_mcu4_0_release_strip.xer5f"
> >>>>-MCU_4_1_FW =       "ipc_echo_test_mcu4_1_release_strip.xer5f"
> >>>>-C66_1_FW =         "ipc_echo_test_c66xdsp_1_release_strip.xe66"
> >>>>-C66_2_FW =         "ipc_echo_test_c66xdsp_2_release_strip.xe66"
> >>>>-C7X_1_FW =         "ipc_echo_test_c7x_1_release_strip.xe71"
> >>>>-C7X_1_FW:am62axx = "dsp_edgeai_c7x_1_release_strip.out"
> >>>>-C7X_2_FW =         "ipc_echo_test_c7x_2_release_strip.xe71"
> >>>>-C7X_3_FW =         "ipc_echo_test_c7x_3_release_strip.xe71"
> >>>>-C7X_4_FW =         "ipc_echo_test_c7x_4_release_strip.xe71"
> >>>>+MCU_1_0_FW = "ipc_echo_test_mcu1_0_release_strip.xer5f"
> >>>>+MCU_1_1_FW = "ipc_echo_test_mcu1_1_release_strip.xer5f"
> >>>>+MCU_2_0_FW = "ipc_echo_test_mcu2_0_release_strip.xer5f"
> >>>>+MCU_2_1_FW = "ipc_echo_test_mcu2_1_release_strip.xer5f"
> >>>>+MCU_3_0_FW = "ipc_echo_test_mcu3_0_release_strip.xer5f"
> >>>>+MCU_3_1_FW = "ipc_echo_test_mcu3_1_release_strip.xer5f"
> >>>>+MCU_4_0_FW = "ipc_echo_test_mcu4_0_release_strip.xer5f"
> >>>>+MCU_4_1_FW = "ipc_echo_test_mcu4_1_release_strip.xer5f"
> >>>>+C66_1_FW   = "ipc_echo_test_c66xdsp_1_release_strip.xe66"
> >>>>+C66_2_FW   = "ipc_echo_test_c66xdsp_2_release_strip.xe66"
> >>>>+C7X_1_FW   = "ipc_echo_test_c7x_1_release_strip.xe71"
> >>>>+C7X_2_FW   = "ipc_echo_test_c7x_2_release_strip.xe71"
> >>>>+C7X_3_FW   = "ipc_echo_test_c7x_3_release_strip.xe71"
> >>>>+C7X_4_FW   = "ipc_echo_test_c7x_4_release_strip.xe71"
> >>>>  IPC_FW_LIST = ""
> >>>>  IPC_FW_LIST:am65xx =  "${MCU_1_0_FW} ${MCU_1_1_FW}"
Denys Dmytriyenko July 1, 2025, 4:22 p.m. UTC | #7
On Tue, Jul 01, 2025 at 10:58:22AM -0500, Andrew Davis via lists.yoctoproject.org wrote:
> On 7/1/25 10:39 AM, Ryan Eatmon wrote:
> >
> >
> >On 7/1/2025 9:45 AM, Andrew Davis wrote:
> >>On 6/30/25 7:28 PM, Denys Dmytriyenko wrote:
> >>>On Mon, Jun 30, 2025 at 03:46:14PM +0530, Chirag Shilwant via lists.yoctoproject.org wrote:
> >>>>Hi Andrew,
> >>>>
> >>>>On 28/06/25 01:54, Andrew Davis via lists.yoctoproject.org wrote:
> >>>>>TI EdgeAI firmware is distinct from the other "echo test" firmware
> >>>>>provided by ti-rtos-echo-test-fw. It belongs in its own package.
> >>>>>Split out the EdgeAI firmware from the "echo test" firmware.
> >>>>
> >>>>
> >>>>Looks like the corresponding meta-arago patch for adding
> >>>>ti-edgeai-fw in filesystem
> >>>>is missing from the meta-arago lists.
> >>>>
> >>>>We have added ti-rtos-echo-test-fw in following recipes, so similar
> >>>>should be done
> >>>>for ti-edgeai-fw to ensure that CICD builds [0] have EdgeAI C7x IPC
> >>>>firmwares packaged.
> >>>>
> >>>>
> >>>>~/source/meta-arago$ find . | grep -rn "ti-rtos-echo-test-fw"
> >>>>meta-arago-test/recipes-core/packagegroups/ti-test.bb:117:
> >>>>ti-rtos-echo-test-fw \
> >>>>meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-console.bb:70:
> >>>>ti-rtos-echo-test-fw \
> >>>>meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bb:61:UTILS:append:k3
> >>>>= " ti-rtos-echo-test-fw"
> >>>
> >>>Instead of doing it in images or packagegroups, a better alternative would
> >>>be to list FW images in either MACHINE_ESSENTIAL_EXTRA_RDEPENDS or
> >>>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS, as we already do for most of the FWs.
> >>>
> >>>That way it will work for any distro or image built for the same platform.
> >>>
> >>
> >>I like this idea in general for most firmware, but our remoteproc firmware
> >>is a little different in that is has multiple valid options and selection
> >>depends on use-case. The echo test firmware is probably only useful for test
> >>images, and EdgeAI firmware might only be useful for EdgeAI images, etc..
> >>
> >>So selection of remoteproc firmware should stay in distro layer IMHO
> >
> >Is it possible to specify that two packages cannot be built/installed at the same time?  I think there is a way.  For this specific case I think we should use that.
> >
> 
> In this case, we can build and install both at the same time, they both use update
> alternatives and should live happily together. EdgeAI firmware, if installed, will
> be higher priority so will be the default loaded by kernel, this matches existing
> behavior (once we add ti-edgeai-fw to the images).

Heh, we just cross-posted with the same comment.

But my point is - why not list all alternatives in *_RRECOMMENDS and let 
distros adjust priorities accordingly?

E.g. EdgeAI SDK can raise edgeai FW priority, otherwise echo FW will be used 
by default.



> Andrew
> 
> >
> >>Andrew
> >>
> >>>
> >>>>[0]: https://software-dl.ti.com/cicd-report/linux/index.html?section=platform&platform=am62axx
> >>>>
> >>>>
> >>>>
> >>>>-- 
> >>>>Chirag
> >>>>
> >>>>
> >>>>
> >>>>>Give this a higher ALTERNATIVE_PRIORITY so that if both are installed
> >>>>>the default will still be EdgeAI firmware for AM62A devices.
> >>>>>
> >>>>>Signed-off-by: Andrew Davis <afd@ti.com>
> >>>>>---
> >>>>>  .../recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb    | 58 +++++++++++++++++++
> >>>>>  .../ti-rtos-fw/ti-rtos-echo-test-fw.bb        | 29 +++++-----
> >>>>>  2 files changed, 72 insertions(+), 15 deletions(-)
> >>>>>  create mode 100644 meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
> >>>>>
> >>>>>diff --git a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
> >>>>>new file mode 100644
> >>>>>index 00000000..67150968
> >>>>>--- /dev/null
> >>>>>+++ b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
> >>>>>@@ -0,0 +1,58 @@
> >>>>>+SUMMARY = "TI EdgeAI prebuilt binary firmware images"
> >>>>>+
> >>>>>+LICENSE = "TI-TFL"
> >>>>>+LIC_FILES_CHKSUM = "file://${THISDIR}/../../licenses/TI-TFL;md5=a1b59cb7ba626b9dbbcbf00f3fbc438a"
> >>>>>+
> >>>>>+COMPATIBLE_MACHINE = "am62axx"
> >>>>>+
> >>>>>+PACKAGE_ARCH = "${MACHINE_ARCH}"
> >>>>>+
> >>>>>+inherit update-alternatives
> >>>>>+
> >>>>>+PLAT_SFX = ""
> >>>>>+PLAT_SFX:am62axx = "am62axx"
> >>>>>+
> >>>>>+require recipes-bsp/ti-linux-fw/ti-linux-fw.inc
> >>>>>+
> >>>>>+PV = "${CORESDK_RTOS_VERSION}"
> >>>>>+PR = "${INC_PR}.1"
> >>>>>+
> >>>>>+# Secure Build
> >>>>>+inherit ti-secdev
> >>>>>+
> >>>>>+IPC_FW_DIR = "ti-ipc/${PLAT_SFX}"
> >>>>>+
> >>>>>+INSTALL_IPC_FW_DIR = "${nonarch_base_libdir}/firmware/${IPC_FW_DIR}"
> >>>>>+
> >>>>>+C7X_1_FW = "dsp_edgeai_c7x_1_release_strip.out"
> >>>>>+
> >>>>>+IPC_FW_LIST = ""
> >>>>>+IPC_FW_LIST:am62axx = "${C7X_1_FW}"
> >>>>>+
> >>>>>+do_install() {
> >>>>>+    # Sign Firmware
> >>>>>+    for FW_NAME in ${IPC_FW_LIST}
> >>>>>+    do
> >>>>>+        ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${S}/${IPC_FW_DIR}/${FW_NAME} ${S}/${IPC_FW_DIR}/${FW_NAME}.signed
> >>>>>+    done
> >>>>>+
> >>>>>+    # Install Firmware
> >>>>>+    install -d ${D}${INSTALL_IPC_FW_DIR}
> >>>>>+    for FW_NAME in ${IPC_FW_LIST}
> >>>>>+    do
> >>>>>+        install -m 0644 ${S}/${IPC_FW_DIR}/${FW_NAME} ${D}${INSTALL_IPC_FW_DIR}
> >>>>>+        install -m 0644 ${S}/${IPC_FW_DIR}/${FW_NAME}.signed ${D}${INSTALL_IPC_FW_DIR}
> >>>>>+    done
> >>>>>+}
> >>>>>+
> >>>>>+ALTERNATIVE:${PN}:am62axx = "\
> >>>>>+                    am62a-c71_0-fw        am62a-c71_0-fw-sec \
> >>>>>+                    "
> >>>>>+
> >>>>>+ALTERNATIVE_LINK_NAME[am62a-c71_0-fw]     = "${nonarch_base_libdir}/firmware/am62a-c71_0-fw"
> >>>>>+ALTERNATIVE_LINK_NAME[am62a-c71_0-fw-sec] = "${nonarch_base_libdir}/firmware/am62a-c71_0-fw-sec"
> >>>>>+
> >>>>>+ALTERNATIVE_TARGET[am62a-c71_0-fw]     = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}"
> >>>>>+ALTERNATIVE_TARGET[am62a-c71_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}.signed"
> >>>>>+
> >>>>>+ALTERNATIVE_PRIORITY = "20"
> >>>>>diff --git a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
> >>>>>index 7fffc9de..3e4db129 100644
> >>>>>--- a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
> >>>>>+++ b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
> >>>>>@@ -36,21 +36,20 @@ IPC_FW_DIR = "ti-ipc/${PLAT_SFX}"
> >>>>>  INSTALL_IPC_FW_DIR = "${nonarch_base_libdir}/firmware/${IPC_FW_DIR}"
> >>>>>-MCU_1_0_FW =       "ipc_echo_test_mcu1_0_release_strip.xer5f"
> >>>>>-MCU_1_1_FW =       "ipc_echo_test_mcu1_1_release_strip.xer5f"
> >>>>>-MCU_2_0_FW =       "ipc_echo_test_mcu2_0_release_strip.xer5f"
> >>>>>-MCU_2_1_FW =       "ipc_echo_test_mcu2_1_release_strip.xer5f"
> >>>>>-MCU_3_0_FW =       "ipc_echo_test_mcu3_0_release_strip.xer5f"
> >>>>>-MCU_3_1_FW =       "ipc_echo_test_mcu3_1_release_strip.xer5f"
> >>>>>-MCU_4_0_FW =       "ipc_echo_test_mcu4_0_release_strip.xer5f"
> >>>>>-MCU_4_1_FW =       "ipc_echo_test_mcu4_1_release_strip.xer5f"
> >>>>>-C66_1_FW =         "ipc_echo_test_c66xdsp_1_release_strip.xe66"
> >>>>>-C66_2_FW =         "ipc_echo_test_c66xdsp_2_release_strip.xe66"
> >>>>>-C7X_1_FW =         "ipc_echo_test_c7x_1_release_strip.xe71"
> >>>>>-C7X_1_FW:am62axx = "dsp_edgeai_c7x_1_release_strip.out"
> >>>>>-C7X_2_FW =         "ipc_echo_test_c7x_2_release_strip.xe71"
> >>>>>-C7X_3_FW =         "ipc_echo_test_c7x_3_release_strip.xe71"
> >>>>>-C7X_4_FW =         "ipc_echo_test_c7x_4_release_strip.xe71"
> >>>>>+MCU_1_0_FW = "ipc_echo_test_mcu1_0_release_strip.xer5f"
> >>>>>+MCU_1_1_FW = "ipc_echo_test_mcu1_1_release_strip.xer5f"
> >>>>>+MCU_2_0_FW = "ipc_echo_test_mcu2_0_release_strip.xer5f"
> >>>>>+MCU_2_1_FW = "ipc_echo_test_mcu2_1_release_strip.xer5f"
> >>>>>+MCU_3_0_FW = "ipc_echo_test_mcu3_0_release_strip.xer5f"
> >>>>>+MCU_3_1_FW = "ipc_echo_test_mcu3_1_release_strip.xer5f"
> >>>>>+MCU_4_0_FW = "ipc_echo_test_mcu4_0_release_strip.xer5f"
> >>>>>+MCU_4_1_FW = "ipc_echo_test_mcu4_1_release_strip.xer5f"
> >>>>>+C66_1_FW   = "ipc_echo_test_c66xdsp_1_release_strip.xe66"
> >>>>>+C66_2_FW   = "ipc_echo_test_c66xdsp_2_release_strip.xe66"
> >>>>>+C7X_1_FW   = "ipc_echo_test_c7x_1_release_strip.xe71"
> >>>>>+C7X_2_FW   = "ipc_echo_test_c7x_2_release_strip.xe71"
> >>>>>+C7X_3_FW   = "ipc_echo_test_c7x_3_release_strip.xe71"
> >>>>>+C7X_4_FW   = "ipc_echo_test_c7x_4_release_strip.xe71"
> >>>>>  IPC_FW_LIST = ""
> >>>>>  IPC_FW_LIST:am65xx =  "${MCU_1_0_FW} ${MCU_1_1_FW}"
diff mbox series

Patch

diff --git a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
new file mode 100644
index 00000000..67150968
--- /dev/null
+++ b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-edgeai-fw.bb
@@ -0,0 +1,58 @@ 
+SUMMARY = "TI EdgeAI prebuilt binary firmware images"
+
+LICENSE = "TI-TFL"
+LIC_FILES_CHKSUM = "file://${THISDIR}/../../licenses/TI-TFL;md5=a1b59cb7ba626b9dbbcbf00f3fbc438a"
+
+COMPATIBLE_MACHINE = "am62axx"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+inherit update-alternatives
+
+PLAT_SFX = ""
+PLAT_SFX:am62axx = "am62axx"
+
+require recipes-bsp/ti-linux-fw/ti-linux-fw.inc
+
+PV = "${CORESDK_RTOS_VERSION}"
+PR = "${INC_PR}.1"
+
+# Secure Build
+inherit ti-secdev
+
+IPC_FW_DIR = "ti-ipc/${PLAT_SFX}"
+
+INSTALL_IPC_FW_DIR = "${nonarch_base_libdir}/firmware/${IPC_FW_DIR}"
+
+C7X_1_FW = "dsp_edgeai_c7x_1_release_strip.out"
+
+IPC_FW_LIST = ""
+IPC_FW_LIST:am62axx = "${C7X_1_FW}"
+
+do_install() {
+    # Sign Firmware
+    for FW_NAME in ${IPC_FW_LIST}
+    do
+        ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${S}/${IPC_FW_DIR}/${FW_NAME} ${S}/${IPC_FW_DIR}/${FW_NAME}.signed
+    done
+
+    # Install Firmware
+    install -d ${D}${INSTALL_IPC_FW_DIR}
+    for FW_NAME in ${IPC_FW_LIST}
+    do
+        install -m 0644 ${S}/${IPC_FW_DIR}/${FW_NAME}        ${D}${INSTALL_IPC_FW_DIR}
+        install -m 0644 ${S}/${IPC_FW_DIR}/${FW_NAME}.signed ${D}${INSTALL_IPC_FW_DIR}
+    done
+}
+
+ALTERNATIVE:${PN}:am62axx = "\
+                    am62a-c71_0-fw        am62a-c71_0-fw-sec \
+                    "
+
+ALTERNATIVE_LINK_NAME[am62a-c71_0-fw]     = "${nonarch_base_libdir}/firmware/am62a-c71_0-fw"
+ALTERNATIVE_LINK_NAME[am62a-c71_0-fw-sec] = "${nonarch_base_libdir}/firmware/am62a-c71_0-fw-sec"
+
+ALTERNATIVE_TARGET[am62a-c71_0-fw]     = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}"
+ALTERNATIVE_TARGET[am62a-c71_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}.signed"
+
+ALTERNATIVE_PRIORITY = "20"
diff --git a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
index 7fffc9de..3e4db129 100644
--- a/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
+++ b/meta-ti-bsp/recipes-bsp/ti-rtos-fw/ti-rtos-echo-test-fw.bb
@@ -36,21 +36,20 @@  IPC_FW_DIR = "ti-ipc/${PLAT_SFX}"
 
 INSTALL_IPC_FW_DIR = "${nonarch_base_libdir}/firmware/${IPC_FW_DIR}"
 
-MCU_1_0_FW =       "ipc_echo_test_mcu1_0_release_strip.xer5f"
-MCU_1_1_FW =       "ipc_echo_test_mcu1_1_release_strip.xer5f"
-MCU_2_0_FW =       "ipc_echo_test_mcu2_0_release_strip.xer5f"
-MCU_2_1_FW =       "ipc_echo_test_mcu2_1_release_strip.xer5f"
-MCU_3_0_FW =       "ipc_echo_test_mcu3_0_release_strip.xer5f"
-MCU_3_1_FW =       "ipc_echo_test_mcu3_1_release_strip.xer5f"
-MCU_4_0_FW =       "ipc_echo_test_mcu4_0_release_strip.xer5f"
-MCU_4_1_FW =       "ipc_echo_test_mcu4_1_release_strip.xer5f"
-C66_1_FW =         "ipc_echo_test_c66xdsp_1_release_strip.xe66"
-C66_2_FW =         "ipc_echo_test_c66xdsp_2_release_strip.xe66"
-C7X_1_FW =         "ipc_echo_test_c7x_1_release_strip.xe71"
-C7X_1_FW:am62axx = "dsp_edgeai_c7x_1_release_strip.out"
-C7X_2_FW =         "ipc_echo_test_c7x_2_release_strip.xe71"
-C7X_3_FW =         "ipc_echo_test_c7x_3_release_strip.xe71"
-C7X_4_FW =         "ipc_echo_test_c7x_4_release_strip.xe71"
+MCU_1_0_FW = "ipc_echo_test_mcu1_0_release_strip.xer5f"
+MCU_1_1_FW = "ipc_echo_test_mcu1_1_release_strip.xer5f"
+MCU_2_0_FW = "ipc_echo_test_mcu2_0_release_strip.xer5f"
+MCU_2_1_FW = "ipc_echo_test_mcu2_1_release_strip.xer5f"
+MCU_3_0_FW = "ipc_echo_test_mcu3_0_release_strip.xer5f"
+MCU_3_1_FW = "ipc_echo_test_mcu3_1_release_strip.xer5f"
+MCU_4_0_FW = "ipc_echo_test_mcu4_0_release_strip.xer5f"
+MCU_4_1_FW = "ipc_echo_test_mcu4_1_release_strip.xer5f"
+C66_1_FW   = "ipc_echo_test_c66xdsp_1_release_strip.xe66"
+C66_2_FW   = "ipc_echo_test_c66xdsp_2_release_strip.xe66"
+C7X_1_FW   = "ipc_echo_test_c7x_1_release_strip.xe71"
+C7X_2_FW   = "ipc_echo_test_c7x_2_release_strip.xe71"
+C7X_3_FW   = "ipc_echo_test_c7x_3_release_strip.xe71"
+C7X_4_FW   = "ipc_echo_test_c7x_4_release_strip.xe71"
 
 IPC_FW_LIST = ""
 IPC_FW_LIST:am65xx =  "${MCU_1_0_FW} ${MCU_1_1_FW}"