diff options
author | Andrew Davis <afd@ti.com> | 2025-05-02 16:25:07 -0500 |
---|---|---|
committer | Ryan Eatmon <reatmon@ti.com> | 2025-05-13 11:07:36 -0500 |
commit | a09453eef7275379caa3416e34e63439b7c2ea3b (patch) | |
tree | 134841cf995726d9cffc43907e8561719e4d005d | |
parent | b42e4dd5f44f3c70ed4465b2b391153e3bcbb51e (diff) | |
download | meta-ti-a09453eef7275379caa3416e34e63439b7c2ea3b.tar.gz |
ti-linux-fw: Split firmware in to machine packages
Firmware, like kernel modules, may be only relevant to a small subset of
hardware. Shipping all firmware for all hardware can waste space. For
this reason modules are split out into packages, and the same should
be done for firmware.
What we do currently is change the content of the package itself based
on what device we are building for. Having a package change content for
each machine means we cannot generate one image that supports multiple
machines, nor host a common machine agnostic package repo.
Instead we can generate different packages for the different firmwares
and only include the firmware packages needed for each machine.
Signed-off-by: Andrew Davis <afd@ti.com>
Signed-off-by: Ryan Eatmon <reatmon@ti.com>
-rw-r--r-- | meta-ti-bsp/conf/machine/include/am69.inc | 2 | ||||
-rw-r--r-- | meta-ti-bsp/conf/machine/include/j7200.inc | 2 | ||||
-rw-r--r-- | meta-ti-bsp/conf/machine/include/j721e.inc | 2 | ||||
-rw-r--r-- | meta-ti-bsp/conf/machine/include/j784s4.inc | 2 | ||||
-rw-r--r-- | meta-ti-bsp/recipes-bsp/ti-eth-fw/ti-eth-fw.bb | 76 |
5 files changed, 46 insertions, 38 deletions
diff --git a/meta-ti-bsp/conf/machine/include/am69.inc b/meta-ti-bsp/conf/machine/include/am69.inc index da8a5a8b..1a19410a 100644 --- a/meta-ti-bsp/conf/machine/include/am69.inc +++ b/meta-ti-bsp/conf/machine/include/am69.inc | |||
@@ -18,4 +18,4 @@ TFA_BOARD = "j784s4" | |||
18 | 18 | ||
19 | OPTEEMACHINE = "k3-j784s4" | 19 | OPTEEMACHINE = "k3-j784s4" |
20 | 20 | ||
21 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "cadence-mhdp-fw cnm-wave-fw ti-eth-fw" | 21 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "cadence-mhdp-fw cnm-wave-fw ti-eth-fw-j784s4" |
diff --git a/meta-ti-bsp/conf/machine/include/j7200.inc b/meta-ti-bsp/conf/machine/include/j7200.inc index b60b98e1..3cba71b6 100644 --- a/meta-ti-bsp/conf/machine/include/j7200.inc +++ b/meta-ti-bsp/conf/machine/include/j7200.inc | |||
@@ -26,4 +26,4 @@ TFA_BOARD = "generic" | |||
26 | 26 | ||
27 | OPTEEMACHINE = "k3-j721e" | 27 | OPTEEMACHINE = "k3-j721e" |
28 | 28 | ||
29 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "ti-eth-fw" | 29 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "ti-eth-fw-j7200" |
diff --git a/meta-ti-bsp/conf/machine/include/j721e.inc b/meta-ti-bsp/conf/machine/include/j721e.inc index b5ba448e..30aa2a69 100644 --- a/meta-ti-bsp/conf/machine/include/j721e.inc +++ b/meta-ti-bsp/conf/machine/include/j721e.inc | |||
@@ -40,4 +40,4 @@ TI_VXE_VXD_DRIVER = "ti-vxe-vxd-driver" | |||
40 | TI_VXE_VXD_DRIVER:bsp-ti-6_6 = "" | 40 | TI_VXE_VXD_DRIVER:bsp-ti-6_6 = "" |
41 | TI_VXE_VXD_DRIVER:bsp-ti-6_1 = "" | 41 | TI_VXE_VXD_DRIVER:bsp-ti-6_1 = "" |
42 | 42 | ||
43 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "cadence-mhdp-fw vxd-dec-fw ti-eth-fw ${TI_VXE_VXD_DRIVER}" | 43 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "cadence-mhdp-fw vxd-dec-fw ti-eth-fw-j721e ${TI_VXE_VXD_DRIVER}" |
diff --git a/meta-ti-bsp/conf/machine/include/j784s4.inc b/meta-ti-bsp/conf/machine/include/j784s4.inc index fd3990a6..33224ee3 100644 --- a/meta-ti-bsp/conf/machine/include/j784s4.inc +++ b/meta-ti-bsp/conf/machine/include/j784s4.inc | |||
@@ -21,4 +21,4 @@ TFA_BOARD = "j784s4" | |||
21 | 21 | ||
22 | OPTEEMACHINE = "k3-j784s4" | 22 | OPTEEMACHINE = "k3-j784s4" |
23 | 23 | ||
24 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "cadence-mhdp-fw cnm-wave-fw ti-eth-fw" | 24 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "cadence-mhdp-fw cnm-wave-fw ti-eth-fw-j784s4" |
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 index 8037ac6c..04e43609 100644 --- 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 | |||
@@ -5,8 +5,6 @@ LIC_FILES_CHKSUM = "file://${THISDIR}/../../licenses/TI-TFL;md5=a1b59cb7ba626b9d | |||
5 | 5 | ||
6 | COMPATIBLE_MACHINE = "j721e|j7200|j784s4" | 6 | COMPATIBLE_MACHINE = "j721e|j7200|j784s4" |
7 | 7 | ||
8 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
9 | |||
10 | inherit update-alternatives | 8 | inherit update-alternatives |
11 | 9 | ||
12 | require recipes-bsp/ti-linux-fw/ti-linux-fw.inc | 10 | require recipes-bsp/ti-linux-fw/ti-linux-fw.inc |
@@ -17,50 +15,60 @@ PR = "${INC_PR}.0" | |||
17 | # Secure Build | 15 | # Secure Build |
18 | inherit ti-secdev | 16 | inherit ti-secdev |
19 | 17 | ||
20 | PLAT_SFX = "" | 18 | PACKAGES += " \ |
21 | PLAT_SFX:j721e = "j721e" | 19 | ${PN}-j721e \ |
22 | PLAT_SFX:j7200 = "j7200" | 20 | ${PN}-j7200 \ |
23 | PLAT_SFX:j784s4 = "j784s4" | 21 | ${PN}-j784s4 \ |
24 | 22 | " | |
25 | ETH_FW_DIR = "ti-eth/${PLAT_SFX}" | 23 | # Disable arch checking as firmware is likely to be a different arch from the Yocto build |
26 | 24 | INSANE_SKIP:${PN}-j721e += "arch" | |
27 | INSTALL_ETH_FW_DIR = "${nonarch_base_libdir}/firmware/${ETH_FW_DIR}" | 25 | INSANE_SKIP:${PN}-j7200 += "arch" |
26 | INSANE_SKIP:${PN}-j784s4 += "arch" | ||
27 | |||
28 | RDEPENDS:${PN} += " \ | ||
29 | ${PN}-j721e \ | ||
30 | ${PN}-j7200 \ | ||
31 | ${PN}-j784s4 \ | ||
32 | " | ||
33 | |||
34 | PLATS = "\ | ||
35 | j721e \ | ||
36 | j7200 \ | ||
37 | j784s4 \ | ||
38 | " | ||
28 | 39 | ||
29 | ETH_FW = "app_remoteswitchcfg_server_strip.xer5f" | 40 | ETH_FW = "app_remoteswitchcfg_server_strip.xer5f" |
30 | 41 | ||
31 | ETH_FW_LIST = "" | ||
32 | ETH_FW_LIST:j721e = "${ETH_FW}" | ||
33 | ETH_FW_LIST:j7200 = "${ETH_FW}" | ||
34 | ETH_FW_LIST:j784s4 = "${ETH_FW}" | ||
35 | |||
36 | do_install() { | 42 | do_install() { |
37 | # ETH firmware | 43 | for PLAT in ${PLATS} |
38 | for FW_NAME in ${ETH_FW_LIST} | ||
39 | do | 44 | do |
40 | ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${S}/${ETH_FW_DIR}/${FW_NAME} ${S}/${ETH_FW_DIR}/${FW_NAME}.signed | 45 | # Sign ETH firmware |
41 | done | 46 | ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${S}/ti-eth/${PLAT}/${ETH_FW} ${S}/ti-eth/${PLAT}/${ETH_FW}.signed |
42 | 47 | ||
43 | # ETH firmware | 48 | # Install ETH firmware |
44 | install -d ${D}${INSTALL_ETH_FW_DIR} | 49 | install -d ${D}${nonarch_base_libdir}/firmware/ti-eth/${PLAT} |
45 | for FW_NAME in ${ETH_FW_LIST} | 50 | install -m 0644 ${S}/ti-eth/${PLAT}/${ETH_FW} ${D}${nonarch_base_libdir}/firmware/ti-eth/${PLAT} |
46 | do | 51 | install -m 0644 ${S}/ti-eth/${PLAT}/${ETH_FW}.signed ${D}${nonarch_base_libdir}/firmware/ti-eth/${PLAT} |
47 | install -m 0644 ${S}/${ETH_FW_DIR}/${FW_NAME} ${D}${INSTALL_ETH_FW_DIR} | ||
48 | install -m 0644 ${S}/${ETH_FW_DIR}/${FW_NAME}.signed ${D}${INSTALL_ETH_FW_DIR} | ||
49 | done | 52 | done |
50 | } | 53 | } |
51 | 54 | ||
55 | FILES:${PN} = "" | ||
56 | FILES:${PN}-j721e = "${nonarch_base_libdir}/firmware/ti-eth/j721e" | ||
57 | FILES:${PN}-j7200 = "${nonarch_base_libdir}/firmware/ti-eth/j7200" | ||
58 | FILES:${PN}-j784s4 = "${nonarch_base_libdir}/firmware/ti-eth/j784s4" | ||
59 | |||
52 | # Set up names for the firmwares | 60 | # Set up names for the firmwares |
53 | ALTERNATIVE:${PN}:j721e = "\ | 61 | ALTERNATIVE:${PN}-j721e = "\ |
54 | j7-main-r5f0_0-fw \ | 62 | j7-main-r5f0_0-fw \ |
55 | j7-main-r5f0_0-fw-sec \ | 63 | j7-main-r5f0_0-fw-sec \ |
56 | " | 64 | " |
57 | 65 | ||
58 | ALTERNATIVE:${PN}:j7200 = "\ | 66 | ALTERNATIVE:${PN}-j7200 = "\ |
59 | j7200-main-r5f0_0-fw \ | 67 | j7200-main-r5f0_0-fw \ |
60 | j7200-main-r5f0_0-fw-sec \ | 68 | j7200-main-r5f0_0-fw-sec \ |
61 | " | 69 | " |
62 | 70 | ||
63 | ALTERNATIVE:${PN}:j784s4 = "\ | 71 | ALTERNATIVE:${PN}-j784s4 = "\ |
64 | j784s4-main-r5f0_0-fw \ | 72 | j784s4-main-r5f0_0-fw \ |
65 | j784s4-main-r5f0_0-fw-sec \ | 73 | j784s4-main-r5f0_0-fw-sec \ |
66 | " | 74 | " |
@@ -76,13 +84,13 @@ ALTERNATIVE_LINK_NAME[j784s4-main-r5f0_0-fw] = "${nonarch_base_libdir}/firmw | |||
76 | ALTERNATIVE_LINK_NAME[j784s4-main-r5f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/j784s4-main-r5f0_0-fw-sec" | 84 | ALTERNATIVE_LINK_NAME[j784s4-main-r5f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/j784s4-main-r5f0_0-fw-sec" |
77 | 85 | ||
78 | # Create the firmware alternatives | 86 | # Create the firmware alternatives |
79 | ALTERNATIVE_TARGET[j7-main-r5f0_0-fw] = "${INSTALL_ETH_FW_DIR}/${ETH_FW}" | 87 | ALTERNATIVE_TARGET[j7-main-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/ti-eth/j721e/${ETH_FW}" |
80 | ALTERNATIVE_TARGET[j7-main-r5f0_0-fw-sec] = "${INSTALL_ETH_FW_DIR}/${ETH_FW}.signed" | 88 | ALTERNATIVE_TARGET[j7-main-r5f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/ti-eth/j721e/${ETH_FW}.signed" |
81 | 89 | ||
82 | ALTERNATIVE_TARGET[j7200-main-r5f0_0-fw] = "${INSTALL_ETH_FW_DIR}/${ETH_FW}" | 90 | ALTERNATIVE_TARGET[j7200-main-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/ti-eth/j7200/${ETH_FW}" |
83 | ALTERNATIVE_TARGET[j7200-main-r5f0_0-fw-sec] = "${INSTALL_ETH_FW_DIR}/${ETH_FW}.signed" | 91 | ALTERNATIVE_TARGET[j7200-main-r5f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/ti-eth/j7200/${ETH_FW}.signed" |
84 | 92 | ||
85 | ALTERNATIVE_TARGET[j784s4-main-r5f0_0-fw] = "${INSTALL_ETH_FW_DIR}/${ETH_FW}" | 93 | ALTERNATIVE_TARGET[j784s4-main-r5f0_0-fw] = "${nonarch_base_libdir}/firmware/ti-eth/j784s4/${ETH_FW}" |
86 | ALTERNATIVE_TARGET[j784s4-main-r5f0_0-fw-sec] = "${INSTALL_ETH_FW_DIR}/${ETH_FW}.signed" | 94 | ALTERNATIVE_TARGET[j784s4-main-r5f0_0-fw-sec] = "${nonarch_base_libdir}/firmware/ti-eth/j784s4/${ETH_FW}.signed" |
87 | 95 | ||
88 | ALTERNATIVE_PRIORITY = "5" | 96 | ALTERNATIVE_PRIORITY = "5" |