All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Davis <afd@ti.com>
To: Denys Dmytriyenko <denys@konsulko.com>,
	Ryan Eatmon <reatmon@ti.com>, Praneeth Bajjuri <praneeth@ti.com>,
	Neha Malcom Francis <n-francis@ti.com>,
	<meta-ti@lists.yoctoproject.org>
Cc: Andrew Davis <afd@ti.com>
Subject: [meta-ti][master/kirkstone][RFC 2/9] ti-eth-fw: Add recipe for TI Ethernet firmware
Date: Tue, 25 Apr 2023 12:23:38 -0500	[thread overview]
Message-ID: <20230425172345.12293-3-afd@ti.com> (raw)
In-Reply-To: <20230425172345.12293-1-afd@ti.com>

Split out the TI Ethernet firmware from ti-rtos-firmware.

Signed-off-by: Andrew Davis <afd@ti.com>
---
 .../recipes-bsp/ti-eth-fw/ti-eth-fw.bb        | 118 ++++++++++++++++++
 .../ti-rtos-bin/ti-rtos-firmware.bb           |  38 +-----
 2 files changed, 123 insertions(+), 33 deletions(-)
 create mode 100644 meta-ti-bsp/recipes-bsp/ti-eth-fw/ti-eth-fw.bb

diff --git a/meta-ti-bsp/recipes-bsp/ti-eth-fw/ti-eth-fw.bb b/meta-ti-bsp/recipes-bsp/ti-eth-fw/ti-eth-fw.bb
new file mode 100644
index 00000000..1a8d4aef
--- /dev/null
+++ b/meta-ti-bsp/recipes-bsp/ti-eth-fw/ti-eth-fw.bb
@@ -0,0 +1,118 @@
+SUMMARY = "TI Ethernet prebuilt binary firmware images"
+
+LICENSE = "TI-TFL"
+LIC_FILES_CHKSUM = "file://${COREBASE}/../meta-ti/licenses/TI-TFL;md5=a1b59cb7ba626b9dbbcbf00f3fbc438a"
+
+COMPATIBLE_MACHINE = "k3"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+inherit deploy
+inherit update-alternatives
+
+require recipes-bsp/ti-linux-fw/ti-linux-fw.inc
+
+PV = "${CORESDK_RTOS_VERSION}"
+PR = "${INC_PR}.0"
+
+CLEANBROKEN = "1"
+
+# Secure Build
+inherit ti-secdev
+
+PLAT_SFX = ""
+PLAT_SFX:j721e = "j721e"
+PLAT_SFX:j7200 = "j7200"
+PLAT_SFX:j721s2 = "j721s2"
+PLAT_SFX:j784s4 = "j784s4"
+PLAT_SFX:am65xx = "am65xx"
+PLAT_SFX:am64xx = "am64xx"
+PLAT_SFX:am62xx = "am62xx"
+PLAT_SFX:am62axx = "am62axx"
+
+ETH_FW_DIR = "ti-eth/${PLAT_SFX}"
+
+INSTALL_ETH_FW_DIR = "${nonarch_base_libdir}/firmware/${ETH_FW_DIR}"
+
+ETH_FW = "app_remoteswitchcfg_server_strip.xer5f"
+
+ETH_FW_LIST = ""
+ETH_FW_LIST:j721e =   "${ETH_FW}"
+ETH_FW_LIST:j7200 =   "${ETH_FW}"
+ETH_FW_LIST:j721s2 =  ""
+ETH_FW_LIST:j784s4 =  "${ETH_FW}"
+ETH_FW_LIST:am65xx =  ""
+ETH_FW_LIST:am64xx =  ""
+ETH_FW_LIST:am62xx =  ""
+ETH_FW_LIST:am62axx = ""
+
+do_install() {
+    # ETH firmware
+    for FW_NAME in ${ETH_FW_LIST}
+    do
+        ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${S}/${ETH_FW_DIR}/${FW_NAME} ${S}/${ETH_FW_DIR}/${FW_NAME}.signed
+    done
+
+    # ETH firmware
+    install -d ${D}${INSTALL_ETH_FW_DIR}
+    for FW_NAME in ${ETH_FW_LIST}
+    do
+        install -m 0644 ${S}/${ETH_FW_DIR}/${FW_NAME}        ${D}${INSTALL_ETH_FW_DIR}
+        install -m 0644 ${S}/${ETH_FW_DIR}/${FW_NAME}.signed ${D}${INSTALL_ETH_FW_DIR}
+    done
+}
+
+# Set up names for the firmwares
+ALTERNATIVE:${PN}:j721e = "\
+                    j7-main-r5f0_0-fw \
+                    j7-main-r5f0_0-fw-sec \
+                    "
+
+ALTERNATIVE:${PN}:j7200 = "\
+                    j7200-main-r5f0_0-fw \
+                    j7200-main-r5f0_0-fw-sec \
+                    "
+
+ALTERNATIVE:${PN}:j784s4 = "\
+                    j784s4-mcu-r5f0_0-fw \
+                    j784s4-mcu-r5f0_0-fw-sec \
+                    "
+
+# Set up link names for the firmwares
+ALTERNATIVE_LINK_NAME[j7-main-r5f0_0-fw]        = "${nonarch_base_libdir}/firmware/j7-main-r5f0_0-fw"
+ALTERNATIVE_LINK_NAME[j7-main-r5f0_0-fw-sec]    = "${nonarch_base_libdir}/firmware/j7-main-r5f0_0-fw-sec"
+
+ALTERNATIVE_LINK_NAME[j7200-main-r5f0_0-fw]     = "${nonarch_base_libdir}/firmware/j7200-main-r5f0_0-fw"
+ALTERNATIVE_LINK_NAME[j7200-main-r5f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/j7200-main-r5f0_0-fw-sec"
+
+ALTERNATIVE_LINK_NAME[j784s4-mcu-r5f0_0-fw]     = "${nonarch_base_libdir}/firmware/j784s4-mcu-r5f0_0-fw"
+ALTERNATIVE_LINK_NAME[j784s4-mcu-r5f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/j784s4-mcu-r5f0_0-fw-sec"
+
+# Create the firmware alternatives
+ALTERNATIVE_TARGET[j7-main-r5f0_0-fw]        = "${INSTALL_ETH_FW_DIR}/${ETH_FW}"
+ALTERNATIVE_TARGET[j7-main-r5f0_0-fw-sec]    = "${INSTALL_ETH_FW_DIR}/${ETH_FW}.signed"
+
+ALTERNATIVE_TARGET[j7200-main-r5f0_0-fw]     = "${INSTALL_ETH_FW_DIR}/${ETH_FW}"
+ALTERNATIVE_TARGET[j7200-main-r5f0_0-fw-sec] = "${INSTALL_ETH_FW_DIR}/${ETH_FW}.signed"
+
+ALTERNATIVE_TARGET[j784s4-mcu-r5f0_0-fw]     = "${INSTALL_ETH_FW_DIR}/${ETH_FW}"
+ALTERNATIVE_TARGET[j784s4-mcu-r5f0_0-fw-sec] = "${INSTALL_ETH_FW_DIR}/${ETH_FW}.signed"
+
+ALTERNATIVE_PRIORITY = "20"
+
+# make sure that lib/firmware, and all its contents are part of the package
+FILES:${PN} += "${nonarch_base_libdir}/firmware"
+
+# This is used to prevent the build system to_strip the executables
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_SYSROOT_STRIP = "1"
+# This is used to prevent the build system to split the debug info in a separate file
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+# As it likely to be a different arch from the Yocto build, disable checking by adding "arch" to INSANE_SKIP
+INSANE_SKIP:${PN} += "arch"
+
+# we don't want to configure and build the source code
+do_compile[noexec] = "1"
+do_configure[noexec] = "1"
diff --git a/meta-ti-bsp/recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb b/meta-ti-bsp/recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb
index 55f55ed5..7958c0e6 100644
--- a/meta-ti-bsp/recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb
+++ b/meta-ti-bsp/recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb
@@ -1,4 +1,4 @@
-SUMMARY = "TI RTOS prebuilt binary firmware images"
+SUMMARY = "TI Echo Test prebuilt binary firmware images"
 
 LICENSE = "TI-TFL"
 LIC_FILES_CHKSUM = "file://${COREBASE}/../meta-ti/licenses/TI-TFL;md5=a1b59cb7ba626b9dbbcbf00f3fbc438a"
@@ -34,10 +34,8 @@ CLEANBROKEN = "1"
 inherit ti-secdev
 
 IPC_FW_DIR = "ti-ipc/${PLAT_SFX}"
-ETH_FW_DIR = "ti-eth/${PLAT_SFX}"
 
 INSTALL_IPC_FW_DIR = "${nonarch_base_libdir}/firmware/${IPC_FW_DIR}"
-INSTALL_ETH_FW_DIR = "${nonarch_base_libdir}/firmware/${ETH_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"
@@ -54,8 +52,6 @@ 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"
 
-ETH_FW = "app_remoteswitchcfg_server_strip.xer5f"
-
 IPC_FW_LIST = ""
 IPC_FW_LIST:j721e =   "              ${MCU_1_1_FW} ${MCU_2_0_FW} ${MCU_2_1_FW} ${MCU_3_0_FW} ${MCU_3_1_FW}                             ${C66_1_FW} ${C66_2_FW} ${C7X_1_FW}"
 IPC_FW_LIST:j7200 =   "              ${MCU_1_1_FW} ${MCU_2_0_FW} ${MCU_2_1_FW}"
@@ -66,16 +62,6 @@ IPC_FW_LIST:am64xx =  "${MCU_1_0_FW} ${MCU_1_1_FW} ${MCU_2_0_FW} ${MCU_2_1_FW} $
 IPC_FW_LIST:am62xx =  "                            ${MCU_2_0_FW}"
 IPC_FW_LIST:am62axx = "                            ${MCU_2_0_FW}                                                                                               ${C7X_1_FW}"
 
-ETH_FW_LIST = ""
-ETH_FW_LIST:j721e =   "${ETH_FW}"
-ETH_FW_LIST:j7200 =   "${ETH_FW}"
-ETH_FW_LIST:j721s2 =  ""
-ETH_FW_LIST:j784s4 =  "${ETH_FW}"
-ETH_FW_LIST:am65xx =  ""
-ETH_FW_LIST:am64xx =  ""
-ETH_FW_LIST:am62xx =  ""
-ETH_FW_LIST:am62axx = ""
-
 # Update the am64xx ipc binaries to be consistent with other platforms
 do_install:prepend:am64xx() {
         ( cd ${S}/${IPC_FW_DIR}; \
@@ -108,12 +94,6 @@ do_install() {
         ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${S}/${IPC_FW_DIR}/${FW_NAME} ${S}/${IPC_FW_DIR}/${FW_NAME}.signed
     done
 
-    # ETH firmware
-    for FW_NAME in ${ETH_FW_LIST}
-    do
-        ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${S}/${ETH_FW_DIR}/${FW_NAME} ${S}/${ETH_FW_DIR}/${FW_NAME}.signed
-    done
-
     # IPC Firmware
     install -d ${D}${INSTALL_IPC_FW_DIR}
     for FW_NAME in ${IPC_FW_LIST}
@@ -121,14 +101,6 @@ do_install() {
         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
-
-    # ETH firmware
-    install -d ${D}${INSTALL_ETH_FW_DIR}
-    for FW_NAME in ${ETH_FW_LIST}
-    do
-        install -m 0644 ${S}/${ETH_FW_DIR}/${FW_NAME}        ${D}${INSTALL_ETH_FW_DIR}
-        install -m 0644 ${S}/${ETH_FW_DIR}/${FW_NAME}.signed ${D}${INSTALL_ETH_FW_DIR}
-    done
 }
 
 # Set up names for the firmwares
@@ -303,7 +275,7 @@ ALTERNATIVE_TARGET[am62a-mcu-r5f0_0-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}"
 ALTERNATIVE_TARGET[am62a-c71_0-fw] = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}"
 
 ALTERNATIVE_TARGET[j7-mcu-r5f0_1-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_1_1_FW}"
-ALTERNATIVE_TARGET[j7-main-r5f0_0-fw] = "${INSTALL_ETH_FW_DIR}/${ETH_FW}"
+ALTERNATIVE_TARGET[j7-main-r5f0_0-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}"
 ALTERNATIVE_TARGET[j7-main-r5f0_1-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_2_1_FW}"
 ALTERNATIVE_TARGET[j7-main-r5f1_0-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_3_0_FW}"
 ALTERNATIVE_TARGET[j7-main-r5f1_1-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_3_1_FW}"
@@ -311,7 +283,7 @@ ALTERNATIVE_TARGET[j7-c66_0-fw] = "${INSTALL_IPC_FW_DIR}/${C66_1_FW}"
 ALTERNATIVE_TARGET[j7-c66_1-fw] = "${INSTALL_IPC_FW_DIR}/${C66_2_FW}"
 ALTERNATIVE_TARGET[j7-c71_0-fw] = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}"
 
-ALTERNATIVE_TARGET[j7-main-r5f0_0-fw-sec] = "${INSTALL_ETH_FW_DIR}/${ETH_FW}.signed"
+ALTERNATIVE_TARGET[j7-main-r5f0_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}.signed"
 ALTERNATIVE_TARGET[j7-main-r5f0_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_2_1_FW}.signed"
 ALTERNATIVE_TARGET[j7-main-r5f1_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_3_0_FW}.signed"
 ALTERNATIVE_TARGET[j7-main-r5f1_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_3_1_FW}.signed"
@@ -320,10 +292,10 @@ ALTERNATIVE_TARGET[j7-c66_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${C66_2_FW}.signed"
 ALTERNATIVE_TARGET[j7-c71_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${C7X_1_FW}.signed"
 
 ALTERNATIVE_TARGET[j7200-mcu-r5f0_1-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_1_1_FW}"
-ALTERNATIVE_TARGET[j7200-main-r5f0_0-fw] = "${INSTALL_ETH_FW_DIR}/${ETH_FW}"
+ALTERNATIVE_TARGET[j7200-main-r5f0_0-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}"
 ALTERNATIVE_TARGET[j7200-main-r5f0_1-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_2_1_FW}"
 
-ALTERNATIVE_TARGET[j7200-main-r5f0_0-fw-sec] = "${INSTALL_ETH_FW_DIR}/${ETH_FW}.signed"
+ALTERNATIVE_TARGET[j7200-main-r5f0_0-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_2_0_FW}.signed"
 ALTERNATIVE_TARGET[j7200-main-r5f0_1-fw-sec] = "${INSTALL_IPC_FW_DIR}/${MCU_2_1_FW}.signed"
 
 ALTERNATIVE_TARGET[j721s2-mcu-r5f0_1-fw] = "${INSTALL_IPC_FW_DIR}/${MCU_1_1_FW}"
-- 
2.39.2



  parent reply	other threads:[~2023-04-25 17:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25 17:23 [meta-ti][master/kirkstone][RFC 0/9] Switch to U-Boot binman Andrew Davis
2023-04-25 17:23 ` [meta-ti][master/kirkstone][RFC 1/9] ti-dm-fw: Add recipe for TI DM firmware Andrew Davis
2023-04-25 17:23 ` Andrew Davis [this message]
2023-04-25 17:23 ` [meta-ti][master/kirkstone][RFC 3/9] ti-sci-fw: Remove source package recipe Andrew Davis
2023-04-25 17:23 ` [meta-ti][master/kirkstone][RFC 4/9] u-boot-bb.org: Remove this recipe Andrew Davis
2023-04-27 20:31   ` Denys Dmytriyenko
2023-04-28 15:13     ` Andrew Davis
2023-05-02 19:38       ` Denys Dmytriyenko
2023-05-04 14:00         ` Andrew Davis
2023-05-06  1:42           ` Denys Dmytriyenko
2023-04-25 17:23 ` [meta-ti][master/kirkstone][RFC 5/9] u-boot-ti-staging: Remove version 2021.01 Andrew Davis
2023-04-25 17:23 ` [meta-ti][master/kirkstone][RFC 6/9] ti-sci-fw: Drop k3-image-gen and only provide firmware Andrew Davis
2023-04-25 17:23 ` [meta-ti][master/kirkstone][RFC 7/9] u-boot-ti-staging: Use binman to package our firmware Andrew Davis
2023-04-25 17:23 ` [meta-ti][master/kirkstone][RFC 8/9] conf: machine: Switch all the machines over to U-Boot binman Andrew Davis
2023-04-25 17:23 ` [meta-ti][master/kirkstone][RFC 9/9] conf: machine: Remove all leftover config files Andrew Davis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230425172345.12293-3-afd@ti.com \
    --to=afd@ti.com \
    --cc=denys@konsulko.com \
    --cc=meta-ti@lists.yoctoproject.org \
    --cc=n-francis@ti.com \
    --cc=praneeth@ti.com \
    --cc=reatmon@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.