diff options
Diffstat (limited to 'classes/imx-boot-container.bbclass')
-rw-r--r-- | classes/imx-boot-container.bbclass | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/classes/imx-boot-container.bbclass b/classes/imx-boot-container.bbclass index 53c70a0b8..7c9f34927 100644 --- a/classes/imx-boot-container.bbclass +++ b/classes/imx-boot-container.bbclass | |||
@@ -27,7 +27,7 @@ | |||
27 | ATF_MACHINE_NAME = "bl31-${ATF_PLATFORM}.bin" | 27 | ATF_MACHINE_NAME = "bl31-${ATF_PLATFORM}.bin" |
28 | ATF_MACHINE_NAME:append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '-optee', '', d)}" | 28 | ATF_MACHINE_NAME:append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '-optee', '', d)}" |
29 | 29 | ||
30 | IMX_BOOT_CONTAINER_FIRMWARE_SOC = "" | 30 | IMX_BOOT_CONTAINER_FIRMWARE_SOC ?= "" |
31 | IMX_BOOT_CONTAINER_FIRMWARE_SOC:mx8mq-generic-bsp = " \ | 31 | IMX_BOOT_CONTAINER_FIRMWARE_SOC:mx8mq-generic-bsp = " \ |
32 | signed_dp_imx8m.bin \ | 32 | signed_dp_imx8m.bin \ |
33 | signed_hdmi_imx8m.bin \ | 33 | signed_hdmi_imx8m.bin \ |
@@ -52,17 +52,21 @@ do_resolve_and_populate_binaries() { | |||
52 | for config in ${UBOOT_MACHINE}; do | 52 | for config in ${UBOOT_MACHINE}; do |
53 | i=$(expr $i + 1); | 53 | i=$(expr $i + 1); |
54 | for type in ${UBOOT_CONFIG}; do | 54 | for type in ${UBOOT_CONFIG}; do |
55 | builddir="${config}-${type}" | ||
55 | j=$(expr $j + 1); | 56 | j=$(expr $j + 1); |
56 | if [ $j -eq $i ]; then | 57 | if [ $j -eq $i ]; then |
57 | for firmware in ${IMX_BOOT_CONTAINER_FIRMWARE}; do | 58 | for firmware in ${IMX_BOOT_CONTAINER_FIRMWARE}; do |
58 | bbnote "Copy firmware: ${firmware} from ${DEPLOY_DIR_IMAGE} -> ${B}/${config}/" | 59 | bbnote "Copy firmware: ${firmware} from ${DEPLOY_DIR_IMAGE} -> ${B}/${builddir}/" |
59 | cp ${DEPLOY_DIR_IMAGE}/${firmware} ${B}/${config}/ | 60 | cp ${DEPLOY_DIR_IMAGE}/${firmware} ${B}/${builddir}/ |
60 | done | 61 | done |
61 | if [ -n "${ATF_MACHINE_NAME}" ]; then | 62 | if [ -n "${ATF_MACHINE_NAME}" ]; then |
62 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${B}/${config}/bl31.bin | 63 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${B}/${builddir}/bl31.bin |
63 | else | 64 | else |
64 | bberror "ATF binary is undefined, result binary would be unusable!" | 65 | bberror "ATF binary is undefined, result binary would be unusable!" |
65 | fi | 66 | fi |
67 | if [ "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '1' , '0' , d)}" = "1" ] ; then | ||
68 | cp ${DEPLOY_DIR_IMAGE}/${OPTEE_BOOT_IMAGE} ${B}/${builddir}/ | ||
69 | fi | ||
66 | fi | 70 | fi |
67 | done | 71 | done |
68 | unset j | 72 | unset j |
@@ -87,16 +91,17 @@ do_deploy:append() { | |||
87 | for config in ${UBOOT_MACHINE}; do | 91 | for config in ${UBOOT_MACHINE}; do |
88 | i=$(expr $i + 1); | 92 | i=$(expr $i + 1); |
89 | for type in ${UBOOT_CONFIG}; do | 93 | for type in ${UBOOT_CONFIG}; do |
94 | builddir="${config}-${type}" | ||
90 | j=$(expr $j + 1); | 95 | j=$(expr $j + 1); |
91 | if [ $j -eq $i ] | 96 | if [ $j -eq $i ] |
92 | then | 97 | then |
93 | install -m 0644 ${B}/${config}/flash.bin ${DEPLOYDIR}/flash.bin-${MACHINE}-${type} | 98 | install -m 0644 ${B}/${builddir}/flash.bin ${DEPLOYDIR}/flash.bin-${MACHINE}-${type} |
94 | # When there's more than one word in UBOOT_CONFIG, | 99 | # When there's more than one word in UBOOT_CONFIG, |
95 | # the first UBOOT_CONFIG listed will be the imx-boot binary | 100 | # the first UBOOT_CONFIG listed will be the imx-boot binary |
96 | if [ ! -f "${DEPLOYDIR}/imx-boot" ]; then | 101 | if [ ! -f "${DEPLOYDIR}/imx-boot" ]; then |
97 | ln -sf flash.bin-${MACHINE}-${type} flash.bin | 102 | ln -sf flash.bin-${MACHINE}-${type} flash.bin |
98 | ln -sf flash.bin-${MACHINE}-${type} imx-boot | 103 | ln -sf flash.bin-${MACHINE}-${type} imx-boot |
99 | 104 | ln -sf flash.bin.tagged imx-boot.tagged | |
100 | else | 105 | else |
101 | bbwarn "Use custom wks.in for $UBOOT_CONFIG = $type" | 106 | bbwarn "Use custom wks.in for $UBOOT_CONFIG = $type" |
102 | fi | 107 | fi |