summaryrefslogtreecommitdiffstats
path: root/meta-ti-bsp/recipes-ti
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denys@konsulko.com>2023-03-20 11:24:52 +0000
committerRyan Eatmon <reatmon@ti.com>2023-03-21 13:03:29 -0500
commit404a8835b58ff084d58985d7f1d86311313326e0 (patch)
tree0813dc7200333bd61a4f35cbe0fa82c0b94c73a3 /meta-ti-bsp/recipes-ti
parentb1aa926874e32eade6a3b3ace19c7b610c645c16 (diff)
downloadmeta-ti-404a8835b58ff084d58985d7f1d86311313326e0.tar.gz
ti-rtos-firmware: numerous fixes and cleanups
Doing multiple do_install:prepend overrides does not guarantee the order - it was observed that signing could fail as it was happening prior to symlinking to the correct name. Move signing code inside the main do_install, so the machine-specific do_install:prepend works correctly. Also, pass -f flag for symlinking, otherwise it could fail with "file already exists" error when trying to re-build the recipe again. Several IPC list/matrix fixes: * j721e was missing MCU_1_1_FW entry * j721s2 was also missing MCU_1_1_FW entry * j721s2 had a second MCU_2_0_FW in place of MCU_3_0_FW * j784s4 was missing MCU_4_0_FW and MCU_4_1_FW entries Other minor cleanups and indentation fixes. Signed-off-by: Denys Dmytriyenko <denys@konsulko.com> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Diffstat (limited to 'meta-ti-bsp/recipes-ti')
-rw-r--r--meta-ti-bsp/recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb63
1 files changed, 31 insertions, 32 deletions
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 9b94a61e..ae7bdb81 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
@@ -64,105 +64,103 @@ C7X_4_FW = "ipc_echo_test_c7x_4_release_strip.xe71"
64ETH_FW = "app_remoteswitchcfg_server_strip.xer5f" 64ETH_FW = "app_remoteswitchcfg_server_strip.xer5f"
65 65
66DM_FW_LIST = "" 66DM_FW_LIST = ""
67DM_FW_LIST:am65xx = ""
68DM_FW_LIST:j721e = "${DM_FIRMWARE}" 67DM_FW_LIST:j721e = "${DM_FIRMWARE}"
69DM_FW_LIST:j7200 = "${DM_FIRMWARE}" 68DM_FW_LIST:j7200 = "${DM_FIRMWARE}"
70DM_FW_LIST:j721s2 = "${DM_FIRMWARE}" 69DM_FW_LIST:j721s2 = "${DM_FIRMWARE}"
70DM_FW_LIST:j784s4 = "${DM_FIRMWARE}"
71DM_FW_LIST:am65xx = ""
71DM_FW_LIST:am64xx = "" 72DM_FW_LIST:am64xx = ""
72DM_FW_LIST:am62xx = "${DM_FIRMWARE}" 73DM_FW_LIST:am62xx = "${DM_FIRMWARE}"
73DM_FW_LIST:am62axx = "${DM_FIRMWARE}" 74DM_FW_LIST:am62axx = "${DM_FIRMWARE}"
74DM_FW_LIST:j784s4 = "${DM_FIRMWARE}"
75 75
76IPC_FW_LIST = "" 76IPC_FW_LIST = ""
77IPC_FW_LIST:am65xx = "${MCU_1_0_FW} ${MCU_1_1_FW}" 77IPC_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}"
78IPC_FW_LIST:j721e = " ${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}"
79IPC_FW_LIST:j7200 = " ${MCU_1_1_FW} ${MCU_2_0_FW} ${MCU_2_1_FW}" 78IPC_FW_LIST:j7200 = " ${MCU_1_1_FW} ${MCU_2_0_FW} ${MCU_2_1_FW}"
80IPC_FW_LIST:j721s2 = " ${MCU_2_0_FW} ${MCU_2_1_FW} ${MCU_2_0_FW} ${MCU_3_1_FW} ${C7X_1_FW} ${C7X_2_FW}" 79IPC_FW_LIST:j721s2 = " ${MCU_1_1_FW} ${MCU_2_0_FW} ${MCU_2_1_FW} ${MCU_3_0_FW} ${MCU_3_1_FW} ${C7X_1_FW} ${C7X_2_FW}"
80IPC_FW_LIST:j784s4 = " ${MCU_1_1_FW} ${MCU_2_0_FW} ${MCU_2_1_FW} ${MCU_3_0_FW} ${MCU_3_1_FW} ${MCU_4_0_FW} ${MCU_4_1_FW} ${C7X_1_FW} ${C7X_2_FW} ${C7X_3_FW} ${C7X_4_FW}"
81IPC_FW_LIST:am65xx = "${MCU_1_0_FW} ${MCU_1_1_FW}"
81IPC_FW_LIST:am64xx = "${MCU_1_0_FW} ${MCU_1_1_FW} ${MCU_2_0_FW} ${MCU_2_1_FW} ${MCU_3_0_FW}" 82IPC_FW_LIST:am64xx = "${MCU_1_0_FW} ${MCU_1_1_FW} ${MCU_2_0_FW} ${MCU_2_1_FW} ${MCU_3_0_FW}"
82IPC_FW_LIST:am62xx = " ${MCU_2_0_FW}" 83IPC_FW_LIST:am62xx = " ${MCU_2_0_FW}"
83IPC_FW_LIST:am62axx = " ${MCU_2_0_FW} ${C7X_1_FW}" 84IPC_FW_LIST:am62axx = " ${MCU_2_0_FW} ${C7X_1_FW}"
84IPC_FW_LIST:j784s4 = " ${MCU_1_1_FW} ${MCU_2_0_FW} ${MCU_2_1_FW} ${MCU_3_0_FW} ${MCU_3_1_FW} ${C7X_1_FW} ${C7X_2_FW} ${C7X_3_FW} ${C7X_4_FW}"
85 85
86ETH_FW_LIST = "" 86ETH_FW_LIST = ""
87ETH_FW_LIST:am65xx = ""
88ETH_FW_LIST:j721e = "${ETH_FW}" 87ETH_FW_LIST:j721e = "${ETH_FW}"
89ETH_FW_LIST:j7200 = "${ETH_FW}" 88ETH_FW_LIST:j7200 = "${ETH_FW}"
90ETH_FW_LIST:j721s2 = "" 89ETH_FW_LIST:j721s2 = ""
90ETH_FW_LIST:j784s4 = "${ETH_FW}"
91ETH_FW_LIST:am65xx = ""
91ETH_FW_LIST:am64xx = "" 92ETH_FW_LIST:am64xx = ""
92ETH_FW_LIST:am62xx = "" 93ETH_FW_LIST:am62xx = ""
93ETH_FW_LIST:am62axx = "" 94ETH_FW_LIST:am62axx = ""
94ETH_FW_LIST:j784s4 = "${ETH_FW}"
95 95
96# Update the am64xx ipc binaries to be consistent with other platforms 96# Update the am64xx ipc binaries to be consistent with other platforms
97do_install:prepend:am64xx() { 97do_install:prepend:am64xx() {
98 ( cd ${RTOS_IPC_FW_DIR}; \ 98 ( cd ${RTOS_IPC_FW_DIR}; \
99 ln -s am64-main-r5f0_0-fw ${MCU_1_0_FW}; \ 99 ln -sf am64-main-r5f0_0-fw ${MCU_1_0_FW}; \
100 ln -s am64-main-r5f0_1-fw ${MCU_1_1_FW}; \ 100 ln -sf am64-main-r5f0_1-fw ${MCU_1_1_FW}; \
101 ln -s am64-main-r5f1_0-fw ${MCU_2_0_FW}; \ 101 ln -sf am64-main-r5f1_0-fw ${MCU_2_0_FW}; \
102 ln -s am64-main-r5f1_1-fw ${MCU_2_1_FW}; \ 102 ln -sf am64-main-r5f1_1-fw ${MCU_2_1_FW}; \
103 ln -s am64-mcu-m4f0_0-fw ${MCU_3_0_FW}; \ 103 ln -sf am64-mcu-m4f0_0-fw ${MCU_3_0_FW}; \
104 ) 104 )
105} 105}
106 106
107# Update the am62xx ipc binaries to be consistent with other platforms 107# Update the am62xx ipc binaries to be consistent with other platforms
108do_install:prepend:am62xx() { 108do_install:prepend:am62xx() {
109 ( cd ${RTOS_IPC_FW_DIR}; \ 109 ( cd ${RTOS_IPC_FW_DIR}; \
110 ln -s am62-mcu-m4f0_0-fw ${MCU_2_0_FW}; \ 110 ln -sf am62-mcu-m4f0_0-fw ${MCU_2_0_FW}; \
111 ) 111 )
112} 112}
113 113
114# Update the am62axx ipc binaries to be consistent with other platforms 114# Update the am62axx ipc binaries to be consistent with other platforms
115do_install:prepend:am62axx() { 115do_install:prepend:am62axx() {
116 ( cd ${RTOS_IPC_FW_DIR}; \ 116 ( cd ${RTOS_IPC_FW_DIR}; \
117 ln -s am62a-mcu-r5f0_0-fw ${MCU_1_0_FW}; \ 117 ln -sf am62a-mcu-r5f0_0-fw ${MCU_2_0_FW}; \
118 ) 118 )
119} 119}
120 120
121# Sign the firmware 121do_install() {
122do_install:prepend() { 122 # Sign the firmware
123 # DM Firmware 123 # DM Firmware
124 for FW_NAME in ${DM_FW_LIST} 124 for FW_NAME in ${DM_FW_LIST}
125 do 125 do
126 ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${RTOS_DM_FW_DIR}/${FW_NAME} ${RTOS_DM_FW_DIR}/${FW_NAME}.signed 126 ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${RTOS_DM_FW_DIR}/${FW_NAME} ${RTOS_DM_FW_DIR}/${FW_NAME}.signed
127 done 127 done
128 128
129 # IPC Firmware 129 # IPC Firmware
130 for FW_NAME in ${IPC_FW_LIST} 130 for FW_NAME in ${IPC_FW_LIST}
131 do 131 do
132 ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${RTOS_IPC_FW_DIR}/${FW_NAME} ${RTOS_IPC_FW_DIR}/${FW_NAME}.signed 132 ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${RTOS_IPC_FW_DIR}/${FW_NAME} ${RTOS_IPC_FW_DIR}/${FW_NAME}.signed
133 done 133 done
134 134
135 # ETH firmware 135 # ETH firmware
136 for FW_NAME in ${ETH_FW_LIST} 136 for FW_NAME in ${ETH_FW_LIST}
137 do 137 do
138 ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${RTOS_ETH_FW_DIR}/${FW_NAME} ${RTOS_ETH_FW_DIR}/${FW_NAME}.signed; 138 ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${RTOS_ETH_FW_DIR}/${FW_NAME} ${RTOS_ETH_FW_DIR}/${FW_NAME}.signed
139 done 139 done
140}
141 140
142#Install all R5 & DSP ipc echo test binaries in lib/firmware/pdk-ipc, with softlinks up a level 141 # Install all R5 & DSP ipc echo test binaries in lib/firmware/pdk-ipc, with softlinks up a level
143do_install() {
144 # DM Firmware 142 # DM Firmware
145 install -d ${LEGACY_DM_FW_DIR} 143 install -d ${LEGACY_DM_FW_DIR}
146 for FW_NAME in ${DM_FW_LIST} 144 for FW_NAME in ${DM_FW_LIST}
147 do 145 do
148 install -m 0644 ${RTOS_DM_FW_DIR}/${FW_NAME} ${LEGACY_DM_FW_DIR}/${FW_NAME}.unsigned 146 install -m 0644 ${RTOS_DM_FW_DIR}/${FW_NAME} ${LEGACY_DM_FW_DIR}/${FW_NAME}.unsigned
149 install -m 0644 ${RTOS_DM_FW_DIR}/${FW_NAME}.signed ${LEGACY_DM_FW_DIR}/${FW_NAME} 147 install -m 0644 ${RTOS_DM_FW_DIR}/${FW_NAME}.signed ${LEGACY_DM_FW_DIR}/${FW_NAME}
150 done 148 done
151 149
152 # IPC Firmware 150 # IPC Firmware
153 install -d ${LEGACY_IPC_FW_DIR} 151 install -d ${LEGACY_IPC_FW_DIR}
154 for FW_NAME in ${IPC_FW_LIST} 152 for FW_NAME in ${IPC_FW_LIST}
155 do 153 do
156 install -m 0644 ${RTOS_IPC_FW_DIR}/${FW_NAME} ${LEGACY_IPC_FW_DIR} 154 install -m 0644 ${RTOS_IPC_FW_DIR}/${FW_NAME} ${LEGACY_IPC_FW_DIR}
157 install -m 0644 ${RTOS_IPC_FW_DIR}/${FW_NAME}.signed ${LEGACY_IPC_FW_DIR} 155 install -m 0644 ${RTOS_IPC_FW_DIR}/${FW_NAME}.signed ${LEGACY_IPC_FW_DIR}
158 done 156 done
159 157
160 # ETH firmware 158 # ETH firmware
161 install -d ${LEGACY_ETH_FW_DIR} 159 install -d ${LEGACY_ETH_FW_DIR}
162 for FW_NAME in ${ETH_FW_LIST} 160 for FW_NAME in ${ETH_FW_LIST}
163 do 161 do
164 install -m 0644 ${RTOS_ETH_FW_DIR}/${FW_NAME} ${LEGACY_ETH_FW_DIR} 162 install -m 0644 ${RTOS_ETH_FW_DIR}/${FW_NAME} ${LEGACY_ETH_FW_DIR}
165 install -m 0644 ${RTOS_ETH_FW_DIR}/${FW_NAME}.signed ${LEGACY_ETH_FW_DIR} 163 install -m 0644 ${RTOS_ETH_FW_DIR}/${FW_NAME}.signed ${LEGACY_ETH_FW_DIR}
166 done 164 done
167} 165}
168 166
@@ -171,8 +169,8 @@ do_deploy() {
171 install -d ${DEPLOYDIR} 169 install -d ${DEPLOYDIR}
172 for FW_NAME in ${DM_FW_LIST} 170 for FW_NAME in ${DM_FW_LIST}
173 do 171 do
174 install -m 0644 ${RTOS_DM_FW_DIR}/${FW_NAME} ${DEPLOYDIR}/${FW_NAME}.unsigned 172 install -m 0644 ${RTOS_DM_FW_DIR}/${FW_NAME} ${DEPLOYDIR}/${FW_NAME}.unsigned
175 install -m 0644 ${RTOS_DM_FW_DIR}/${FW_NAME}.signed ${DEPLOYDIR}/${FW_NAME} 173 install -m 0644 ${RTOS_DM_FW_DIR}/${FW_NAME}.signed ${DEPLOYDIR}/${FW_NAME}
176 done 174 done
177} 175}
178 176
@@ -189,6 +187,7 @@ ALTERNATIVE:${PN}:am64xx = "\
189 am64-main-r5f1_1-fw \ 187 am64-main-r5f1_1-fw \
190 am64-mcu-m4f0_0-fw \ 188 am64-mcu-m4f0_0-fw \
191 " 189 "
190
192ALTERNATIVE:${PN}:am62xx = "\ 191ALTERNATIVE:${PN}:am62xx = "\
193 am62-mcu-m4f0_0-fw \ 192 am62-mcu-m4f0_0-fw \
194 am62-main-r5f0_0-fw \ 193 am62-main-r5f0_0-fw \