Blame view
MAKEALL
15.7 KB
f2352877c
|
1 |
#!/bin/bash |
7ebf7443a
|
2 |
|
0777eafb3
|
3 4 5 6 7 8 9 10 11 12 13 |
# Tool mainly for U-Boot Quality Assurance: build one or more board # configurations with minimal verbosity, showing only warnings and # errors. # # There are several ways to select which boards to build. # # Traditionally, architecture names (like "powerpc"), CPU family names # (like "mpc83xx") or board names can be specified on the command # line; without any arguments, MAKEALL defaults to building all Power # Architecture systems (i. e. same as for "MAKEALL powerpc"). # |
cd57b0bb8
|
14 |
# With the introduction of the board.cfg file, it has become possible |
0777eafb3
|
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# to provide additional selections. We use standard command line # options for this: # # -a or --arch : Select architecture # -c or --cpu : Select CPU family # -s or --soc : Select SoC type # -v or --vendor: Select board vendor # # Selections by these options are logically ANDed; if the same option # is used repeatedly, such selections are ORed. So "-v FOO -v BAR" # will select all configurations where the vendor is either FOO or # BAR. Any additional arguments specified on the command line are # always build additionally. # # Examples: # # - build all Power Architecture boards: # # MAKEALL -a powerpc # or # MAKEALL --arch powerpc # or # MAKEALL powerpc # # - build all PowerPC boards manufactured by vendor "esd": # # MAKEALL -a powerpc -v esd # # - build all PowerPC boards manufactured either by "keymile" or # "siemens": # # MAKEALL -a powerpc -v keymile -v siemens # # - build all Freescale boards with MPC83xx CPUs, plus all 4xx boards: # # MAKEALL -c mpc83xx -v freescale 4xx # ######################################################################### SHORT_OPTS="a:c:v:s:" LONG_OPTS="arch:,cpu:,vendor:,soc:" # Option processing based on util-linux-2.13/getopt-parse.bash |
071bc9233
|
58 |
# Note that we use `"$@"' to let each command-line parameter expand to a |
0777eafb3
|
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# separate word. The quotes around `$@' are essential! # We need TEMP as the `eval set --' would nuke the return value of # getopt. TEMP=`getopt -o ${SHORT_OPTS} --long ${LONG_OPTS} \ -n 'MAKEALL' -- "$@"` if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi # Note the quotes around `$TEMP': they are essential! eval set -- "$TEMP" SELECTED='' while true ; do case "$1" in -a|--arch) # echo "Option ARCH: argument \`$2'" if [ "$opt_a" ] ; then opt_a="${opt_a%)} || \$2 == \"$2\")" else opt_a="(\$2 == \"$2\")" fi SELECTED='y' shift 2 ;; -c|--cpu) # echo "Option CPU: argument \`$2'" if [ "$opt_c" ] ; then opt_c="${opt_c%)} || \$3 == \"$2\")" else opt_c="(\$3 == \"$2\")" fi SELECTED='y' shift 2 ;; -s|--soc) # echo "Option SoC: argument \`$2'" if [ "$opt_s" ] ; then opt_s="${opt_s%)} || \$6 == \"$2\")" else opt_s="(\$6 == \"$2\")" fi SELECTED='y' shift 2 ;; -v|--vendor) # echo "Option VENDOR: argument \`$2'" if [ "$opt_v" ] ; then opt_v="${opt_v%)} || \$5 == \"$2\")" else opt_v="(\$5 == \"$2\")" fi SELECTED='y' shift 2 ;; --) shift ; break ;; *) echo "Internal error!" >&2 ; exit 1 ;; esac done # echo "Remaining arguments:" # for arg do echo '--> '"\`$arg'" ; done FILTER="\$1 !~ /^#/" [ "$opt_a" ] && FILTER="${FILTER} && $opt_a" [ "$opt_c" ] && FILTER="${FILTER} && $opt_c" [ "$opt_s" ] && FILTER="${FILTER} && $opt_s" [ "$opt_v" ] && FILTER="${FILTER} && $opt_v" if [ "$SELECTED" ] ; then SELECTED=$(awk '('"$FILTER"') { print $1 }' boards.cfg) |
cd57b0bb8
|
127 128 129 130 131 132 |
# Make sure some boards from boards.cfg are actually found if [ -z "$SELECTED" ] ; then echo "Error: No boards selected, invalid arguments" exit 1 fi |
0777eafb3
|
133 134 135 |
fi ######################################################################### |
40a28f088
|
136 137 138 |
# Print statistics when we exit trap exit 1 2 3 15 trap print_stats 0 |
7fa6a2f3b
|
139 140 141 142 143 |
# Determine number of CPU cores if no default was set : ${BUILD_NCPUS:="`getconf _NPROCESSORS_ONLN`"} if [ "$BUILD_NCPUS" -gt 1 ] then |
55f786d8b
|
144 |
JOBS="-j $((BUILD_NCPUS + 1))" |
7fa6a2f3b
|
145 146 147 |
else JOBS="" fi |
a8c7c708a
|
148 |
|
7ebf7443a
|
149 150 151 152 153 |
if [ "${CROSS_COMPILE}" ] ; then MAKE="make CROSS_COMPILE=${CROSS_COMPILE}" else MAKE=make fi |
f93286397
|
154 155 156 157 158 |
if [ "${MAKEALL_LOGDIR}" ] ; then LOG_DIR=${MAKEALL_LOGDIR} else LOG_DIR="LOG" fi |
887e2ec9e
|
159 |
|
f93286397
|
160 161 162 |
if [ ! "${BUILD_DIR}" ] ; then BUILD_DIR="." fi |
4f0645eb7
|
163 |
[ -d ${LOG_DIR} ] || mkdir ${LOG_DIR} || exit 1 |
7ebf7443a
|
164 165 |
LIST="" |
40a28f088
|
166 167 168 169 |
# Keep track of the number of builds and errors ERR_CNT=0 ERR_LIST="" TOTAL_CNT=0 |
f2352877c
|
170 |
RC=0 |
40a28f088
|
171 |
|
9ec49f8f8
|
172 173 174 175 176 177 178 179 180 181 182 |
# Helper funcs for parsing boards.cfg boards_by_field() { awk \ -v field="$1" \ -v select="$2" \ '($1 !~ /^#/ && $field == select) { print $1 }' \ boards.cfg } boards_by_arch() { boards_by_field 2 "$@" ; } boards_by_cpu() { boards_by_field 3 "$@" ; } |
0a41edaab
|
183 |
boards_by_soc() { boards_by_field 6 "$@" ; } |
9ec49f8f8
|
184 |
|
7ebf7443a
|
185 |
######################################################################### |
0db5bca80
|
186 187 |
## MPC5xx Systems ######################################################################### |
9ec49f8f8
|
188 |
LIST_5xx="$(boards_by_cpu mpc5xx)" |
0db5bca80
|
189 190 |
######################################################################### |
945af8d72
|
191 192 |
## MPC5xxx Systems ######################################################################### |
2ae182419
|
193 |
LIST_5xxx="$(boards_by_cpu mpc5xxx)" |
945af8d72
|
194 195 |
######################################################################### |
8993e54b6
|
196 197 |
## MPC512x Systems ######################################################################### |
2ae182419
|
198 |
LIST_512x="$(boards_by_cpu mpc512x)" |
945af8d72
|
199 200 |
######################################################################### |
7ebf7443a
|
201 202 |
## MPC8xx Systems ######################################################################### |
9ec49f8f8
|
203 |
|
2ae182419
|
204 |
LIST_8xx="$(boards_by_cpu mpc8xx)" |
7ebf7443a
|
205 206 207 208 |
######################################################################### ## PPC4xx Systems ######################################################################### |
2ae182419
|
209 |
LIST_4xx="$(boards_by_cpu ppc4xx)" |
7ebf7443a
|
210 211 |
######################################################################### |
983fda839
|
212 213 |
## MPC8220 Systems ######################################################################### |
9ec49f8f8
|
214 |
LIST_8220="$(boards_by_cpu mpc8220)" |
983fda839
|
215 216 |
######################################################################### |
7ebf7443a
|
217 218 |
## MPC824x Systems ######################################################################### |
2ae182419
|
219 |
LIST_824x="$(boards_by_cpu mpc824x)" |
592c5cabe
|
220 |
|
7ebf7443a
|
221 |
######################################################################### |
7aa786147
|
222 |
## MPC8260 Systems (includes 8250, 8255 etc.) |
7ebf7443a
|
223 |
######################################################################### |
2ae182419
|
224 |
LIST_8260="$(boards_by_cpu mpc8260)" |
7ebf7443a
|
225 226 |
######################################################################### |
f046ccd15
|
227 228 |
## MPC83xx Systems (includes 8349, etc.) ######################################################################### |
2ae182419
|
229 |
LIST_83xx="$(boards_by_cpu mpc83xx)" |
f046ccd15
|
230 231 |
######################################################################### |
42d1f0394
|
232 233 |
## MPC85xx Systems (includes 8540, 8560 etc.) ######################################################################### |
2ae182419
|
234 |
LIST_85xx="$(boards_by_cpu mpc85xx)" |
42d1f0394
|
235 236 |
######################################################################### |
822d55365
|
237 238 |
## MPC86xx Systems ######################################################################### |
2ae182419
|
239 |
LIST_86xx="$(boards_by_cpu mpc86xx)" |
822d55365
|
240 241 |
######################################################################### |
7ebf7443a
|
242 243 |
## 74xx/7xx Systems ######################################################################### |
2ae182419
|
244 |
LIST_74xx_7xx="$(boards_by_cpu 74xx_7xx)" |
7ebf7443a
|
245 |
|
d9a42c0ac
|
246 247 248 249 250 251 252 253 254 |
######################################################################### ## PowerPC groups ######################################################################### LIST_TSEC=" \ ${LIST_83xx} \ ${LIST_85xx} \ ${LIST_86xx} \ " |
a47a12bec
|
255 |
LIST_powerpc=" \ |
fb56579ff
|
256 |
${LIST_5xx} \ |
3deca9d44
|
257 |
${LIST_512x} \ |
fb56579ff
|
258 259 260 261 262 263 264 265 266 |
${LIST_5xxx} \ ${LIST_8xx} \ ${LIST_8220} \ ${LIST_824x} \ ${LIST_8260} \ ${LIST_83xx} \ ${LIST_85xx} \ ${LIST_86xx} \ ${LIST_4xx} \ |
2ae182419
|
267 |
${LIST_74xx_7xx}\ |
fb56579ff
|
268 |
" |
7ebf7443a
|
269 |
|
a47a12bec
|
270 271 272 273 274 |
# Alias "ppc" -> "powerpc" to not break compatibility with older scripts # still using "ppc" instead of "powerpc" LIST_ppc=" \ ${LIST_powerpc} \ " |
7ebf7443a
|
275 276 277 |
######################################################################### ## StrongARM Systems ######################################################################### |
9ec49f8f8
|
278 |
LIST_SA="$(boards_by_cpu sa1100)" |
7ebf7443a
|
279 280 281 282 |
######################################################################### ## ARM7 Systems ######################################################################### |
fb56579ff
|
283 284 285 286 287 288 289 290 291 292 293 294 |
LIST_ARM7=" \ ap7 \ ap720t \ armadillo \ B2 \ ep7312 \ evb4510 \ impa7 \ integratorap \ lpc2292sodimm \ modnet50 \ SMN42 \ |
74f4304ee
|
295 |
" |
7ebf7443a
|
296 297 298 299 |
######################################################################### ## ARM9 Systems ######################################################################### |
fb56579ff
|
300 |
LIST_ARM9=" \ |
43a5f0df2
|
301 |
a320evb \ |
fb56579ff
|
302 303 304 305 306 |
ap920t \ ap922_XA10 \ ap926ejs \ ap946es \ ap966 \ |
c291e2fc4
|
307 |
aspenite \ |
fb56579ff
|
308 309 310 311 312 |
cp920t \ cp922_XA10 \ cp926ejs \ cp946es \ cp966 \ |
2819e1365
|
313 |
da830evm \ |
89b765c7f
|
314 |
da850evm \ |
cf3c142ee
|
315 316 317 318 319 320 321 322 |
edb9301 \ edb9302 \ edb9302a \ edb9307 \ edb9307a \ edb9312 \ edb9315 \ edb9315a \ |
ce9c227cc
|
323 |
edminiv2 \ |
16b76705d
|
324 |
guruplug \ |
10bc241df
|
325 |
imx27lite \ |
18a056a18
|
326 |
jadecpu \ |
fb56579ff
|
327 |
lpd7a400 \ |
bbe310922
|
328 |
magnesium \ |
4abc5bffe
|
329 |
mv88f6281gtw_ge \ |
fb56579ff
|
330 331 332 |
mx1ads \ mx1fs2 \ netstar \ |
ceb70b466
|
333 334 |
nhk8815 \ nhk8815_onenand \ |
fb56579ff
|
335 336 337 |
omap1510inn \ omap1610h2 \ omap1610inn \ |
a3543d6dc
|
338 |
omap5912osk \ |
fb56579ff
|
339 |
omap730p2 \ |
e92daeb5c
|
340 |
openrd_base \ |
fbc8365ad
|
341 |
rd6281a \ |
fb56579ff
|
342 343 |
sbc2410x \ scb9328 \ |
55dd4ba54
|
344 |
sheevaplug \ |
fb56579ff
|
345 346 |
smdk2400 \ smdk2410 \ |
7e074158c
|
347 |
spear300 \ |
080cfee71
|
348 |
spear310 \ |
7da692360
|
349 |
spear320 \ |
566c9c16f
|
350 |
spear600 \ |
67fa8c25f
|
351 |
suen3 \ |
fb56579ff
|
352 353 354 355 356 357 358 359 |
trab \ VCMA9 \ versatile \ versatileab \ versatilepb \ voiceblue \ davinci_dvevm \ davinci_schmoogie \ |
c7f879ec2
|
360 |
davinci_sffsdr \ |
fb56579ff
|
361 |
davinci_sonata \ |
28b00324b
|
362 |
davinci_dm355evm \ |
5df65cf56
|
363 |
davinci_dm355leopard \ |
3fca29294
|
364 |
davinci_dm365evm \ |
6ab176d70
|
365 |
davinci_dm6467evm \ |
6f21347d4
|
366 |
" |
7ebf7443a
|
367 368 |
######################################################################### |
74f4304ee
|
369 370 |
## ARM10 Systems ######################################################################### |
fb56579ff
|
371 372 373 |
LIST_ARM10=" \ integratorcp \ cp1026 \ |
74f4304ee
|
374 375 376 |
" ######################################################################### |
8ed960461
|
377 378 |
## ARM11 Systems ######################################################################### |
0c6926736
|
379 380 381 382 383 384 385 386 |
LIST_ARM11=" \ cp1136 \ omap2420h4 \ apollon \ imx31_litekit \ imx31_phycore \ imx31_phycore_eet \ mx31ads \ |
8449f287f
|
387 |
mx31pdk \ |
d08e5ca30
|
388 |
mx31pdk_nand \ |
0c6926736
|
389 390 |
qong \ smdk6400 \ |
5cc48f7e5
|
391 |
tnetv107x_evm \ |
74f4304ee
|
392 |
" |
8ed960461
|
393 394 |
######################################################################### |
f56348af5
|
395 |
## ARMV7 Systems |
f904cdbb6
|
396 |
######################################################################### |
f56348af5
|
397 |
LIST_ARMV7=" \ |
ed01e45cf
|
398 |
am3517_evm \ |
b80e41ac5
|
399 |
ca9x4_ct_vxp \ |
c35d7cf07
|
400 |
devkit8000 \ |
8a3f6bb6f
|
401 |
igep0020 \ |
1a832dc4f
|
402 |
igep0030 \ |
c5fb70c91
|
403 |
mx51evk \ |
f904cdbb6
|
404 |
omap3_beagle \ |
9d0fc8110
|
405 |
omap3_overo \ |
ad9bc8e52
|
406 |
omap3_evm \ |
2be2c6cc6
|
407 |
omap3_pandora \ |
e63e5904b
|
408 |
omap3_sdp3430 \ |
7379f45a7
|
409 |
omap3_zoom1 \ |
376aee78d
|
410 |
omap3_zoom2 \ |
c57cca255
|
411 |
omap4_panda \ |
3e76d62a6
|
412 |
omap4_sdp4430 \ |
c474a8ebb
|
413 |
s5p_goni \ |
8bc4ee9e8
|
414 |
smdkc100 \ |
f904cdbb6
|
415 416 417 |
" ######################################################################### |
602cac138
|
418 419 |
## AT91 Systems ######################################################################### |
0a41edaab
|
420 421 |
LIST_at91="$(boards_by_soc at91)\ $(boards_by_soc at91rm9200)\ |
22ee64738
|
422 423 424 |
at91sam9260ek \ at91sam9261ek \ at91sam9263ek \ |
d8380c9d3
|
425 |
at91sam9g10ek \ |
22ee64738
|
426 |
at91sam9g20ek \ |
5ccc2d99d
|
427 |
at91sam9m10g45ek \ |
22ee64738
|
428 |
at91sam9rlek \ |
d8380c9d3
|
429 |
CPUAT91 \ |
23b80982a
|
430 431 |
CPU9260 \ CPU9G20 \ |
b5d289fc2
|
432 |
pm9g45 \ |
2dc851e3b
|
433 434 435 |
SBC35_A9G20 \ TNY_A9260 \ TNY_A9G20 \ |
602cac138
|
436 437 438 |
" ######################################################################### |
7ebf7443a
|
439 440 |
## Xscale Systems ######################################################################### |
7c957c0e7
|
441 |
LIST_pxa="$(boards_by_cpu pxa)" |
7ebf7443a
|
442 |
|
9ec49f8f8
|
443 |
LIST_ixp="$(boards_by_cpu ixp) |
fb56579ff
|
444 445 446 |
pdnb3 \ scpu \ " |
7ebf7443a
|
447 |
|
d9a42c0ac
|
448 449 450 |
######################################################################### ## ARM groups ######################################################################### |
2d5b561e2
|
451 |
|
f904cdbb6
|
452 453 454 455 456 457 |
LIST_arm=" \ ${LIST_SA} \ ${LIST_ARM7} \ ${LIST_ARM9} \ ${LIST_ARM10} \ ${LIST_ARM11} \ |
f56348af5
|
458 |
${LIST_ARMV7} \ |
f904cdbb6
|
459 460 461 |
${LIST_at91} \ ${LIST_pxa} \ ${LIST_ixp} \ |
8ed960461
|
462 |
" |
7ebf7443a
|
463 |
|
c021880ac
|
464 |
######################################################################### |
b62bdffb7
|
465 |
## MIPS Systems (default = big endian) |
c021880ac
|
466 |
######################################################################### |
fb56579ff
|
467 468 |
LIST_mips4kc=" \ incaip \ |
0764c164f
|
469 |
qemu_mips \ |
2a61eff6a
|
470 471 472 473 474 475 476 477 478 479 480 481 |
vct_platinum \ vct_platinum_small \ vct_platinum_onenand \ vct_platinum_onenand_small \ vct_platinumavc \ vct_platinumavc_small \ vct_platinumavc_onenand \ vct_platinumavc_onenand_small \ vct_premium \ vct_premium_small \ vct_premium_onenand \ vct_premium_onenand_small \ |
fb56579ff
|
482 |
" |
c021880ac
|
483 |
|
fb56579ff
|
484 485 486 |
LIST_mips5kc=" \ purple \ " |
3e38691e8
|
487 |
|
fb56579ff
|
488 489 490 491 492 493 494 495 |
LIST_au1xx0=" \ dbau1000 \ dbau1100 \ dbau1500 \ dbau1550 \ dbau1550_el \ gth2 \ " |
5da627a42
|
496 |
|
fb56579ff
|
497 498 499 500 501 |
LIST_mips=" \ ${LIST_mips4kc} \ ${LIST_mips5kc} \ ${LIST_au1xx0} \ " |
c021880ac
|
502 |
|
7a8e9bed1
|
503 |
######################################################################### |
b62bdffb7
|
504 505 506 507 508 509 |
## MIPS Systems (little endian) ######################################################################### LIST_mips4kc_el="" LIST_mips5kc_el="" |
fb56579ff
|
510 511 |
LIST_au1xx0_el=" \ dbau1550_el \ |
b09258c53
|
512 |
pb1000 \ |
fb56579ff
|
513 |
" |
b62bdffb7
|
514 |
|
fb56579ff
|
515 516 517 518 519 |
LIST_mips_el=" \ ${LIST_mips4kc_el} \ ${LIST_mips5kc_el} \ ${LIST_au1xx0_el} \ " |
b62bdffb7
|
520 521 |
######################################################################### |
7a8e9bed1
|
522 523 |
## i386 Systems ######################################################################### |
6d79c3995
|
524 |
LIST_x86="$(boards_by_arch i386)" |
7a8e9bed1
|
525 |
|
c935d3bd8
|
526 |
######################################################################### |
5c952cf02
|
527 528 |
## Nios-II Systems ######################################################################### |
9ec49f8f8
|
529 |
LIST_nios2="$(boards_by_arch nios2) |
8cbb0ddd7
|
530 |
nios2-generic \ |
4176c7996
|
531 |
" |
5c952cf02
|
532 533 |
######################################################################### |
857cad37a
|
534 535 |
## MicroBlaze Systems ######################################################################### |
9ec49f8f8
|
536 |
LIST_microblaze="$(boards_by_arch microblaze)" |
857cad37a
|
537 |
|
f8c3b4f31
|
538 539 540 |
######################################################################### ## ColdFire Systems ######################################################################### |
9ec49f8f8
|
541 |
LIST_coldfire="$(boards_by_arch m68k) |
9d79e5758
|
542 |
astro_mcf5373l \ |
fb56579ff
|
543 544 545 |
cobra5272 \ EB+MCF-EV123 \ EB+MCF-EV123_internal \ |
1552af70e
|
546 |
M52277EVB \ |
4a442d318
|
547 |
M5235EVB \ |
aa5f1f9dc
|
548 549 |
M5329AFEE \ M5373EVB \ |
05316f8ec
|
550 |
M54451EVB \ |
8ae158cd8
|
551 |
M54455EVB \ |
57a127201
|
552 553 |
M5475AFE \ M5485AFE \ |
9acb626fc
|
554 |
" |
f8c3b4f31
|
555 |
|
6ccec4492
|
556 557 558 |
######################################################################### ## AVR32 Systems ######################################################################### |
9ec49f8f8
|
559 |
LIST_avr32="$(boards_by_arch avr32)" |
6ccec4492
|
560 |
|
ef26a08fe
|
561 562 563 |
######################################################################### ## Blackfin Systems ######################################################################### |
36cf8cb45
|
564 |
LIST_blackfin="$(boards_by_arch blackfin)" |
ef26a08fe
|
565 |
|
c71443734
|
566 567 568 |
######################################################################### ## SH Systems ######################################################################### |
e0f0e527f
|
569 |
LIST_sh2="$(boards_by_cpu sh2)" |
3771c69d7
|
570 |
LIST_sh3="$(boards_by_cpu sh3)" |
03626be3f
|
571 |
LIST_sh4="$(boards_by_cpu sh4)" |
d9a42c0ac
|
572 |
|
03626be3f
|
573 |
LIST_sh="$(boards_by_arch sh)" |
c71443734
|
574 |
|
c2f02da21
|
575 576 577 |
######################################################################### ## SPARC Systems ######################################################################### |
9ec49f8f8
|
578 |
LIST_sparc="$(boards_by_arch sparc)" |
7ebf7443a
|
579 580 581 582 583 584 585 |
#----------------------------------------------------------------------- build_target() { target=$1 ${MAKE} distclean >/dev/null |
d70d8ccc2
|
586 |
${MAKE} -s ${target}_config |
f93286397
|
587 588 589 |
${MAKE} ${JOBS} all 2>&1 >${LOG_DIR}/$target.MAKELOG \ | tee ${LOG_DIR}/$target.ERR |
f2352877c
|
590 591 592 593 594 |
# Check for 'make' errors if [ ${PIPESTATUS[0]} -ne 0 ] ; then RC=1 fi |
40a28f088
|
595 596 597 598 599 600 601 602 |
if [ -s ${LOG_DIR}/$target.ERR ] ; then ERR_CNT=$((ERR_CNT + 1)) ERR_LIST="${ERR_LIST} $target" else rm ${LOG_DIR}/$target.ERR fi TOTAL_CNT=$((TOTAL_CNT + 1)) |
f93286397
|
603 |
|
208447f8e
|
604 |
${CROSS_COMPILE}size ${BUILD_DIR}/u-boot \ |
f93286397
|
605 |
| tee -a ${LOG_DIR}/$target.MAKELOG |
7ebf7443a
|
606 |
} |
9ec49f8f8
|
607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 |
build_targets() { for t in "$@" ; do # If a LIST_xxx var exists, use it. But avoid variable # expansion in the eval when a board name contains certain # characters that the shell interprets. case ${t} in *[-+=]*) list= ;; *) list=$(eval echo '${LIST_'$t'}') ;; esac if [ -n "${list}" ] ; then build_targets ${list} else build_target ${t} fi done } |
7ebf7443a
|
623 624 |
#----------------------------------------------------------------------- |
40a28f088
|
625 626 627 628 629 630 631 632 |
print_stats() { echo "" echo "--------------------- SUMMARY ----------------------------" echo "Boards compiled: ${TOTAL_CNT}" if [ ${ERR_CNT} -gt 0 ] ; then echo "Boards with warnings or errors: ${ERR_CNT} (${ERR_LIST} )" fi echo "----------------------------------------------------------" |
f2352877c
|
633 634 |
exit $RC |
40a28f088
|
635 |
} |
7ebf7443a
|
636 |
|
40a28f088
|
637 |
#----------------------------------------------------------------------- |
9ec49f8f8
|
638 |
|
0777eafb3
|
639 640 641 |
# Build target groups selected by options, plus any command line args set -- ${SELECTED} "$@" # run PowerPC by default |
9ec49f8f8
|
642 |
[ $# = 0 ] && set -- powerpc |
9ec49f8f8
|
643 |
build_targets "$@" |