diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2024-08-21 16:47:24 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-21 16:47:24 -0300 |
commit | 8f5d0399a8ea2c39a65b6f19e67ac5e3ee898166 (patch) | |
tree | 694e8682dd7547ebf59bc531fe106ac3ef6b8020 | |
parent | 605af4c9ae5e2ffb5d29ffc72fe4c3d75e435b4c (diff) | |
parent | 9cbfa8f33730e59e8be810ecdd3967738b07380a (diff) | |
download | meta-freescale-8f5d0399a8ea2c39a65b6f19e67ac5e3ee898166.tar.gz |
Merge pull request #1902 from nxp-upstream/imx-boot
imx-boot update and fix
-rw-r--r-- | recipes-bsp/imx-mkimage/imx-boot_1.0.bb | 48 |
1 files changed, 37 insertions, 11 deletions
diff --git a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb index 3f5b2c65..83b9ad78 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 | ||
@@ -101,17 +103,19 @@ compile_mx8m() { | |||
101 | 103 | ||
102 | if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then | 104 | if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then |
103 | # Use DTB binary patched with signature node | 105 | # Use DTB binary patched with signature node |
104 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_DTB_BINARY} ${BOOT_STAGING}/${UBOOT_DTB_NAME_EXTRA} | 106 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_DTB_BINARY} ${BOOT_STAGING}/${UBOOT_DTB_NAME_EXTRA} |
105 | else | 107 | else |
106 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME_EXTRA} ${BOOT_STAGING} | 108 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME_EXTRA} \ |
109 | ${BOOT_STAGING} | ||
107 | fi | 110 | fi |
111 | ln -sf ${UBOOT_DTB_NAME_EXTRA} ${BOOT_STAGING}/${UBOOT_DTB_NAME} | ||
108 | 112 | ||
109 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ | 113 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ |
110 | ${BOOT_STAGING}/u-boot-nodtb.bin | 114 | ${BOOT_STAGING}/u-boot-nodtb.bin |
111 | 115 | ||
112 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin | 116 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin |
113 | 117 | ||
114 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME_EXTRA} ${BOOT_STAGING}/u-boot.bin | 118 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME_EXTRA} ${BOOT_STAGING}/u-boot.bin |
115 | 119 | ||
116 | } | 120 | } |
117 | 121 | ||
@@ -151,6 +155,11 @@ compile_mx8ulp() { | |||
151 | fi | 155 | fi |
152 | } | 156 | } |
153 | 157 | ||
158 | compile_mx91() { | ||
159 | bbnote i.MX 91 boot binary build | ||
160 | compile_mx93 | ||
161 | } | ||
162 | |||
154 | compile_mx93() { | 163 | compile_mx93() { |
155 | bbnote i.MX 93 boot binary build | 164 | bbnote i.MX 93 boot binary build |
156 | for ddr_firmware in ${DDR_FIRMWARE_NAME}; do | 165 | for ddr_firmware in ${DDR_FIRMWARE_NAME}; do |
@@ -217,21 +226,26 @@ do_compile() { | |||
217 | 226 | ||
218 | for target in ${IMXBOOT_TARGETS}; do | 227 | for target in ${IMXBOOT_TARGETS}; do |
219 | compile_${SOC_FAMILY} | 228 | compile_${SOC_FAMILY} |
220 | if [ "$target" = "flash_linux_m4_no_v2x" ]; then | 229 | case $target in |
230 | *no_v2x) | ||
221 | # Special target build for i.MX 8DXL with V2X off | 231 | # Special target build for i.MX 8DXL with V2X off |
222 | bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} V2X=NO ${target}" | 232 | bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} V2X=NO ${target}" |
223 | make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} V2X=NO dtbs=${UBOOT_DTB_NAME_EXTRA} flash_linux_m4 | 233 | make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} V2X=NO dtbs=${UBOOT_DTB_NAME_EXTRA} flash_linux_m4 |
224 | elif [[ $target == *sttm_capsule ]]; then | 234 | ;; |
235 | *stmm_capsule) | ||
225 | # target for flash_evk_stmm_capsule or | 236 | # target for flash_evk_stmm_capsule or |
226 | # flash_singleboot_stmm_capsule | 237 | # flash_singleboot_stmm_capsule |
227 | cp ${RECIPE_SYSROOT_NATIVE}/${bindir}/mkeficapsule ${BOOT_STAGING} | 238 | cp ${RECIPE_SYSROOT_NATIVE}/${bindir}/mkeficapsule ${BOOT_STAGING} |
228 | bbnote "building ${IMX_BOOT_SOC_TARGET} - TEE=tee.bin-stmm ${target}" | 239 | bbnote "building ${IMX_BOOT_SOC_TARGET} - TEE=tee.bin-stmm ${target}" |
229 | cp ${DEPLOY_DIR_IMAGE}/CRT.* ${BOOT_STAGING} | 240 | cp ${DEPLOY_DIR_IMAGE}/CRT.* ${BOOT_STAGING} |
230 | make SOC=${IMX_BOOT_SOC_TARGET} TEE=tee.bin-stmm dtbs=${UBOOT_DTB_NAME} ${REV_OPTION} ${target} | 241 | make SOC=${IMX_BOOT_SOC_TARGET} TEE=tee.bin-stmm dtbs=${UBOOT_DTB_NAME} ${REV_OPTION} ${target} |
231 | else | 242 | ;; |
243 | *) | ||
232 | bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} ${MKIMAGE_EXTRA_ARGS} ${target}" | 244 | bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} ${MKIMAGE_EXTRA_ARGS} ${target}" |
233 | make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} ${MKIMAGE_EXTRA_ARGS} dtbs=${UBOOT_DTB_NAME} ${target} | 245 | make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} ${MKIMAGE_EXTRA_ARGS} dtbs=${UBOOT_DTB_NAME} ${target} |
234 | fi | 246 | ;; |
247 | esac | ||
248 | |||
235 | if [ -e "${BOOT_STAGING}/flash.bin" ]; then | 249 | if [ -e "${BOOT_STAGING}/flash.bin" ]; then |
236 | cp ${BOOT_STAGING}/flash.bin ${S}/${BOOT_CONFIG_MACHINE_EXTRA}-${target} | 250 | cp ${BOOT_STAGING}/flash.bin ${S}/${BOOT_CONFIG_MACHINE_EXTRA}-${target} |
237 | fi | 251 | fi |
@@ -314,6 +328,10 @@ deploy_mx8ulp() { | |||
314 | fi | 328 | fi |
315 | } | 329 | } |
316 | 330 | ||
331 | deploy_mx91() { | ||
332 | deploy_mx93 | ||
333 | } | ||
334 | |||
317 | deploy_mx93() { | 335 | deploy_mx93() { |
318 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} | 336 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} |
319 | 337 | ||
@@ -351,6 +369,14 @@ do_deploy() { | |||
351 | # copy makefile (soc.mak) for reference | 369 | # copy makefile (soc.mak) for reference |
352 | install -m 0644 ${BOOT_STAGING}/soc.mak ${DEPLOYDIR}/${BOOT_TOOLS} | 370 | install -m 0644 ${BOOT_STAGING}/soc.mak ${DEPLOYDIR}/${BOOT_TOOLS} |
353 | 371 | ||
372 | # copy stmm files to deploy path | ||
373 | if ${DEPLOY_OPTEE_STMM}; then | ||
374 | install -m 0644 ${BOOT_STAGING}/tee.bin-stmm ${DEPLOYDIR}/${BOOT_TOOLS} | ||
375 | install -m 0644 ${BOOT_STAGING}/capsule1.bin ${DEPLOYDIR}/${BOOT_TOOLS} | ||
376 | install -m 0644 ${BOOT_STAGING}/CRT.* ${DEPLOYDIR}/${BOOT_TOOLS} | ||
377 | install -m 0755 ${BOOT_STAGING}/mkeficapsule ${DEPLOYDIR}/${BOOT_TOOLS} | ||
378 | fi | ||
379 | |||
354 | for type in ${UBOOT_CONFIG}; do | 380 | for type in ${UBOOT_CONFIG}; do |
355 | UBOOT_CONFIG_EXTRA="$type" | 381 | UBOOT_CONFIG_EXTRA="$type" |
356 | UBOOT_NAME_EXTRA="u-boot-${MACHINE}.bin-${UBOOT_CONFIG_EXTRA}" | 382 | UBOOT_NAME_EXTRA="u-boot-${MACHINE}.bin-${UBOOT_CONFIG_EXTRA}" |