diff options
Diffstat (limited to 'recipes-bsp/imx-mkimage')
-rw-r--r-- | recipes-bsp/imx-mkimage/imx-boot_0.2.bb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/recipes-bsp/imx-mkimage/imx-boot_0.2.bb b/recipes-bsp/imx-mkimage/imx-boot_0.2.bb index 04e8b11e..7518c911 100644 --- a/recipes-bsp/imx-mkimage/imx-boot_0.2.bb +++ b/recipes-bsp/imx-mkimage/imx-boot_0.2.bb | |||
@@ -14,6 +14,7 @@ DEPENDS += " \ | |||
14 | firmware-imx \ | 14 | firmware-imx \ |
15 | ${IMX_EXTRA_FIRMWARE} \ | 15 | ${IMX_EXTRA_FIRMWARE} \ |
16 | imx-atf \ | 16 | imx-atf \ |
17 | ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'optee-os', '', d)} \ | ||
17 | " | 18 | " |
18 | DEPENDS_append_mx8m = " dtc-native" | 19 | DEPENDS_append_mx8m = " dtc-native" |
19 | BOOT_NAME = "imx-boot" | 20 | BOOT_NAME = "imx-boot" |
@@ -30,6 +31,7 @@ do_compile[depends] += " \ | |||
30 | virtual/bootloader:do_deploy \ | 31 | virtual/bootloader:do_deploy \ |
31 | ${@' '.join('%s:do_deploy' % r for r in '${IMX_EXTRA_FIRMWARE}'.split() )} \ | 32 | ${@' '.join('%s:do_deploy' % r for r in '${IMX_EXTRA_FIRMWARE}'.split() )} \ |
32 | imx-atf:do_deploy \ | 33 | imx-atf:do_deploy \ |
34 | ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'optee-os:do_deploy', '', d)} \ | ||
33 | " | 35 | " |
34 | 36 | ||
35 | SC_FIRMWARE_NAME ?= "scfw_tcm.bin" | 37 | SC_FIRMWARE_NAME ?= "scfw_tcm.bin" |
@@ -39,7 +41,7 @@ ATF_MACHINE_NAME_mx8qm = "bl31-imx8qm.bin" | |||
39 | ATF_MACHINE_NAME_mx8qxp = "bl31-imx8qx.bin" | 41 | ATF_MACHINE_NAME_mx8qxp = "bl31-imx8qx.bin" |
40 | ATF_MACHINE_NAME_mx8mq = "bl31-imx8mq.bin" | 42 | ATF_MACHINE_NAME_mx8mq = "bl31-imx8mq.bin" |
41 | ATF_MACHINE_NAME_mx8mm = "bl31-imx8mm.bin" | 43 | ATF_MACHINE_NAME_mx8mm = "bl31-imx8mm.bin" |
42 | ATF_MACHINE_NAME_append = "${@bb.utils.contains('COMBINED_FEATURES', 'optee', '-optee', '', d)}" | 44 | ATF_MACHINE_NAME_append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '-optee', '', d)}" |
43 | 45 | ||
44 | UBOOT_NAME = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}" | 46 | UBOOT_NAME = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}" |
45 | BOOT_CONFIG_MACHINE = "${BOOT_NAME}-${MACHINE}-${UBOOT_CONFIG}.bin" | 47 | BOOT_CONFIG_MACHINE = "${BOOT_NAME}-${MACHINE}-${UBOOT_CONFIG}.bin" |
@@ -52,6 +54,8 @@ SOC_TARGET_mx8qxp = "iMX8QX" | |||
52 | SOC_TARGET_mx8mq = "iMX8M" | 54 | SOC_TARGET_mx8mq = "iMX8M" |
53 | SOC_TARGET_mx8mm = "iMX8MM" | 55 | SOC_TARGET_mx8mm = "iMX8MM" |
54 | 56 | ||
57 | DEPLOY_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}" | ||
58 | |||
55 | IMXBOOT_TARGETS ?= \ | 59 | IMXBOOT_TARGETS ?= \ |
56 | "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_flexspi', \ | 60 | "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_flexspi', \ |
57 | bb.utils.contains('UBOOT_CONFIG', 'nand', 'flash_nand', \ | 61 | bb.utils.contains('UBOOT_CONFIG', 'nand', 'flash_nand', \ |
@@ -99,6 +103,9 @@ compile_mx8x() { | |||
99 | do_compile() { | 103 | do_compile() { |
100 | compile_${SOC_FAMILY} | 104 | compile_${SOC_FAMILY} |
101 | # mkimage for i.MX8 | 105 | # mkimage for i.MX8 |
106 | if ${DEPLOY_OPTEE}; then | ||
107 | cp ${DEPLOY_DIR_IMAGE}/tee.bin ${BOOT_STAGING} | ||
108 | fi | ||
102 | for target in ${IMXBOOT_TARGETS}; do | 109 | for target in ${IMXBOOT_TARGETS}; do |
103 | bbnote "building ${SOC_TARGET} - ${target}" | 110 | bbnote "building ${SOC_TARGET} - ${target}" |
104 | make SOC=${SOC_TARGET} dtbs=${UBOOT_DTB_NAME} ${target} | 111 | make SOC=${SOC_TARGET} dtbs=${UBOOT_DTB_NAME} ${target} |
@@ -141,6 +148,12 @@ do_deploy() { | |||
141 | deploy_${SOC_FAMILY} | 148 | deploy_${SOC_FAMILY} |
142 | # copy the tool mkimage to deploy path and sc fw, dcd and uboot | 149 | # copy the tool mkimage to deploy path and sc fw, dcd and uboot |
143 | install -m 0644 ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} | 150 | install -m 0644 ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} |
151 | |||
152 | # copy tee.bin to deploy path | ||
153 | if ${DEPLOY_OPTEE}; then | ||
154 | install -m 0644 ${DEPLOY_DIR_IMAGE}/tee.bin ${DEPLOYDIR}/${BOOT_TOOLS} | ||
155 | fi | ||
156 | |||
144 | # copy makefile (soc.mak) for reference | 157 | # copy makefile (soc.mak) for reference |
145 | install -m 0644 ${BOOT_STAGING}/soc.mak ${DEPLOYDIR}/${BOOT_TOOLS} | 158 | install -m 0644 ${BOOT_STAGING}/soc.mak ${DEPLOYDIR}/${BOOT_TOOLS} |
146 | # copy the generated boot image to deploy path | 159 | # copy the generated boot image to deploy path |