diff options
author | Tom Hochstein <tom.hochstein@nxp.com> | 2024-08-20 12:43:40 -0700 |
---|---|---|
committer | Hiago De Franco <hiago.franco@toradex.com> | 2024-08-27 14:22:01 -0300 |
commit | 114a59350ab598e87afb3d3f5867b21bf5117cd7 (patch) | |
tree | bf2e882ee5b586518e23ff71f736830172b3213e | |
parent | 4d64dde1686a017ebe2763dd7880563a6fc51b53 (diff) | |
download | meta-freescale-114a59350ab598e87afb3d3f5867b21bf5117cd7.tar.gz |
imx-boot: Update to latest from NXP 6.6.23-2.0.0
- Add i.MX 91 support
- Add missing STMM deploy
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
(cherry picked from commit 9cbfa8f33730e59e8be810ecdd3967738b07380a)
-rw-r--r-- | recipes-bsp/imx-mkimage/imx-boot_1.0.bb | 40 |
1 files changed, 32 insertions, 8 deletions
diff --git a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb index a0b127ed..d258c112 100644 --- a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb +++ b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb | |||
@@ -1,4 +1,4 @@ | |||
1 | # Copyright (C) 2017-2020 NXP | 1 | # Copyright (C) 2017-2024 NXP |
2 | 2 | ||
3 | require imx-mkimage_git.inc | 3 | require imx-mkimage_git.inc |
4 | 4 | ||
@@ -18,6 +18,7 @@ DEPENDS += " \ | |||
18 | # xxd is a dependency of fspi_packer.sh | 18 | # xxd is a dependency of fspi_packer.sh |
19 | DEPENDS += "xxd-native" | 19 | DEPENDS += "xxd-native" |
20 | DEPENDS:append:mx8m-generic-bsp = " u-boot-mkimage-native dtc-native" | 20 | DEPENDS:append:mx8m-generic-bsp = " u-boot-mkimage-native dtc-native" |
21 | DEPENDS:append:mx93-generic-bsp = " u-boot-mkimage-native dtc-native" | ||
21 | BOOT_NAME = "imx-boot" | 22 | BOOT_NAME = "imx-boot" |
22 | PROVIDES = "${BOOT_NAME}" | 23 | PROVIDES = "${BOOT_NAME}" |
23 | 24 | ||
@@ -52,6 +53,7 @@ TOOLS_NAME ?= "mkimage_imx8" | |||
52 | IMX_BOOT_SOC_TARGET ?= "INVALID" | 53 | IMX_BOOT_SOC_TARGET ?= "INVALID" |
53 | 54 | ||
54 | DEPLOY_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}" | 55 | DEPLOY_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}" |
56 | DEPLOY_OPTEE_STMM = "${@bb.utils.contains('MACHINE_FEATURES', 'optee stmm', 'true', 'false', d)}" | ||
55 | 57 | ||
56 | IMXBOOT_TARGETS ?= \ | 58 | IMXBOOT_TARGETS ?= \ |
57 | "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_flexspi', \ | 59 | "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_flexspi', \ |
@@ -61,8 +63,8 @@ IMXBOOT_TARGETS ?= \ | |||
61 | BOOT_STAGING = "${S}/${IMX_BOOT_SOC_TARGET}" | 63 | BOOT_STAGING = "${S}/${IMX_BOOT_SOC_TARGET}" |
62 | BOOT_STAGING:mx8m-generic-bsp = "${S}/iMX8M" | 64 | BOOT_STAGING:mx8m-generic-bsp = "${S}/iMX8M" |
63 | BOOT_STAGING:mx8dx-generic-bsp = "${S}/iMX8QX" | 65 | BOOT_STAGING:mx8dx-generic-bsp = "${S}/iMX8QX" |
64 | BOOT_STAGING:mx91p-generic-bsp = "${S}/iMX91" | 66 | BOOT_STAGING:mx91-generic-bsp = "${S}/iMX91" |
65 | BOOT_STAGING:mx93-generic-bsp = "${S}/iMX93" | 67 | BOOT_STAGING:mx93-generic-bsp = "${S}/iMX93" |
66 | BOOT_STAGING:mx95-generic-bsp = "${S}/iMX95" | 68 | BOOT_STAGING:mx95-generic-bsp = "${S}/iMX95" |
67 | 69 | ||
68 | SOC_FAMILY = "INVALID" | 70 | SOC_FAMILY = "INVALID" |
@@ -70,7 +72,7 @@ SOC_FAMILY:mx8-generic-bsp = "mx8" | |||
70 | SOC_FAMILY:mx8m-generic-bsp = "mx8m" | 72 | SOC_FAMILY:mx8m-generic-bsp = "mx8m" |
71 | SOC_FAMILY:mx8x-generic-bsp = "mx8x" | 73 | SOC_FAMILY:mx8x-generic-bsp = "mx8x" |
72 | SOC_FAMILY:mx8ulp-generic-bsp = "mx8ulp" | 74 | SOC_FAMILY:mx8ulp-generic-bsp = "mx8ulp" |
73 | SOC_FAMILY:mx91p-generic-bsp = "mx93" | 75 | SOC_FAMILY:mx91-generic-bsp = "mx91" |
74 | SOC_FAMILY:mx93-generic-bsp = "mx93" | 76 | SOC_FAMILY:mx93-generic-bsp = "mx93" |
75 | SOC_FAMILY:mx95-generic-bsp = "mx95" | 77 | SOC_FAMILY:mx95-generic-bsp = "mx95" |
76 | 78 | ||
@@ -154,6 +156,11 @@ compile_mx8ulp() { | |||
154 | fi | 156 | fi |
155 | } | 157 | } |
156 | 158 | ||
159 | compile_mx91() { | ||
160 | bbnote i.MX 91 boot binary build | ||
161 | compile_mx93 | ||
162 | } | ||
163 | |||
157 | compile_mx93() { | 164 | compile_mx93() { |
158 | bbnote i.MX 93 boot binary build | 165 | bbnote i.MX 93 boot binary build |
159 | for ddr_firmware in ${DDR_FIRMWARE_NAME}; do | 166 | for ddr_firmware in ${DDR_FIRMWARE_NAME}; do |
@@ -220,21 +227,26 @@ do_compile() { | |||
220 | 227 | ||
221 | for target in ${IMXBOOT_TARGETS}; do | 228 | for target in ${IMXBOOT_TARGETS}; do |
222 | compile_${SOC_FAMILY} | 229 | compile_${SOC_FAMILY} |
223 | if [ "$target" = "flash_linux_m4_no_v2x" ]; then | 230 | case $target in |
231 | *no_v2x) | ||
224 | # Special target build for i.MX 8DXL with V2X off | 232 | # Special target build for i.MX 8DXL with V2X off |
225 | bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} V2X=NO ${target}" | 233 | bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} V2X=NO ${target}" |
226 | make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} V2X=NO dtbs=${UBOOT_DTB_NAME_EXTRA} flash_linux_m4 | 234 | make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} V2X=NO dtbs=${UBOOT_DTB_NAME_EXTRA} flash_linux_m4 |
227 | elif [[ $target == *sttm_capsule ]]; then | 235 | ;; |
236 | *stmm_capsule) | ||
228 | # target for flash_evk_stmm_capsule or | 237 | # target for flash_evk_stmm_capsule or |
229 | # flash_singleboot_stmm_capsule | 238 | # flash_singleboot_stmm_capsule |
230 | cp ${RECIPE_SYSROOT_NATIVE}/${bindir}/mkeficapsule ${BOOT_STAGING} | 239 | cp ${RECIPE_SYSROOT_NATIVE}/${bindir}/mkeficapsule ${BOOT_STAGING} |
231 | bbnote "building ${IMX_BOOT_SOC_TARGET} - TEE=tee.bin-stmm ${target}" | 240 | bbnote "building ${IMX_BOOT_SOC_TARGET} - TEE=tee.bin-stmm ${target}" |
232 | cp ${DEPLOY_DIR_IMAGE}/CRT.* ${BOOT_STAGING} | 241 | cp ${DEPLOY_DIR_IMAGE}/CRT.* ${BOOT_STAGING} |
233 | make SOC=${IMX_BOOT_SOC_TARGET} TEE=tee.bin-stmm dtbs=${UBOOT_DTB_NAME} ${REV_OPTION} ${target} | 242 | make SOC=${IMX_BOOT_SOC_TARGET} TEE=tee.bin-stmm dtbs=${UBOOT_DTB_NAME} ${REV_OPTION} ${target} |
234 | else | 243 | ;; |
244 | *) | ||
235 | bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} ${MKIMAGE_EXTRA_ARGS} ${target}" | 245 | bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} ${MKIMAGE_EXTRA_ARGS} ${target}" |
236 | make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} ${MKIMAGE_EXTRA_ARGS} dtbs=${UBOOT_DTB_NAME} ${target} | 246 | make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} ${MKIMAGE_EXTRA_ARGS} dtbs=${UBOOT_DTB_NAME} ${target} |
237 | fi | 247 | ;; |
248 | esac | ||
249 | |||
238 | if [ -e "${BOOT_STAGING}/flash.bin" ]; then | 250 | if [ -e "${BOOT_STAGING}/flash.bin" ]; then |
239 | cp ${BOOT_STAGING}/flash.bin ${S}/${BOOT_CONFIG_MACHINE_EXTRA}-${target} | 251 | cp ${BOOT_STAGING}/flash.bin ${S}/${BOOT_CONFIG_MACHINE_EXTRA}-${target} |
240 | fi | 252 | fi |
@@ -317,6 +329,10 @@ deploy_mx8ulp() { | |||
317 | fi | 329 | fi |
318 | } | 330 | } |
319 | 331 | ||
332 | deploy_mx91() { | ||
333 | deploy_mx93 | ||
334 | } | ||
335 | |||
320 | deploy_mx93() { | 336 | deploy_mx93() { |
321 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} | 337 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} |
322 | 338 | ||
@@ -354,6 +370,14 @@ do_deploy() { | |||
354 | # copy makefile (soc.mak) for reference | 370 | # copy makefile (soc.mak) for reference |
355 | install -m 0644 ${BOOT_STAGING}/soc.mak ${DEPLOYDIR}/${BOOT_TOOLS} | 371 | install -m 0644 ${BOOT_STAGING}/soc.mak ${DEPLOYDIR}/${BOOT_TOOLS} |
356 | 372 | ||
373 | # copy stmm files to deploy path | ||
374 | if ${DEPLOY_OPTEE_STMM}; then | ||
375 | install -m 0644 ${BOOT_STAGING}/tee.bin-stmm ${DEPLOYDIR}/${BOOT_TOOLS} | ||
376 | install -m 0644 ${BOOT_STAGING}/capsule1.bin ${DEPLOYDIR}/${BOOT_TOOLS} | ||
377 | install -m 0644 ${BOOT_STAGING}/CRT.* ${DEPLOYDIR}/${BOOT_TOOLS} | ||
378 | install -m 0755 ${BOOT_STAGING}/mkeficapsule ${DEPLOYDIR}/${BOOT_TOOLS} | ||
379 | fi | ||
380 | |||
357 | for type in ${UBOOT_CONFIG}; do | 381 | for type in ${UBOOT_CONFIG}; do |
358 | UBOOT_CONFIG_EXTRA="$type" | 382 | UBOOT_CONFIG_EXTRA="$type" |
359 | UBOOT_NAME_EXTRA="u-boot-${MACHINE}.bin-${UBOOT_CONFIG_EXTRA}" | 383 | UBOOT_NAME_EXTRA="u-boot-${MACHINE}.bin-${UBOOT_CONFIG_EXTRA}" |