diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2023-10-05 16:54:36 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-05 16:54:36 -0300 |
commit | f5cc0843233ad0df25aaf801198f67a9c1774a54 (patch) | |
tree | ed45c40759ab475c613cc17a16f821b81e8fd31f | |
parent | 3e9ef23d98aa842cf84251a27c9b8dde8925ea61 (diff) | |
parent | 8bf41abe2a57beb4dec99e3655a79e4754bb0f18 (diff) | |
download | meta-freescale-f5cc0843233ad0df25aaf801198f67a9c1774a54.tar.gz |
Merge pull request #1659 from JPSGoncalves/backport-1642-and-1657-to-kirkstone
Backport 1642, 1657 and 1652 to kirkstone - multiple boot binaries
-rw-r--r-- | classes/imx-boot-container.bbclass | 16 | ||||
-rw-r--r-- | recipes-bsp/imx-mkimage/imx-boot_1.0.bb | 178 | ||||
-rw-r--r-- | recipes-bsp/u-boot/u-boot-imx_2022.04.bb | 4 |
3 files changed, 138 insertions, 60 deletions
diff --git a/classes/imx-boot-container.bbclass b/classes/imx-boot-container.bbclass index aa897045..3c6a89ed 100644 --- a/classes/imx-boot-container.bbclass +++ b/classes/imx-boot-container.bbclass | |||
@@ -93,14 +93,14 @@ do_deploy:append() { | |||
93 | then | 93 | then |
94 | install -m 0644 ${B}/${config}/flash.bin ${DEPLOYDIR}/flash.bin-${MACHINE}-${type} | 94 | install -m 0644 ${B}/${config}/flash.bin ${DEPLOYDIR}/flash.bin-${MACHINE}-${type} |
95 | # When there's more than one word in UBOOT_CONFIG, | 95 | # When there's more than one word in UBOOT_CONFIG, |
96 | # this will overwrite the links created in | 96 | # the first UBOOT_CONFIG listed will be the imx-boot binary |
97 | # previous loop iterations, effectively making | 97 | if [ ! -f "${DEPLOYDIR}/imx-boot" ]; then |
98 | # u-boot.itb and flash.bin correspond to the _last_ | 98 | ln -sf flash.bin-${MACHINE}-${type} flash.bin |
99 | # word in UBOOT_CONFIG. This is also how all other | 99 | ln -sf flash.bin-${MACHINE}-${type} imx-boot |
100 | # artifacts handled by oe-core's u-boot.inc are | 100 | |
101 | # treated. | 101 | else |
102 | ln -sf flash.bin-${MACHINE}-${type} flash.bin | 102 | bbwarn "Use custom wks.in for $UBOOT_CONFIG = $type" |
103 | ln -sf flash.bin-${MACHINE}-${type} imx-boot | 103 | fi |
104 | fi | 104 | fi |
105 | done | 105 | done |
106 | unset j | 106 | unset j |
diff --git a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb index b41c3bf4..37f58e64 100644 --- a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb +++ b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb | |||
@@ -43,9 +43,6 @@ SC_FIRMWARE_NAME ?= "scfw_tcm.bin" | |||
43 | ATF_MACHINE_NAME ?= "bl31-${ATF_PLATFORM}.bin" | 43 | ATF_MACHINE_NAME ?= "bl31-${ATF_PLATFORM}.bin" |
44 | ATF_MACHINE_NAME:append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '-optee', '', d)}" | 44 | ATF_MACHINE_NAME:append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '-optee', '', d)}" |
45 | 45 | ||
46 | UBOOT_NAME = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}" | ||
47 | BOOT_CONFIG_MACHINE = "${BOOT_NAME}-${MACHINE}-${UBOOT_CONFIG}.bin" | ||
48 | |||
49 | TOOLS_NAME ?= "mkimage_imx8" | 46 | TOOLS_NAME ?= "mkimage_imx8" |
50 | 47 | ||
51 | IMX_BOOT_SOC_TARGET ?= "INVALID" | 48 | IMX_BOOT_SOC_TARGET ?= "INVALID" |
@@ -89,28 +86,35 @@ compile_mx8m() { | |||
89 | bbnote "Copy ddr_firmware: ${ddr_firmware} from ${DEPLOY_DIR_IMAGE} -> ${BOOT_STAGING} " | 86 | bbnote "Copy ddr_firmware: ${ddr_firmware} from ${DEPLOY_DIR_IMAGE} -> ${BOOT_STAGING} " |
90 | cp ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${BOOT_STAGING} | 87 | cp ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${BOOT_STAGING} |
91 | done | 88 | done |
89 | |||
92 | cp ${DEPLOY_DIR_IMAGE}/signed_dp_imx8m.bin ${BOOT_STAGING} | 90 | cp ${DEPLOY_DIR_IMAGE}/signed_dp_imx8m.bin ${BOOT_STAGING} |
93 | cp ${DEPLOY_DIR_IMAGE}/signed_hdmi_imx8m.bin ${BOOT_STAGING} | 91 | cp ${DEPLOY_DIR_IMAGE}/signed_hdmi_imx8m.bin ${BOOT_STAGING} |
94 | cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ | 92 | cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ |
95 | ${BOOT_STAGING}/u-boot-spl.bin | 93 | ${BOOT_STAGING}/u-boot-spl.bin |
96 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME} ${BOOT_STAGING} | 94 | |
97 | if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then | 95 | if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then |
98 | # Use DTB binary patched with signature node | 96 | # Use DTB binary patched with signature node |
99 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_DTB_BINARY} ${BOOT_STAGING}/${UBOOT_DTB_NAME} | 97 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_DTB_BINARY} ${BOOT_STAGING}/${UBOOT_DTB_NAME_EXTRA} |
98 | else | ||
99 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME_EXTRA} ${BOOT_STAGING} | ||
100 | fi | 100 | fi |
101 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG} \ | 101 | |
102 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ | ||
102 | ${BOOT_STAGING}/u-boot-nodtb.bin | 103 | ${BOOT_STAGING}/u-boot-nodtb.bin |
104 | |||
103 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin | 105 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin |
104 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin | 106 | |
107 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME_EXTRA} ${BOOT_STAGING}/u-boot.bin | ||
108 | |||
105 | } | 109 | } |
106 | compile_mx8() { | 110 | compile_mx8() { |
107 | bbnote 8QM boot binary build | 111 | bbnote 8QM boot binary build |
108 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${BOOT_STAGING}/scfw_tcm.bin | 112 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${BOOT_STAGING}/scfw_tcm.bin |
109 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin | 113 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin |
110 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin | 114 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME_EXTRA} ${BOOT_STAGING}/u-boot.bin |
111 | cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING} | 115 | cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING} |
112 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then | 116 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} ] ; then |
113 | cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ | 117 | cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ |
114 | ${BOOT_STAGING}/u-boot-spl.bin | 118 | ${BOOT_STAGING}/u-boot-spl.bin |
115 | fi | 119 | fi |
116 | } | 120 | } |
@@ -120,9 +124,9 @@ compile_mx8x() { | |||
120 | cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING} | 124 | cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING} |
121 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${BOOT_STAGING}/scfw_tcm.bin | 125 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${BOOT_STAGING}/scfw_tcm.bin |
122 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin | 126 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin |
123 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin | 127 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME_EXTRA} ${BOOT_STAGING}/u-boot.bin |
124 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then | 128 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} ] ; then |
125 | cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ | 129 | cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ |
126 | ${BOOT_STAGING}/u-boot-spl.bin | 130 | ${BOOT_STAGING}/u-boot-spl.bin |
127 | fi | 131 | fi |
128 | } | 132 | } |
@@ -132,9 +136,9 @@ compile_mx8ulp() { | |||
132 | cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING}/ | 136 | cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING}/ |
133 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin | 137 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin |
134 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/upower.bin ${BOOT_STAGING}/upower.bin | 138 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/upower.bin ${BOOT_STAGING}/upower.bin |
135 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin | 139 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME_EXTRA} ${BOOT_STAGING}/u-boot.bin |
136 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then | 140 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} ] ; then |
137 | cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ | 141 | cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ |
138 | ${BOOT_STAGING}/u-boot-spl.bin | 142 | ${BOOT_STAGING}/u-boot-spl.bin |
139 | fi | 143 | fi |
140 | } | 144 | } |
@@ -148,9 +152,9 @@ compile_mx93() { | |||
148 | 152 | ||
149 | cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING}/ | 153 | cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING}/ |
150 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin | 154 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin |
151 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin | 155 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME_EXTRA} ${BOOT_STAGING}/u-boot.bin |
152 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then | 156 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} ] ; then |
153 | cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ | 157 | cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ |
154 | ${BOOT_STAGING}/u-boot-spl.bin | 158 | ${BOOT_STAGING}/u-boot-spl.bin |
155 | fi | 159 | fi |
156 | } | 160 | } |
@@ -161,50 +165,103 @@ do_compile() { | |||
161 | if ${DEPLOY_OPTEE}; then | 165 | if ${DEPLOY_OPTEE}; then |
162 | cp ${DEPLOY_DIR_IMAGE}/tee.bin ${BOOT_STAGING} | 166 | cp ${DEPLOY_DIR_IMAGE}/tee.bin ${BOOT_STAGING} |
163 | fi | 167 | fi |
164 | for target in ${IMXBOOT_TARGETS}; do | 168 | for type in ${UBOOT_CONFIG}; do |
165 | compile_${SOC_FAMILY} | 169 | if [ "${@d.getVarFlags('UBOOT_DTB_NAME')}" = "None" ]; then |
166 | if [ "$target" = "flash_linux_m4_no_v2x" ]; then | 170 | UBOOT_DTB_NAME_FLAGS="${type}:${UBOOT_DTB_NAME}" |
167 | # Special target build for i.MX 8DXL with V2X off | ||
168 | bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} V2X=NO ${target}" | ||
169 | make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} V2X=NO dtbs=${UBOOT_DTB_NAME} flash_linux_m4 | ||
170 | else | 171 | else |
171 | bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} ${target}" | 172 | UBOOT_DTB_NAME_FLAGS="${@' '.join(flag + ':' + dtb for flag, dtb in (d.getVarFlags('UBOOT_DTB_NAME')).items()) if d.getVarFlags('UBOOT_DTB_NAME') is not None else '' }" |
172 | make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} dtbs=${UBOOT_DTB_NAME} ${target} | ||
173 | fi | ||
174 | if [ -e "${BOOT_STAGING}/flash.bin" ]; then | ||
175 | cp ${BOOT_STAGING}/flash.bin ${S}/${BOOT_CONFIG_MACHINE}-${target} | ||
176 | fi | 173 | fi |
174 | |||
175 | for key_value in ${UBOOT_DTB_NAME_FLAGS}; do | ||
176 | type_key="${key_value%%:*}" | ||
177 | dtb_name="${key_value#*:}" | ||
178 | |||
179 | if [ "$type_key" = "$type" ] | ||
180 | then | ||
181 | bbnote "UBOOT_CONFIG = $type, UBOOT_DTB_NAME = $dtb_name" | ||
182 | |||
183 | UBOOT_CONFIG_EXTRA="$type_key" | ||
184 | if [ -e ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${dtb_name}-${type} ] ; then | ||
185 | UBOOT_DTB_NAME_EXTRA="${dtb_name}-${type}" | ||
186 | else | ||
187 | # backward compatibility | ||
188 | UBOOT_DTB_NAME_EXTRA="${dtb_name}" | ||
189 | fi | ||
190 | UBOOT_NAME_EXTRA="u-boot-${MACHINE}.bin-${UBOOT_CONFIG_EXTRA}" | ||
191 | BOOT_CONFIG_MACHINE_EXTRA="${BOOT_NAME}-${MACHINE}-${UBOOT_CONFIG_EXTRA}.bin" | ||
192 | |||
193 | for target in ${IMXBOOT_TARGETS}; do | ||
194 | compile_${SOC_FAMILY} | ||
195 | if [ "$target" = "flash_linux_m4_no_v2x" ]; then | ||
196 | # Special target build for i.MX 8DXL with V2X off | ||
197 | bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} V2X=NO ${target}" | ||
198 | make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} V2X=NO dtbs=${UBOOT_DTB_NAME_EXTRA} flash_linux_m4 | ||
199 | else | ||
200 | bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} ${target}" | ||
201 | make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} dtbs=${UBOOT_DTB_NAME_EXTRA} ${target} | ||
202 | fi | ||
203 | if [ -e "${BOOT_STAGING}/flash.bin" ]; then | ||
204 | cp ${BOOT_STAGING}/flash.bin ${S}/${BOOT_CONFIG_MACHINE_EXTRA}-${target} | ||
205 | fi | ||
206 | done | ||
207 | |||
208 | unset UBOOT_CONFIG_EXTRA | ||
209 | unset UBOOT_DTB_NAME_EXTRA | ||
210 | unset UBOOT_NAME_EXTRA | ||
211 | unset BOOT_CONFIG_MACHINE_EXTRA | ||
212 | fi | ||
213 | |||
214 | unset type_key | ||
215 | unset dtb_name | ||
216 | done | ||
217 | |||
218 | unset UBOOT_DTB_NAME_FLAGS | ||
177 | done | 219 | done |
220 | unset type | ||
178 | } | 221 | } |
179 | 222 | ||
180 | do_install () { | 223 | do_install () { |
181 | install -d ${D}/boot | 224 | install -d ${D}/boot |
182 | for target in ${IMXBOOT_TARGETS}; do | 225 | for type in ${UBOOT_CONFIG}; do |
183 | install -m 0644 ${S}/${BOOT_CONFIG_MACHINE}-${target} ${D}/boot/ | 226 | |
227 | bbnote "UBOOT_CONFIG = $type" | ||
228 | |||
229 | UBOOT_CONFIG_EXTRA="$type" | ||
230 | BOOT_CONFIG_MACHINE_EXTRA="${BOOT_NAME}-${MACHINE}-${UBOOT_CONFIG_EXTRA}.bin" | ||
231 | |||
232 | for target in ${IMXBOOT_TARGETS}; do | ||
233 | install -m 0644 ${S}/${BOOT_CONFIG_MACHINE_EXTRA}-${target} ${D}/boot/ | ||
234 | done | ||
235 | |||
236 | unset UBOOT_CONFIG_EXTRA | ||
237 | unset BOOT_CONFIG_MACHINE_EXTRA | ||
184 | done | 238 | done |
239 | |||
240 | unset type | ||
185 | } | 241 | } |
186 | 242 | ||
187 | deploy_mx8m() { | 243 | deploy_mx8m() { |
188 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} | 244 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} |
189 | install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ | ||
190 | ${DEPLOYDIR}/${BOOT_TOOLS} | ||
191 | for ddr_firmware in ${DDR_FIRMWARE_NAME}; do | 245 | for ddr_firmware in ${DDR_FIRMWARE_NAME}; do |
192 | install -m 0644 ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${DEPLOYDIR}/${BOOT_TOOLS} | 246 | install -m 0644 ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${DEPLOYDIR}/${BOOT_TOOLS} |
193 | done | 247 | done |
248 | |||
194 | install -m 0644 ${BOOT_STAGING}/signed_dp_imx8m.bin ${DEPLOYDIR}/${BOOT_TOOLS} | 249 | install -m 0644 ${BOOT_STAGING}/signed_dp_imx8m.bin ${DEPLOYDIR}/${BOOT_TOOLS} |
195 | install -m 0644 ${BOOT_STAGING}/signed_hdmi_imx8m.bin ${DEPLOYDIR}/${BOOT_TOOLS} | 250 | install -m 0644 ${BOOT_STAGING}/signed_hdmi_imx8m.bin ${DEPLOYDIR}/${BOOT_TOOLS} |
196 | install -m 0755 ${BOOT_STAGING}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} | 251 | install -m 0755 ${BOOT_STAGING}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} |
197 | install -m 0755 ${BOOT_STAGING}/mkimage_fit_atf.sh ${DEPLOYDIR}/${BOOT_TOOLS} | 252 | install -m 0755 ${BOOT_STAGING}/mkimage_fit_atf.sh ${DEPLOYDIR}/${BOOT_TOOLS} |
198 | } | 253 | } |
254 | |||
199 | deploy_mx8() { | 255 | deploy_mx8() { |
200 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} | 256 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} |
201 | install -m 0644 ${BOOT_STAGING}/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} | 257 | install -m 0644 ${BOOT_STAGING}/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} |
202 | install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} | 258 | install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} |
203 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then | 259 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} ] ; then |
204 | install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ | 260 | install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ |
205 | ${DEPLOYDIR}/${BOOT_TOOLS} | 261 | ${DEPLOYDIR}/${BOOT_TOOLS} |
206 | fi | 262 | fi |
207 | } | 263 | } |
264 | |||
208 | deploy_mx8x() { | 265 | deploy_mx8x() { |
209 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} | 266 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} |
210 | install -m 0644 ${BOOT_STAGING}/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} | 267 | install -m 0644 ${BOOT_STAGING}/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} |
@@ -219,7 +276,7 @@ deploy_mx8ulp() { | |||
219 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} | 276 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} |
220 | install -m 0644 ${BOOT_STAGING}/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} | 277 | install -m 0644 ${BOOT_STAGING}/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} |
221 | install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} | 278 | install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} |
222 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then | 279 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} ] ; then |
223 | install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ | 280 | install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ |
224 | ${DEPLOYDIR}/${BOOT_TOOLS} | 281 | ${DEPLOYDIR}/${BOOT_TOOLS} |
225 | fi | 282 | fi |
@@ -242,27 +299,48 @@ deploy_mx93() { | |||
242 | 299 | ||
243 | do_deploy() { | 300 | do_deploy() { |
244 | deploy_${SOC_FAMILY} | 301 | deploy_${SOC_FAMILY} |
245 | # copy the sc fw, dcd and uboot to deploy path | ||
246 | install -m 0644 ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} | ||
247 | 302 | ||
248 | # copy tee.bin to deploy path | 303 | # copy tee.bin to deploy path |
249 | if ${DEPLOY_OPTEE}; then | 304 | if ${DEPLOY_OPTEE}; then |
250 | install -m 0644 ${DEPLOY_DIR_IMAGE}/tee.bin ${DEPLOYDIR}/${BOOT_TOOLS} | 305 | install -m 0644 ${DEPLOY_DIR_IMAGE}/tee.bin ${DEPLOYDIR}/${BOOT_TOOLS} |
251 | fi | 306 | fi |
252 | |||
253 | # copy makefile (soc.mak) for reference | 307 | # copy makefile (soc.mak) for reference |
254 | install -m 0644 ${BOOT_STAGING}/soc.mak ${DEPLOYDIR}/${BOOT_TOOLS} | 308 | install -m 0644 ${BOOT_STAGING}/soc.mak ${DEPLOYDIR}/${BOOT_TOOLS} |
255 | # copy the generated boot image to deploy path | 309 | |
256 | for target in ${IMXBOOT_TARGETS}; do | 310 | for type in ${UBOOT_CONFIG}; do |
257 | # Use first "target" as IMAGE_IMXBOOT_TARGET | 311 | UBOOT_CONFIG_EXTRA="$type" |
258 | if [ "$IMAGE_IMXBOOT_TARGET" = "" ]; then | 312 | UBOOT_NAME_EXTRA="u-boot-${MACHINE}.bin-${UBOOT_CONFIG_EXTRA}" |
259 | IMAGE_IMXBOOT_TARGET="$target" | 313 | BOOT_CONFIG_MACHINE_EXTRA="${BOOT_NAME}-${MACHINE}-${UBOOT_CONFIG_EXTRA}.bin" |
260 | echo "Set boot target as $IMAGE_IMXBOOT_TARGET" | 314 | |
315 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} ] ; then | ||
316 | install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ | ||
317 | ${DEPLOYDIR}/${BOOT_TOOLS} | ||
318 | fi | ||
319 | # copy the tool mkimage to deploy path and sc fw, dcd and uboot | ||
320 | install -m 0644 ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME_EXTRA} ${DEPLOYDIR}/${BOOT_TOOLS} | ||
321 | |||
322 | # copy the generated boot image to deploy path | ||
323 | for target in ${IMXBOOT_TARGETS}; do | ||
324 | # Use first "target" as IMAGE_IMXBOOT_TARGET | ||
325 | if [ "$IMAGE_IMXBOOT_TARGET" = "" ]; then | ||
326 | IMAGE_IMXBOOT_TARGET="$target" | ||
327 | echo "Set boot target as $IMAGE_IMXBOOT_TARGET" | ||
328 | fi | ||
329 | install -m 0644 ${S}/${BOOT_CONFIG_MACHINE_EXTRA}-${target} ${DEPLOYDIR} | ||
330 | done | ||
331 | |||
332 | # The first UBOOT_CONFIG listed will be the ${BOOT_NAME} binary | ||
333 | if [ ! -f "${DEPLOYDIR}/${UUU_BOOTLOADER}" ]; then | ||
334 | ln -sf ${BOOT_CONFIG_MACHINE_EXTRA}-${IMAGE_IMXBOOT_TARGET} ${DEPLOYDIR}/${BOOT_NAME} | ||
335 | else | ||
336 | bbwarn "Use custom wks.in for $UBOOT_CONFIG = $type" | ||
261 | fi | 337 | fi |
262 | install -m 0644 ${S}/${BOOT_CONFIG_MACHINE}-${target} ${DEPLOYDIR} | ||
263 | done | ||
264 | 338 | ||
265 | ln -sf ${BOOT_CONFIG_MACHINE}-${IMAGE_IMXBOOT_TARGET} ${DEPLOYDIR}/${BOOT_NAME} | 339 | unset UBOOT_CONFIG_EXTRA |
340 | unset UBOOT_NAME_EXTRA | ||
341 | unset BOOT_CONFIG_MACHINE_EXTRA | ||
342 | done | ||
343 | unset type | ||
266 | } | 344 | } |
267 | addtask deploy before do_build after do_compile | 345 | addtask deploy before do_build after do_compile |
268 | 346 | ||
diff --git a/recipes-bsp/u-boot/u-boot-imx_2022.04.bb b/recipes-bsp/u-boot/u-boot-imx_2022.04.bb index c1ddf12f..f3364df7 100644 --- a/recipes-bsp/u-boot/u-boot-imx_2022.04.bb +++ b/recipes-bsp/u-boot/u-boot-imx_2022.04.bb | |||
@@ -27,8 +27,8 @@ do_deploy:append:mx8m-generic-bsp() { | |||
27 | if [ $j -eq $i ] | 27 | if [ $j -eq $i ] |
28 | then | 28 | then |
29 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} | 29 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} |
30 | install -m 0777 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} | 30 | install -m 0644 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} |
31 | install -m 0777 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${type} | 31 | install -m 0644 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${type} |
32 | fi | 32 | fi |
33 | done | 33 | done |
34 | unset j | 34 | unset j |