diff options
author | Xabier Marquiegui <xmarquiegui@ainguraiiot.com> | 2021-04-18 13:25:38 +0200 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2021-04-18 13:48:31 -0300 |
commit | 930545b1ac6926dd70f61c0ef990b79acdfb06c2 (patch) | |
tree | d65a8bc9a1b96b40a4aad5e15efb87ec3a52c5ba | |
parent | dde79e0e441cf0dae95ba42acdb9d81a384541c4 (diff) | |
download | meta-freescale-930545b1ac6926dd70f61c0ef990b79acdfb06c2.tar.gz |
Fix kernel-itbimage.bbclass indentation
Using spaces instead of tabs gets rid of dozens of warnings by yocto
stating:
`python should use 4 spaces indentation, but found tabs in
kernel-itbimage.bbclass`
-rw-r--r-- | classes/kernel-itbimage.bbclass | 514 |
1 files changed, 257 insertions, 257 deletions
diff --git a/classes/kernel-itbimage.bbclass b/classes/kernel-itbimage.bbclass index 703fa616..8774b57c 100644 --- a/classes/kernel-itbimage.bbclass +++ b/classes/kernel-itbimage.bbclass | |||
@@ -12,9 +12,9 @@ python __anonymous () { | |||
12 | else: | 12 | else: |
13 | replacementtype = "vmlinux" | 13 | replacementtype = "vmlinux" |
14 | 14 | ||
15 | # Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal | 15 | # Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal |
16 | # to kernel.bbclass . We have to override it, since we pack zImage | 16 | # to kernel.bbclass . We have to override it, since we pack zImage |
17 | # (at least for now) into the fitImage . | 17 | # (at least for now) into the fitImage . |
18 | typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE") or "" | 18 | typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE") or "" |
19 | if 'itbImage' in typeformake.split(): | 19 | if 'itbImage' in typeformake.split(): |
20 | d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake.replace('itbImage', replacementtype)) | 20 | d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake.replace('itbImage', replacementtype)) |
@@ -47,7 +47,7 @@ UBOOT_MKIMAGE_DTCOPTS ??= "" | |||
47 | # | 47 | # |
48 | # $1 ... .its filename | 48 | # $1 ... .its filename |
49 | fitimage_emit_fit_header() { | 49 | fitimage_emit_fit_header() { |
50 | cat << EOF >> ${1} | 50 | cat << EOF >> ${1} |
51 | /dts-v1/; | 51 | /dts-v1/; |
52 | 52 | ||
53 | / { | 53 | / { |
@@ -66,30 +66,30 @@ EOF | |||
66 | # fitend - fitimage end | 66 | # fitend - fitimage end |
67 | # | 67 | # |
68 | fitimage_emit_section_maint() { | 68 | fitimage_emit_section_maint() { |
69 | case $2 in | 69 | case $2 in |
70 | imagestart) | 70 | imagestart) |
71 | cat << EOF >> ${1} | 71 | cat << EOF >> ${1} |
72 | 72 | ||
73 | images { | 73 | images { |
74 | EOF | 74 | EOF |
75 | ;; | 75 | ;; |
76 | confstart) | 76 | confstart) |
77 | cat << EOF >> ${1} | 77 | cat << EOF >> ${1} |
78 | 78 | ||
79 | configurations { | 79 | configurations { |
80 | EOF | 80 | EOF |
81 | ;; | 81 | ;; |
82 | sectend) | 82 | sectend) |
83 | cat << EOF >> ${1} | 83 | cat << EOF >> ${1} |
84 | }; | 84 | }; |
85 | EOF | 85 | EOF |
86 | ;; | 86 | ;; |
87 | fitend) | 87 | fitend) |
88 | cat << EOF >> ${1} | 88 | cat << EOF >> ${1} |
89 | }; | 89 | }; |
90 | EOF | 90 | EOF |
91 | ;; | 91 | ;; |
92 | esac | 92 | esac |
93 | } | 93 | } |
94 | 94 | ||
95 | # | 95 | # |
@@ -101,15 +101,15 @@ EOF | |||
101 | # $4 ... Compression type | 101 | # $4 ... Compression type |
102 | fitimage_emit_section_kernel() { | 102 | fitimage_emit_section_kernel() { |
103 | 103 | ||
104 | kernel_csum="sha1" | 104 | kernel_csum="sha1" |
105 | 105 | ||
106 | ENTRYPOINT=${UBOOT_ENTRYPOINT} | 106 | ENTRYPOINT=${UBOOT_ENTRYPOINT} |
107 | if [ -n "${UBOOT_ENTRYSYMBOL}" ]; then | 107 | if [ -n "${UBOOT_ENTRYSYMBOL}" ]; then |
108 | ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \ | 108 | ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \ |
109 | awk '$4=="${UBOOT_ENTRYSYMBOL}" {print $2}'` | 109 | awk '$4=="${UBOOT_ENTRYSYMBOL}" {print $2}'` |
110 | fi | 110 | fi |
111 | 111 | ||
112 | cat << EOF >> ${1} | 112 | cat << EOF >> ${1} |
113 | kernel@${2} { | 113 | kernel@${2} { |
114 | description = "Linux kernel"; | 114 | description = "Linux kernel"; |
115 | data = /incbin/("${3}"); | 115 | data = /incbin/("${3}"); |
@@ -134,13 +134,13 @@ EOF | |||
134 | # $3 ... Path to DTB image | 134 | # $3 ... Path to DTB image |
135 | fitimage_emit_section_dtb() { | 135 | fitimage_emit_section_dtb() { |
136 | 136 | ||
137 | dtb_csum="sha1" | 137 | dtb_csum="sha1" |
138 | 138 | ||
139 | if [ -n "${DTB_LOAD}" ]; then | 139 | if [ -n "${DTB_LOAD}" ]; then |
140 | dtb_loadline="load = <${DTB_LOAD}>;" | 140 | dtb_loadline="load = <${DTB_LOAD}>;" |
141 | fi | 141 | fi |
142 | 142 | ||
143 | cat << EOF >> ${1} | 143 | cat << EOF >> ${1} |
144 | fdt@${2} { | 144 | fdt@${2} { |
145 | description = "Flattened Device Tree blob"; | 145 | description = "Flattened Device Tree blob"; |
146 | data = /incbin/("${3}"); | 146 | data = /incbin/("${3}"); |
@@ -163,9 +163,9 @@ EOF | |||
163 | # $3 ... Path to setup image | 163 | # $3 ... Path to setup image |
164 | fitimage_emit_section_setup() { | 164 | fitimage_emit_section_setup() { |
165 | 165 | ||
166 | setup_csum="sha1" | 166 | setup_csum="sha1" |
167 | 167 | ||
168 | cat << EOF >> ${1} | 168 | cat << EOF >> ${1} |
169 | setup@${2} { | 169 | setup@${2} { |
170 | description = "Linux setup.bin"; | 170 | description = "Linux setup.bin"; |
171 | data = /incbin/("${3}"); | 171 | data = /incbin/("${3}"); |
@@ -190,37 +190,37 @@ EOF | |||
190 | # $3 ... Path to ramdisk image | 190 | # $3 ... Path to ramdisk image |
191 | fitimage_emit_section_ramdisk() { | 191 | fitimage_emit_section_ramdisk() { |
192 | 192 | ||
193 | ramdisk_csum="sha1" | 193 | ramdisk_csum="sha1" |
194 | ramdisk_ctype="none" | 194 | ramdisk_ctype="none" |
195 | ramdisk_loadline="" | 195 | ramdisk_loadline="" |
196 | ramdisk_entryline="" | 196 | ramdisk_entryline="" |
197 | 197 | ||
198 | if [ -n "${UBOOT_RD_LOADADDRESS}" ]; then | 198 | if [ -n "${UBOOT_RD_LOADADDRESS}" ]; then |
199 | ramdisk_loadline="load = <${UBOOT_RD_LOADADDRESS}>;" | 199 | ramdisk_loadline="load = <${UBOOT_RD_LOADADDRESS}>;" |
200 | fi | 200 | fi |
201 | if [ -n "${UBOOT_RD_ENTRYPOINT}" ]; then | 201 | if [ -n "${UBOOT_RD_ENTRYPOINT}" ]; then |
202 | ramdisk_entryline="entry = <${UBOOT_RD_ENTRYPOINT}>;" | 202 | ramdisk_entryline="entry = <${UBOOT_RD_ENTRYPOINT}>;" |
203 | fi | 203 | fi |
204 | 204 | ||
205 | case $3 in | 205 | case $3 in |
206 | *.gz) | 206 | *.gz) |
207 | ramdisk_ctype="gzip" | 207 | ramdisk_ctype="gzip" |
208 | ;; | 208 | ;; |
209 | *.bz2) | 209 | *.bz2) |
210 | ramdisk_ctype="bzip2" | 210 | ramdisk_ctype="bzip2" |
211 | ;; | 211 | ;; |
212 | *.lzma) | 212 | *.lzma) |
213 | ramdisk_ctype="lzma" | 213 | ramdisk_ctype="lzma" |
214 | ;; | 214 | ;; |
215 | *.lzo) | 215 | *.lzo) |
216 | ramdisk_ctype="lzo" | 216 | ramdisk_ctype="lzo" |
217 | ;; | 217 | ;; |
218 | *.lz4) | 218 | *.lz4) |
219 | ramdisk_ctype="lz4" | 219 | ramdisk_ctype="lz4" |
220 | ;; | 220 | ;; |
221 | esac | 221 | esac |
222 | 222 | ||
223 | cat << EOF >> ${1} | 223 | cat << EOF >> ${1} |
224 | ramdisk@${2} { | 224 | ramdisk@${2} { |
225 | description = "${INITRAMFS_IMAGE}"; | 225 | description = "${INITRAMFS_IMAGE}"; |
226 | data = /incbin/("${3}"); | 226 | data = /incbin/("${3}"); |
@@ -248,79 +248,79 @@ EOF | |||
248 | # $6 ... default flag | 248 | # $6 ... default flag |
249 | fitimage_emit_section_config() { | 249 | fitimage_emit_section_config() { |
250 | 250 | ||
251 | conf_csum="sha1" | 251 | conf_csum="sha1" |
252 | if [ -n "${UBOOT_SIGN_ENABLE}" ] ; then | 252 | if [ -n "${UBOOT_SIGN_ENABLE}" ] ; then |
253 | conf_sign_keyname="${UBOOT_SIGN_KEYNAME}" | 253 | conf_sign_keyname="${UBOOT_SIGN_KEYNAME}" |
254 | fi | 254 | fi |
255 | 255 | ||
256 | # Test if we have any DTBs at all | 256 | # Test if we have any DTBs at all |
257 | conf_desc="Linux kernel" | 257 | conf_desc="Linux kernel" |
258 | kernel_line="kernel = \"kernel@${2}\";" | 258 | kernel_line="kernel = \"kernel@${2}\";" |
259 | fdt_line="" | 259 | fdt_line="" |
260 | ramdisk_line="" | 260 | ramdisk_line="" |
261 | setup_line="" | 261 | setup_line="" |
262 | default_line="" | 262 | default_line="" |
263 | 263 | ||
264 | if [ -n "${3}" ]; then | 264 | if [ -n "${3}" ]; then |
265 | conf_desc="${conf_desc}, FDT blob" | 265 | conf_desc="${conf_desc}, FDT blob" |
266 | fdt_line="fdt = \"fdt@${3}\";" | 266 | fdt_line="fdt = \"fdt@${3}\";" |
267 | fi | 267 | fi |
268 | 268 | ||
269 | if [ -n "${4}" ]; then | 269 | if [ -n "${4}" ]; then |
270 | conf_desc="${conf_desc}, ramdisk" | 270 | conf_desc="${conf_desc}, ramdisk" |
271 | ramdisk_line="ramdisk = \"ramdisk@${4}\";" | 271 | ramdisk_line="ramdisk = \"ramdisk@${4}\";" |
272 | fi | 272 | fi |
273 | 273 | ||
274 | if [ -n "${5}" ]; then | 274 | if [ -n "${5}" ]; then |
275 | conf_desc="${conf_desc}, setup" | 275 | conf_desc="${conf_desc}, setup" |
276 | setup_line="setup = \"setup@${5}\";" | 276 | setup_line="setup = \"setup@${5}\";" |
277 | fi | 277 | fi |
278 | 278 | ||
279 | if [ "${6}" = "1" ]; then | 279 | if [ "${6}" = "1" ]; then |
280 | default_line="default = \"conf@${3}\";" | 280 | default_line="default = \"conf@${3}\";" |
281 | fi | 281 | fi |
282 | 282 | ||
283 | cat << EOF >> ${1} | 283 | cat << EOF >> ${1} |
284 | ${default_line} | 284 | ${default_line} |
285 | conf@${3} { | 285 | conf@${3} { |
286 | description = "${6} ${conf_desc}"; | 286 | description = "${6} ${conf_desc}"; |
287 | ${kernel_line} | 287 | ${kernel_line} |
288 | ${fdt_line} | 288 | ${fdt_line} |
289 | ${ramdisk_line} | 289 | ${ramdisk_line} |
290 | ${setup_line} | 290 | ${setup_line} |
291 | hash@1 { | 291 | hash@1 { |
292 | algo = "${conf_csum}"; | 292 | algo = "${conf_csum}"; |
293 | }; | 293 | }; |
294 | EOF | 294 | EOF |
295 | 295 | ||
296 | if [ ! -z "${conf_sign_keyname}" ] ; then | 296 | if [ ! -z "${conf_sign_keyname}" ] ; then |
297 | 297 | ||
298 | sign_line="sign-images = \"kernel\"" | 298 | sign_line="sign-images = \"kernel\"" |
299 | 299 | ||
300 | if [ -n "${3}" ]; then | 300 | if [ -n "${3}" ]; then |
301 | sign_line="${sign_line}, \"fdt\"" | 301 | sign_line="${sign_line}, \"fdt\"" |
302 | fi | 302 | fi |
303 | 303 | ||
304 | if [ -n "${4}" ]; then | 304 | if [ -n "${4}" ]; then |
305 | sign_line="${sign_line}, \"ramdisk\"" | 305 | sign_line="${sign_line}, \"ramdisk\"" |
306 | fi | 306 | fi |
307 | 307 | ||
308 | if [ -n "${5}" ]; then | 308 | if [ -n "${5}" ]; then |
309 | sign_line="${sign_line}, \"setup\"" | 309 | sign_line="${sign_line}, \"setup\"" |
310 | fi | 310 | fi |
311 | 311 | ||
312 | sign_line="${sign_line};" | 312 | sign_line="${sign_line};" |
313 | 313 | ||
314 | cat << EOF >> ${1} | 314 | cat << EOF >> ${1} |
315 | signature@1 { | 315 | signature@1 { |
316 | algo = "${conf_csum},rsa2048"; | 316 | algo = "${conf_csum},rsa2048"; |
317 | key-name-hint = "${conf_sign_keyname}"; | 317 | key-name-hint = "${conf_sign_keyname}"; |
318 | ${sign_line} | 318 | ${sign_line} |
319 | }; | 319 | }; |
320 | EOF | 320 | EOF |
321 | fi | 321 | fi |
322 | 322 | ||
323 | cat << EOF >> ${1} | 323 | cat << EOF >> ${1} |
324 | }; | 324 | }; |
325 | EOF | 325 | EOF |
326 | } | 326 | } |
@@ -332,127 +332,127 @@ EOF | |||
332 | # $2 ... fitImage name | 332 | # $2 ... fitImage name |
333 | # $3 ... include ramdisk | 333 | # $3 ... include ramdisk |
334 | fitimage_assemble() { | 334 | fitimage_assemble() { |
335 | kernelcount=1 | 335 | kernelcount=1 |
336 | dtbcount="" | 336 | dtbcount="" |
337 | DTBS="" | 337 | DTBS="" |
338 | ramdiskcount=${3} | 338 | ramdiskcount=${3} |
339 | setupcount="" | 339 | setupcount="" |
340 | rm -f ${1} arch/${ARCH}/boot/${2} | 340 | rm -f ${1} arch/${ARCH}/boot/${2} |
341 | 341 | ||
342 | fitimage_emit_fit_header ${1} | 342 | fitimage_emit_fit_header ${1} |
343 | 343 | ||
344 | # | 344 | # |
345 | # Step 1: Prepare a kernel image section. | 345 | # Step 1: Prepare a kernel image section. |
346 | # | 346 | # |
347 | fitimage_emit_section_maint ${1} imagestart | 347 | fitimage_emit_section_maint ${1} imagestart |
348 | 348 | ||
349 | uboot_prep_kimage | 349 | uboot_prep_kimage |
350 | fitimage_emit_section_kernel ${1} "${kernelcount}" linux.bin "${linux_comp}" | 350 | fitimage_emit_section_kernel ${1} "${kernelcount}" linux.bin "${linux_comp}" |
351 | 351 | ||
352 | # | 352 | # |
353 | # Step 2: Prepare a DTB image section | 353 | # Step 2: Prepare a DTB image section |
354 | # | 354 | # |
355 | if [ -n "${KERNEL_DEVICETREE}" ]; then | 355 | if [ -n "${KERNEL_DEVICETREE}" ]; then |
356 | dtbcount=1 | 356 | dtbcount=1 |
357 | for DTB in ${KERNEL_DEVICETREE}; do | 357 | for DTB in ${KERNEL_DEVICETREE}; do |
358 | if echo ${DTB} | grep -q '/dts/'; then | 358 | if echo ${DTB} | grep -q '/dts/'; then |
359 | bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used." | 359 | bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used." |
360 | DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'` | 360 | DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'` |
361 | fi | 361 | fi |
362 | DTB_PATH="arch/${ARCH}/boot/dts/${DTB}" | 362 | DTB_PATH="arch/${ARCH}/boot/dts/${DTB}" |
363 | DTB=`basename ${DTB}` | 363 | DTB=`basename ${DTB}` |
364 | if [ ! -e "${DTB_PATH}" ]; then | 364 | if [ ! -e "${DTB_PATH}" ]; then |
365 | DTB_PATH="arch/${ARCH}/boot/${DTB}" | 365 | DTB_PATH="arch/${ARCH}/boot/${DTB}" |
366 | fi | 366 | fi |
367 | 367 | ||
368 | DTBS="${DTBS} ${DTB}" | 368 | DTBS="${DTBS} ${DTB}" |
369 | fitimage_emit_section_dtb ${1} ${DTB} ${DTB_PATH} | 369 | fitimage_emit_section_dtb ${1} ${DTB} ${DTB_PATH} |
370 | done | 370 | done |
371 | fi | 371 | fi |
372 | 372 | ||
373 | # | 373 | # |
374 | # Step 3: Prepare a setup section. (For x86) | 374 | # Step 3: Prepare a setup section. (For x86) |
375 | # | 375 | # |
376 | if [ -e arch/${ARCH}/boot/setup.bin ]; then | 376 | if [ -e arch/${ARCH}/boot/setup.bin ]; then |
377 | setupcount=1 | 377 | setupcount=1 |
378 | fitimage_emit_section_setup ${1} "${setupcount}" arch/${ARCH}/boot/setup.bin | 378 | fitimage_emit_section_setup ${1} "${setupcount}" arch/${ARCH}/boot/setup.bin |
379 | fi | 379 | fi |
380 | 380 | ||
381 | # | 381 | # |
382 | # Step 4: Prepare a ramdisk section. | 382 | # Step 4: Prepare a ramdisk section. |
383 | # | 383 | # |
384 | if [ "x${ramdiskcount}" = "x1" ] ; then | 384 | if [ "x${ramdiskcount}" = "x1" ] ; then |
385 | # Find and use the first initramfs image archive type we find | 385 | # Find and use the first initramfs image archive type we find |
386 | for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz ext2.gz cpio; do | 386 | for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz ext2.gz cpio; do |
387 | initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.${img}" | 387 | initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.${img}" |
388 | echo "Using $initramfs_path" | 388 | echo "Using $initramfs_path" |
389 | if [ -e "${initramfs_path}" ]; then | 389 | if [ -e "${initramfs_path}" ]; then |
390 | fitimage_emit_section_ramdisk ${1} "${ramdiskcount}" "${initramfs_path}" | 390 | fitimage_emit_section_ramdisk ${1} "${ramdiskcount}" "${initramfs_path}" |
391 | break | 391 | break |
392 | fi | 392 | fi |
393 | done | 393 | done |
394 | fi | 394 | fi |
395 | 395 | ||
396 | fitimage_emit_section_maint ${1} sectend | 396 | fitimage_emit_section_maint ${1} sectend |
397 | 397 | ||
398 | # Force the first Kernel and DTB in the default config | 398 | # Force the first Kernel and DTB in the default config |
399 | kernelcount=1 | 399 | kernelcount=1 |
400 | if [ -n "${dtbcount}" ]; then | 400 | if [ -n "${dtbcount}" ]; then |
401 | dtbcount=1 | 401 | dtbcount=1 |
402 | fi | 402 | fi |
403 | 403 | ||
404 | # | 404 | # |
405 | # Step 5: Prepare a configurations section | 405 | # Step 5: Prepare a configurations section |
406 | # | 406 | # |
407 | fitimage_emit_section_maint ${1} confstart | 407 | fitimage_emit_section_maint ${1} confstart |
408 | 408 | ||
409 | if [ -n "${DTBS}" ]; then | 409 | if [ -n "${DTBS}" ]; then |
410 | i=1 | 410 | i=1 |
411 | for DTB in ${DTBS}; do | 411 | for DTB in ${DTBS}; do |
412 | fitimage_emit_section_config ${1} "${kernelcount}" "${DTB}" "${ramdiskcount}" "${setupcount}" "`expr ${i} = ${dtbcount}`" | 412 | fitimage_emit_section_config ${1} "${kernelcount}" "${DTB}" "${ramdiskcount}" "${setupcount}" "`expr ${i} = ${dtbcount}`" |
413 | i=`expr ${i} + 1` | 413 | i=`expr ${i} + 1` |
414 | done | 414 | done |
415 | fi | 415 | fi |
416 | 416 | ||
417 | fitimage_emit_section_maint ${1} sectend | 417 | fitimage_emit_section_maint ${1} sectend |
418 | 418 | ||
419 | fitimage_emit_section_maint ${1} fitend | 419 | fitimage_emit_section_maint ${1} fitend |
420 | 420 | ||
421 | # | 421 | # |
422 | # Step 6: Assemble the image | 422 | # Step 6: Assemble the image |
423 | # | 423 | # |
424 | uboot-mkimage \ | 424 | uboot-mkimage \ |
425 | ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \ | 425 | ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \ |
426 | -f ${1} \ | 426 | -f ${1} \ |
427 | arch/${ARCH}/boot/${2} | 427 | arch/${ARCH}/boot/${2} |
428 | 428 | ||
429 | # | 429 | # |
430 | # Step 7: Sign the image and add public key to U-Boot dtb | 430 | # Step 7: Sign the image and add public key to U-Boot dtb |
431 | # | 431 | # |
432 | if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then | 432 | if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then |
433 | uboot-mkimage \ | 433 | uboot-mkimage \ |
434 | ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \ | 434 | ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \ |
435 | -F -k "${UBOOT_SIGN_KEYDIR}" \ | 435 | -F -k "${UBOOT_SIGN_KEYDIR}" \ |
436 | -K "${DEPLOY_DIR_IMAGE}/${UBOOT_DTB_BINARY}" \ | 436 | -K "${DEPLOY_DIR_IMAGE}/${UBOOT_DTB_BINARY}" \ |
437 | -r arch/${ARCH}/boot/${2} | 437 | -r arch/${ARCH}/boot/${2} |
438 | fi | 438 | fi |
439 | } | 439 | } |
440 | 440 | ||
441 | do_assemble_fitimage() { | 441 | do_assemble_fitimage() { |
442 | if echo ${KERNEL_IMAGETYPES} | grep -wq "itbImage"; then | 442 | if echo ${KERNEL_IMAGETYPES} | grep -wq "itbImage"; then |
443 | cd ${B} | 443 | cd ${B} |
444 | fitimage_assemble itb-image.its itbImage | 444 | fitimage_assemble itb-image.its itbImage |
445 | fi | 445 | fi |
446 | } | 446 | } |
447 | 447 | ||
448 | addtask assemble_fitimage before do_install after do_compile | 448 | addtask assemble_fitimage before do_install after do_compile |
449 | 449 | ||
450 | do_assemble_fitimage_initramfs() { | 450 | do_assemble_fitimage_initramfs() { |
451 | if echo ${KERNEL_IMAGETYPES} | grep -wq "itbImage" && \ | 451 | if echo ${KERNEL_IMAGETYPES} | grep -wq "itbImage" && \ |
452 | test -n "${INITRAMFS_IMAGE}" ; then | 452 | test -n "${INITRAMFS_IMAGE}" ; then |
453 | cd ${B} | 453 | cd ${B} |
454 | fitimage_assemble itb-image-${INITRAMFS_IMAGE}.its itbImage-${INITRAMFS_IMAGE} 1 | 454 | fitimage_assemble itb-image-${INITRAMFS_IMAGE}.its itbImage-${INITRAMFS_IMAGE} 1 |
455 | fi | 455 | fi |
456 | } | 456 | } |
457 | 457 | ||
458 | addtask assemble_fitimage_initramfs before do_deploy after do_install | 458 | addtask assemble_fitimage_initramfs before do_deploy after do_install |
@@ -460,34 +460,34 @@ addtask assemble_fitimage_initramfs before do_deploy after do_install | |||
460 | 460 | ||
461 | kernel_do_deploy[vardepsexclude] = "DATETIME" | 461 | kernel_do_deploy[vardepsexclude] = "DATETIME" |
462 | kernel_do_deploy_append() { | 462 | kernel_do_deploy_append() { |
463 | # Update deploy directory | 463 | # Update deploy directory |
464 | if echo ${KERNEL_IMAGETYPES} | grep -wq "itbImage"; then | 464 | if echo ${KERNEL_IMAGETYPES} | grep -wq "itbImage"; then |
465 | cd ${B} | 465 | cd ${B} |
466 | echo "Copying fit-image.its source file..." | 466 | echo "Copying fit-image.its source file..." |
467 | its_base_name="itbImage-its-${PV}-${PR}-${MACHINE}-${DATETIME}" | 467 | its_base_name="itbImage-its-${PV}-${PR}-${MACHINE}-${DATETIME}" |
468 | its_symlink_name=itbImage-its-${MACHINE} | 468 | its_symlink_name=itbImage-its-${MACHINE} |
469 | install -m 0644 itb-image.its ${DEPLOYDIR}/${its_base_name}.its | 469 | install -m 0644 itb-image.its ${DEPLOYDIR}/${its_base_name}.its |
470 | linux_bin_base_name="itbImage-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}" | 470 | linux_bin_base_name="itbImage-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}" |
471 | linux_bin_symlink_name=itbImage-linux.bin-${MACHINE} | 471 | linux_bin_symlink_name=itbImage-linux.bin-${MACHINE} |
472 | install -m 0644 linux.bin ${DEPLOYDIR}/${linux_bin_base_name}.bin | 472 | install -m 0644 linux.bin ${DEPLOYDIR}/${linux_bin_base_name}.bin |
473 | 473 | ||
474 | if [ -n "${INITRAMFS_IMAGE}" ]; then | 474 | if [ -n "${INITRAMFS_IMAGE}" ]; then |
475 | echo "Copying fit-image-${INITRAMFS_IMAGE}.its source file..." | 475 | echo "Copying fit-image-${INITRAMFS_IMAGE}.its source file..." |
476 | its_initramfs_base_name="itbImage-its-${INITRAMFS_IMAGE_NAME}-${PV}-${PR}-${DATETIME}" | 476 | its_initramfs_base_name="itbImage-its-${INITRAMFS_IMAGE_NAME}-${PV}-${PR}-${DATETIME}" |
477 | its_initramfs_symlink_name=itbImage-its-${INITRAMFS_IMAGE_NAME} | 477 | its_initramfs_symlink_name=itbImage-its-${INITRAMFS_IMAGE_NAME} |
478 | install -m 0644 itb-image-${INITRAMFS_IMAGE}.its ${DEPLOYDIR}/${its_initramfs_base_name}.its | 478 | install -m 0644 itb-image-${INITRAMFS_IMAGE}.its ${DEPLOYDIR}/${its_initramfs_base_name}.its |
479 | fit_initramfs_base_name="itbImage-${INITRAMFS_IMAGE_NAME}-${PV}-${PR}-${DATETIME}" | 479 | fit_initramfs_base_name="itbImage-${INITRAMFS_IMAGE_NAME}-${PV}-${PR}-${DATETIME}" |
480 | fit_initramfs_symlink_name=itbImage-${INITRAMFS_IMAGE_NAME} | 480 | fit_initramfs_symlink_name=itbImage-${INITRAMFS_IMAGE_NAME} |
481 | install -m 0644 arch/${ARCH}/boot/itbImage-${INITRAMFS_IMAGE} ${DEPLOYDIR}/${fit_initramfs_base_name}.bin | 481 | install -m 0644 arch/${ARCH}/boot/itbImage-${INITRAMFS_IMAGE} ${DEPLOYDIR}/${fit_initramfs_base_name}.bin |
482 | fi | 482 | fi |
483 | 483 | ||
484 | cd ${DEPLOYDIR} | 484 | cd ${DEPLOYDIR} |
485 | ln -sf ${its_base_name}.its ${its_symlink_name}.its | 485 | ln -sf ${its_base_name}.its ${its_symlink_name}.its |
486 | ln -sf ${linux_bin_base_name}.bin ${linux_bin_symlink_name}.bin | 486 | ln -sf ${linux_bin_base_name}.bin ${linux_bin_symlink_name}.bin |
487 | 487 | ||
488 | if [ -n "${INITRAMFS_IMAGE}" ]; then | 488 | if [ -n "${INITRAMFS_IMAGE}" ]; then |
489 | ln -sf ${its_initramfs_base_name}.its ${its_initramfs_symlink_name}.its | 489 | ln -sf ${its_initramfs_base_name}.its ${its_initramfs_symlink_name}.its |
490 | ln -sf ${fit_initramfs_base_name}.bin ${fit_initramfs_symlink_name}.bin | 490 | ln -sf ${fit_initramfs_base_name}.bin ${fit_initramfs_symlink_name}.bin |
491 | fi | 491 | fi |
492 | fi | 492 | fi |
493 | } | 493 | } |