diff options
author | Daiane Angolini <daiane.angolini@foundries.io> | 2023-08-18 13:39:44 -0300 |
---|---|---|
committer | Daiane Angolini <daiane.angolini@foundries.io> | 2023-09-23 12:54:10 -0300 |
commit | e61f27077d7f92713d8b97a642fc2e196ba6508d (patch) | |
tree | 705d6124855677ac6bde0ab3407e3270601108ac /recipes-bsp/imx-mkimage/imx-boot_1.0.bb | |
parent | 23af0e4d3526bb5c2b59731f76874d127efba58c (diff) | |
download | meta-freescale-e61f27077d7f92713d8b97a642fc2e196ba6508d.tar.gz |
imx-boot: allow deploy multiple u-boot
Generate multiple U-boots if env UBOOT_CONFIG contains
multiple configs and support for the case where env
UBOOT_DTB_NAME is defined in the machine's configuration
and has flags for each dtb-file for a specific u-boot configs.
UBOOT_CONFIG = "a b"
UBOOT_DTB_NAME[a] = "a.dtb"
UBOOT_DTB_NAME[b] = "b.dtb"
Skip to create symlink as imx-boot in deploy directory and
print warning about unique wks.in file if env UBOOT_CONFIG
contains multiple configs. This prevents wic-images from
been created that only point on imx-boot.
See PR #1439 and #1642
Signed-off-by: Maxim Paymushkin <maxim.paymushkin@gmail.com>
Signed-off-by: Daiane Angolini <daiane.angolini@foundries.io>
Diffstat (limited to 'recipes-bsp/imx-mkimage/imx-boot_1.0.bb')
-rw-r--r-- | recipes-bsp/imx-mkimage/imx-boot_1.0.bb | 174 |
1 files changed, 126 insertions, 48 deletions
diff --git a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb index 1d501ec1..df2d6629 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" |
@@ -82,28 +79,35 @@ compile_mx8m() { | |||
82 | bbnote "Copy ddr_firmware: ${ddr_firmware} from ${DEPLOY_DIR_IMAGE} -> ${BOOT_STAGING} " | 79 | bbnote "Copy ddr_firmware: ${ddr_firmware} from ${DEPLOY_DIR_IMAGE} -> ${BOOT_STAGING} " |
83 | cp ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${BOOT_STAGING} | 80 | cp ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${BOOT_STAGING} |
84 | done | 81 | done |
82 | |||
85 | cp ${DEPLOY_DIR_IMAGE}/signed_dp_imx8m.bin ${BOOT_STAGING} | 83 | cp ${DEPLOY_DIR_IMAGE}/signed_dp_imx8m.bin ${BOOT_STAGING} |
86 | cp ${DEPLOY_DIR_IMAGE}/signed_hdmi_imx8m.bin ${BOOT_STAGING} | 84 | cp ${DEPLOY_DIR_IMAGE}/signed_hdmi_imx8m.bin ${BOOT_STAGING} |
87 | cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ | 85 | cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ |
88 | ${BOOT_STAGING}/u-boot-spl.bin | 86 | ${BOOT_STAGING}/u-boot-spl.bin |
87 | |||
89 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME} ${BOOT_STAGING} | 88 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME} ${BOOT_STAGING} |
89 | |||
90 | if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then | 90 | if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then |
91 | # Use DTB binary patched with signature node | 91 | # Use DTB binary patched with signature node |
92 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_DTB_BINARY} ${BOOT_STAGING}/${UBOOT_DTB_NAME} | 92 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_DTB_BINARY} ${BOOT_STAGING}/${UBOOT_DTB_NAME} |
93 | fi | 93 | fi |
94 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG} \ | 94 | |
95 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ | ||
95 | ${BOOT_STAGING}/u-boot-nodtb.bin | 96 | ${BOOT_STAGING}/u-boot-nodtb.bin |
97 | |||
96 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin | 98 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin |
97 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin | 99 | |
100 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME_EXTRA} ${BOOT_STAGING}/u-boot.bin | ||
101 | |||
98 | } | 102 | } |
99 | compile_mx8() { | 103 | compile_mx8() { |
100 | bbnote 8QM boot binary build | 104 | bbnote 8QM boot binary build |
101 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${BOOT_STAGING}/scfw_tcm.bin | 105 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${BOOT_STAGING}/scfw_tcm.bin |
102 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin | 106 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin |
103 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin | 107 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME_EXTRA} ${BOOT_STAGING}/u-boot.bin |
104 | cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING} | 108 | cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING} |
105 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then | 109 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} ] ; then |
106 | cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ | 110 | cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ |
107 | ${BOOT_STAGING}/u-boot-spl.bin | 111 | ${BOOT_STAGING}/u-boot-spl.bin |
108 | fi | 112 | fi |
109 | } | 113 | } |
@@ -113,9 +117,9 @@ compile_mx8x() { | |||
113 | cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING} | 117 | cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING} |
114 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${BOOT_STAGING}/scfw_tcm.bin | 118 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${BOOT_STAGING}/scfw_tcm.bin |
115 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin | 119 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin |
116 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin | 120 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME_EXTRA} ${BOOT_STAGING}/u-boot.bin |
117 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then | 121 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} ] ; then |
118 | cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ | 122 | cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ |
119 | ${BOOT_STAGING}/u-boot-spl.bin | 123 | ${BOOT_STAGING}/u-boot-spl.bin |
120 | fi | 124 | fi |
121 | } | 125 | } |
@@ -125,9 +129,9 @@ compile_mx8ulp() { | |||
125 | cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING}/ | 129 | cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING}/ |
126 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin | 130 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin |
127 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/upower.bin ${BOOT_STAGING}/upower.bin | 131 | cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/upower.bin ${BOOT_STAGING}/upower.bin |
128 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin | 132 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME_EXTRA} ${BOOT_STAGING}/u-boot.bin |
129 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then | 133 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} ] ; then |
130 | cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ | 134 | cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ |
131 | ${BOOT_STAGING}/u-boot-spl.bin | 135 | ${BOOT_STAGING}/u-boot-spl.bin |
132 | fi | 136 | fi |
133 | } | 137 | } |
@@ -141,9 +145,9 @@ compile_mx93() { | |||
141 | 145 | ||
142 | cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING}/ | 146 | cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING}/ |
143 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin | 147 | cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin |
144 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin | 148 | cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME_EXTRA} ${BOOT_STAGING}/u-boot.bin |
145 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then | 149 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} ] ; then |
146 | cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ | 150 | cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ |
147 | ${BOOT_STAGING}/u-boot-spl.bin | 151 | ${BOOT_STAGING}/u-boot-spl.bin |
148 | fi | 152 | fi |
149 | } | 153 | } |
@@ -154,50 +158,103 @@ do_compile() { | |||
154 | if ${DEPLOY_OPTEE}; then | 158 | if ${DEPLOY_OPTEE}; then |
155 | cp ${DEPLOY_DIR_IMAGE}/tee.bin ${BOOT_STAGING} | 159 | cp ${DEPLOY_DIR_IMAGE}/tee.bin ${BOOT_STAGING} |
156 | fi | 160 | fi |
157 | for target in ${IMXBOOT_TARGETS}; do | 161 | for type in ${UBOOT_CONFIG}; do |
158 | compile_${SOC_FAMILY} | 162 | if [ "${@d.getVarFlags('UBOOT_DTB_NAME')}" = "None" ]; then |
159 | if [ "$target" = "flash_linux_m4_no_v2x" ]; then | 163 | UBOOT_DTB_NAME_FLAGS="${type}:${UBOOT_DTB_NAME}" |
160 | # Special target build for i.MX 8DXL with V2X off | ||
161 | bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} V2X=NO ${target}" | ||
162 | make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} V2X=NO dtbs=${UBOOT_DTB_NAME} flash_linux_m4 | ||
163 | else | 164 | else |
164 | bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} ${target}" | 165 | 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 '' }" |
165 | make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} dtbs=${UBOOT_DTB_NAME} ${target} | ||
166 | fi | ||
167 | if [ -e "${BOOT_STAGING}/flash.bin" ]; then | ||
168 | cp ${BOOT_STAGING}/flash.bin ${S}/${BOOT_CONFIG_MACHINE}-${target} | ||
169 | fi | 166 | fi |
167 | |||
168 | for key_value in ${UBOOT_DTB_NAME_FLAGS}; do | ||
169 | type_key="${key_value%%:*}" | ||
170 | dtb_name="${key_value#*:}" | ||
171 | |||
172 | if [ "$type_key" = "$type" ] | ||
173 | then | ||
174 | bbnote "UBOOT_CONFIG = $type, UBOOT_DTB_NAME = $dtb_name" | ||
175 | |||
176 | UBOOT_CONFIG_EXTRA="$type_key" | ||
177 | if [ -e ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${dtb_name}-${type} ] ; then | ||
178 | UBOOT_DTB_NAME_EXTRA="${dtb_name}-${type}" | ||
179 | else | ||
180 | # backward compatibility | ||
181 | UBOOT_DTB_NAME_EXTRA="${dtb_name}" | ||
182 | fi | ||
183 | UBOOT_NAME_EXTRA="u-boot-${MACHINE}.bin-${UBOOT_CONFIG_EXTRA}" | ||
184 | BOOT_CONFIG_MACHINE_EXTRA="${BOOT_NAME}-${MACHINE}-${UBOOT_CONFIG_EXTRA}.bin" | ||
185 | |||
186 | for target in ${IMXBOOT_TARGETS}; do | ||
187 | compile_${SOC_FAMILY} | ||
188 | if [ "$target" = "flash_linux_m4_no_v2x" ]; then | ||
189 | # Special target build for i.MX 8DXL with V2X off | ||
190 | bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} V2X=NO ${target}" | ||
191 | make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} V2X=NO dtbs=${UBOOT_DTB_NAME_EXTRA} flash_linux_m4 | ||
192 | else | ||
193 | bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} ${target}" | ||
194 | make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} dtbs=${UBOOT_DTB_NAME_EXTRA} ${target} | ||
195 | fi | ||
196 | if [ -e "${BOOT_STAGING}/flash.bin" ]; then | ||
197 | cp ${BOOT_STAGING}/flash.bin ${S}/${BOOT_CONFIG_MACHINE_EXTRA}-${target} | ||
198 | fi | ||
199 | done | ||
200 | |||
201 | unset UBOOT_CONFIG_EXTRA | ||
202 | unset UBOOT_DTB_NAME_EXTRA | ||
203 | unset UBOOT_NAME_EXTRA | ||
204 | unset BOOT_CONFIG_MACHINE_EXTRA | ||
205 | fi | ||
206 | |||
207 | unset type_key | ||
208 | unset dtb_name | ||
209 | done | ||
210 | |||
211 | unset UBOOT_DTB_NAME_FLAGS | ||
170 | done | 212 | done |
213 | unset type | ||
171 | } | 214 | } |
172 | 215 | ||
173 | do_install () { | 216 | do_install () { |
174 | install -d ${D}/boot | 217 | install -d ${D}/boot |
175 | for target in ${IMXBOOT_TARGETS}; do | 218 | for type in ${UBOOT_CONFIG}; do |
176 | install -m 0644 ${S}/${BOOT_CONFIG_MACHINE}-${target} ${D}/boot/ | 219 | |
220 | bbnote "UBOOT_CONFIG = $type" | ||
221 | |||
222 | UBOOT_CONFIG_EXTRA="$type" | ||
223 | BOOT_CONFIG_MACHINE_EXTRA="${BOOT_NAME}-${MACHINE}-${UBOOT_CONFIG_EXTRA}.bin" | ||
224 | |||
225 | for target in ${IMXBOOT_TARGETS}; do | ||
226 | install -m 0644 ${S}/${BOOT_CONFIG_MACHINE_EXTRA}-${target} ${D}/boot/ | ||
227 | done | ||
228 | |||
229 | unset UBOOT_CONFIG_EXTRA | ||
230 | unset BOOT_CONFIG_MACHINE_EXTRA | ||
177 | done | 231 | done |
232 | |||
233 | unset type | ||
178 | } | 234 | } |
179 | 235 | ||
180 | deploy_mx8m() { | 236 | deploy_mx8m() { |
181 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} | 237 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} |
182 | install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ | ||
183 | ${DEPLOYDIR}/${BOOT_TOOLS} | ||
184 | for ddr_firmware in ${DDR_FIRMWARE_NAME}; do | 238 | for ddr_firmware in ${DDR_FIRMWARE_NAME}; do |
185 | install -m 0644 ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${DEPLOYDIR}/${BOOT_TOOLS} | 239 | install -m 0644 ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${DEPLOYDIR}/${BOOT_TOOLS} |
186 | done | 240 | done |
241 | |||
187 | install -m 0644 ${BOOT_STAGING}/signed_dp_imx8m.bin ${DEPLOYDIR}/${BOOT_TOOLS} | 242 | install -m 0644 ${BOOT_STAGING}/signed_dp_imx8m.bin ${DEPLOYDIR}/${BOOT_TOOLS} |
188 | install -m 0644 ${BOOT_STAGING}/signed_hdmi_imx8m.bin ${DEPLOYDIR}/${BOOT_TOOLS} | 243 | install -m 0644 ${BOOT_STAGING}/signed_hdmi_imx8m.bin ${DEPLOYDIR}/${BOOT_TOOLS} |
189 | install -m 0755 ${BOOT_STAGING}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} | 244 | install -m 0755 ${BOOT_STAGING}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} |
190 | install -m 0755 ${BOOT_STAGING}/mkimage_fit_atf.sh ${DEPLOYDIR}/${BOOT_TOOLS} | 245 | install -m 0755 ${BOOT_STAGING}/mkimage_fit_atf.sh ${DEPLOYDIR}/${BOOT_TOOLS} |
191 | } | 246 | } |
247 | |||
192 | deploy_mx8() { | 248 | deploy_mx8() { |
193 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} | 249 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} |
194 | install -m 0644 ${BOOT_STAGING}/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} | 250 | install -m 0644 ${BOOT_STAGING}/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} |
195 | install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} | 251 | install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} |
196 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then | 252 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} ] ; then |
197 | install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ | 253 | install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ |
198 | ${DEPLOYDIR}/${BOOT_TOOLS} | 254 | ${DEPLOYDIR}/${BOOT_TOOLS} |
199 | fi | 255 | fi |
200 | } | 256 | } |
257 | |||
201 | deploy_mx8x() { | 258 | deploy_mx8x() { |
202 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} | 259 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} |
203 | install -m 0644 ${BOOT_STAGING}/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} | 260 | install -m 0644 ${BOOT_STAGING}/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} |
@@ -212,7 +269,7 @@ deploy_mx8ulp() { | |||
212 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} | 269 | install -d ${DEPLOYDIR}/${BOOT_TOOLS} |
213 | install -m 0644 ${BOOT_STAGING}/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} | 270 | install -m 0644 ${BOOT_STAGING}/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} |
214 | install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} | 271 | install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} |
215 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then | 272 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} ] ; then |
216 | install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ | 273 | install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ |
217 | ${DEPLOYDIR}/${BOOT_TOOLS} | 274 | ${DEPLOYDIR}/${BOOT_TOOLS} |
218 | fi | 275 | fi |
@@ -235,27 +292,48 @@ deploy_mx93() { | |||
235 | 292 | ||
236 | do_deploy() { | 293 | do_deploy() { |
237 | deploy_${SOC_FAMILY} | 294 | deploy_${SOC_FAMILY} |
238 | # copy the sc fw, dcd and uboot to deploy path | ||
239 | install -m 0644 ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} | ||
240 | 295 | ||
241 | # copy tee.bin to deploy path | 296 | # copy tee.bin to deploy path |
242 | if ${DEPLOY_OPTEE}; then | 297 | if ${DEPLOY_OPTEE}; then |
243 | install -m 0644 ${DEPLOY_DIR_IMAGE}/tee.bin ${DEPLOYDIR}/${BOOT_TOOLS} | 298 | install -m 0644 ${DEPLOY_DIR_IMAGE}/tee.bin ${DEPLOYDIR}/${BOOT_TOOLS} |
244 | fi | 299 | fi |
245 | |||
246 | # copy makefile (soc.mak) for reference | 300 | # copy makefile (soc.mak) for reference |
247 | install -m 0644 ${BOOT_STAGING}/soc.mak ${DEPLOYDIR}/${BOOT_TOOLS} | 301 | install -m 0644 ${BOOT_STAGING}/soc.mak ${DEPLOYDIR}/${BOOT_TOOLS} |
248 | # copy the generated boot image to deploy path | 302 | |
249 | for target in ${IMXBOOT_TARGETS}; do | 303 | for type in ${UBOOT_CONFIG}; do |
250 | # Use first "target" as IMAGE_IMXBOOT_TARGET | 304 | UBOOT_CONFIG_EXTRA="$type" |
251 | if [ "$IMAGE_IMXBOOT_TARGET" = "" ]; then | 305 | UBOOT_NAME_EXTRA="u-boot-${MACHINE}.bin-${UBOOT_CONFIG_EXTRA}" |
252 | IMAGE_IMXBOOT_TARGET="$target" | 306 | BOOT_CONFIG_MACHINE_EXTRA="${BOOT_NAME}-${MACHINE}-${UBOOT_CONFIG_EXTRA}.bin" |
253 | echo "Set boot target as $IMAGE_IMXBOOT_TARGET" | 307 | |
308 | if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} ] ; then | ||
309 | install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ | ||
310 | ${DEPLOYDIR}/${BOOT_TOOLS} | ||
311 | fi | ||
312 | # copy the tool mkimage to deploy path and sc fw, dcd and uboot | ||
313 | install -m 0644 ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME_EXTRA} ${DEPLOYDIR}/${BOOT_TOOLS} | ||
314 | |||
315 | # copy the generated boot image to deploy path | ||
316 | for target in ${IMXBOOT_TARGETS}; do | ||
317 | # Use first "target" as IMAGE_IMXBOOT_TARGET | ||
318 | if [ "$IMAGE_IMXBOOT_TARGET" = "" ]; then | ||
319 | IMAGE_IMXBOOT_TARGET="$target" | ||
320 | echo "Set boot target as $IMAGE_IMXBOOT_TARGET" | ||
321 | fi | ||
322 | install -m 0644 ${S}/${BOOT_CONFIG_MACHINE_EXTRA}-${target} ${DEPLOYDIR} | ||
323 | done | ||
324 | |||
325 | # The first UBOOT_CONFIG listed will be the ${BOOT_NAME} binary | ||
326 | if [ ! -f "${DEPLOYDIR}/${UUU_BOOTLOADER}" ]; then | ||
327 | ln -sf ${BOOT_CONFIG_MACHINE_EXTRA}-${IMAGE_IMXBOOT_TARGET} ${DEPLOYDIR}/${BOOT_NAME} | ||
328 | else | ||
329 | bbwarn "Use custom wks.in for $UBOOT_CONFIG = $type" | ||
254 | fi | 330 | fi |
255 | install -m 0644 ${S}/${BOOT_CONFIG_MACHINE}-${target} ${DEPLOYDIR} | ||
256 | done | ||
257 | 331 | ||
258 | ln -sf ${BOOT_CONFIG_MACHINE}-${IMAGE_IMXBOOT_TARGET} ${DEPLOYDIR}/${BOOT_NAME} | 332 | unset UBOOT_CONFIG_EXTRA |
333 | unset UBOOT_NAME_EXTRA | ||
334 | unset BOOT_CONFIG_MACHINE_EXTRA | ||
335 | done | ||
336 | unset type | ||
259 | } | 337 | } |
260 | addtask deploy before do_build after do_compile | 338 | addtask deploy before do_build after do_compile |
261 | 339 | ||