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