28ba60e5307972873e8f4e6a7547c90c752cca0d
[platform/kernel/u-boot.git] / MAKEALL
1 #!/bin/bash
2
3 # Print statistics when we exit
4 trap exit 1 2 3 15
5 trap print_stats 0
6
7 # Determine number of CPU cores if no default was set
8 : ${BUILD_NCPUS:="`getconf _NPROCESSORS_ONLN`"}
9
10 if [ "$BUILD_NCPUS" -gt 1 ]
11 then
12         JOBS="-j $((BUILD_NCPUS + 1))"
13 else
14         JOBS=""
15 fi
16
17
18 if [ "${CROSS_COMPILE}" ] ; then
19         MAKE="make CROSS_COMPILE=${CROSS_COMPILE}"
20 else
21         MAKE=make
22 fi
23
24 if [ "${MAKEALL_LOGDIR}" ] ; then
25         LOG_DIR=${MAKEALL_LOGDIR}
26 else
27         LOG_DIR="LOG"
28 fi
29
30 if [ ! "${BUILD_DIR}" ] ; then
31         BUILD_DIR="."
32 fi
33
34 [ -d ${LOG_DIR} ] || mkdir ${LOG_DIR} || exit 1
35
36 LIST=""
37
38 # Keep track of the number of builds and errors
39 ERR_CNT=0
40 ERR_LIST=""
41 TOTAL_CNT=0
42 RC=0
43
44 #########################################################################
45 ## MPC5xx Systems
46 #########################################################################
47
48 LIST_5xx="              \
49         cmi_mpc5xx      \
50 "
51
52 #########################################################################
53 ## MPC5xxx Systems
54 #########################################################################
55
56 LIST_5xxx="             \
57         BC3450          \
58         cm5200          \
59         cpci5200        \
60         digsy_mtc       \
61         EVAL5200        \
62         fo300           \
63         galaxy5200      \
64         icecube_5200    \
65         inka4x0         \
66         ipek01          \
67         lite5200b       \
68         mcc200          \
69         mecp5200        \
70         motionpro       \
71         munices         \
72         MVBC_P          \
73         MVSMR           \
74         o2dnt           \
75         pcm030          \
76         pf5200          \
77         PM520           \
78         TB5200          \
79         Total5200       \
80         Total5200_Rev2  \
81         TQM5200         \
82         TQM5200_B       \
83         TQM5200S        \
84         v38b            \
85 "
86
87 #########################################################################
88 ## MPC512x Systems
89 #########################################################################
90
91 LIST_512x="             \
92         aria            \
93         mecp5123        \
94         mpc5121ads      \
95         pdm360ng        \
96 "
97
98 #########################################################################
99 ## MPC8xx Systems
100 #########################################################################
101 LIST_8xx="              \
102         Adder87x        \
103         AdderII         \
104         ADS860          \
105         AMX860          \
106         c2mon           \
107         CCM             \
108         cogent_mpc8xx   \
109         ELPT860         \
110         EP88x           \
111         ESTEEM192E      \
112         ETX094          \
113         FADS823         \
114         FADS850SAR      \
115         FADS860T        \
116         FLAGADM         \
117         FPS850L         \
118         GEN860T         \
119         GEN860T_SC      \
120         GENIETV         \
121         GTH             \
122         hermes          \
123         IAD210          \
124         ICU862_100MHz   \
125         IP860           \
126         IVML24          \
127         IVML24_128      \
128         IVML24_256      \
129         IVMS8           \
130         IVMS8_128       \
131         IVMS8_256       \
132         KUP4K           \
133         KUP4X           \
134         LANTEC          \
135         lwmon           \
136         kmsupx4         \
137         MBX             \
138         MBX860T         \
139         mgsuvd          \
140         MHPC            \
141         MPC86xADS       \
142         MPC885ADS       \
143         NETPHONE        \
144         NETTA           \
145         NETTA2          \
146         NETTA_ISDN      \
147         NETVIA          \
148         NETVIA_V2       \
149         NX823           \
150         pcu_e           \
151         QS823           \
152         QS850           \
153         QS860T          \
154         quantum         \
155         R360MPI         \
156         RBC823          \
157         rmu             \
158         RPXClassic      \
159         RPXlite         \
160         RPXlite_DW      \
161         RRvision        \
162         SM850           \
163         spc1920         \
164         SPD823TS        \
165         svm_sc8xx       \
166         SXNI855T        \
167         TK885D          \
168         TOP860          \
169         TQM823L         \
170         TQM823L_LCD     \
171         TQM850L         \
172         TQM855L         \
173         TQM860L         \
174         TQM885D         \
175         uc100           \
176         v37             \
177 "
178
179 #########################################################################
180 ## PPC4xx Systems
181 #########################################################################
182
183 LIST_4xx="              \
184         acadia          \
185         acadia_nand     \
186         ADCIOP          \
187         alpr            \
188         AP1000          \
189         APC405          \
190         AR405           \
191         arches          \
192         ASH405          \
193         bamboo          \
194         bamboo_nand     \
195         bubinga         \
196         CANBT           \
197         canyonlands     \
198         canyonlands_nand \
199         CMS700          \
200         CPCI2DP         \
201         CPCI405         \
202         CPCI4052        \
203         CPCI405AB       \
204         CPCI405DT       \
205         CPCIISER4       \
206         CRAYL1          \
207         csb272          \
208         csb472          \
209         DASA_SIM        \
210         devconcenter    \
211         dlvision        \
212         DP405           \
213         DU405           \
214         DU440           \
215         ebony           \
216         ERIC            \
217         fx12mm          \
218         G2000           \
219         gdppc440etx     \
220         glacier         \
221         haleakala       \
222         haleakala_nand  \
223         hcu4            \
224         hcu5            \
225         HH405           \
226         HUB405          \
227         icon            \
228         intip           \
229         JSE             \
230         KAREF           \
231         katmai          \
232         kilauea         \
233         kilauea_nand    \
234         korat           \
235         luan            \
236         lwmon5          \
237         makalu          \
238         mcu25           \
239         METROBOX        \
240         MIP405          \
241         MIP405T         \
242         ML2             \
243         ml507           \
244         ml507_flash     \
245         neo             \
246         ocotea          \
247         OCRTC           \
248         ORSG            \
249         p3p440          \
250         PCI405          \
251         pcs440ep        \
252         PIP405          \
253         PLU405          \
254         PMC405          \
255         PMC405DE        \
256         PMC440          \
257         PPChameleonEVB  \
258         quad100hd       \
259         rainier         \
260         redwood         \
261         sbc405          \
262         sc3             \
263         sequoia         \
264         sequoia_nand    \
265         taihu           \
266         taishan         \
267         v5fx30teval     \
268         v5fx30teval_flash \
269         VOH405          \
270         VOM405          \
271         W7OLMC          \
272         W7OLMG          \
273         walnut          \
274         WUH405          \
275         xilinx-ppc440-generic \
276         xilinx-ppc440-generic_flash \
277         XPEDITE1000     \
278         yellowstone     \
279         yosemite        \
280         yucca           \
281         zeus            \
282 "
283
284 #########################################################################
285 ## MPC8220 Systems
286 #########################################################################
287
288 LIST_8220="             \
289         Alaska8220      \
290         Yukon8220       \
291 "
292
293 #########################################################################
294 ## MPC824x Systems
295 #########################################################################
296
297 LIST_824x="             \
298         A3000           \
299         barco           \
300         BMW             \
301         CPC45           \
302         CU824           \
303         debris          \
304         eXalion         \
305         HIDDEN_DRAGON   \
306         IDS8247         \
307         linkstation_HGLAN       \
308         MOUSSE          \
309         MUSENKI         \
310         MVBLUE          \
311         OXC             \
312         PN62            \
313         Sandpoint8240   \
314         Sandpoint8245   \
315         sbc8240         \
316         utx8245         \
317 "
318
319 #########################################################################
320 ## MPC8260 Systems (includes 8250, 8255 etc.)
321 #########################################################################
322
323 LIST_8260="             \
324         atc             \
325         cogent_mpc8260  \
326         CPU86           \
327         CPU87           \
328         ep8248          \
329         ep8260          \
330         ep82xxm         \
331         gw8260          \
332         hymod           \
333         IPHASE4539      \
334         ISPAN           \
335         mgcoge          \
336         MPC8260ADS      \
337         MPC8266ADS      \
338         MPC8272ADS      \
339         PM826           \
340         PM828           \
341         ppmc8260        \
342         Rattler8248     \
343         RPXsuper        \
344         rsdproto        \
345         sacsng          \
346         sbc8260         \
347         SCM             \
348         TQM8260_AC      \
349         TQM8260_AD      \
350         TQM8260_AE      \
351         TQM8272         \
352         ZPC1900         \
353 "
354
355 #########################################################################
356 ## MPC83xx Systems (includes 8349, etc.)
357 #########################################################################
358
359 LIST_83xx="             \
360         caddy2          \
361         kmeter1         \
362         MPC8313ERDB_33  \
363         MPC8313ERDB_NAND_66     \
364         MPC8315ERDB     \
365         MPC8315ERDB_NAND        \
366         MPC8323ERDB     \
367         MPC832XEMDS     \
368         MPC832XEMDS_ATM \
369         MPC8349EMDS     \
370         MPC8349ITX      \
371         MPC8349ITXGP    \
372         MPC8360EMDS     \
373         MPC8360EMDS_ATM \
374         MPC8360ERDK_33  \
375         MPC8360ERDK_66  \
376         MPC837XEMDS     \
377         MPC837XERDB     \
378         MVBLM7          \
379         sbc8349         \
380         SIMPC8313_LP    \
381         TQM834x         \
382         vme8349         \
383 "
384
385
386 #########################################################################
387 ## MPC85xx Systems (includes 8540, 8560 etc.)
388 #########################################################################
389
390 LIST_85xx="             \
391         ATUM8548        \
392         MPC8536DS       \
393         MPC8536DS_NAND  \
394         MPC8536DS_SDCARD        \
395         MPC8536DS_SPIFLASH      \
396         MPC8540ADS      \
397         MPC8540EVAL     \
398         MPC8541CDS      \
399         MPC8544DS       \
400         MPC8548CDS      \
401         MPC8555CDS      \
402         MPC8560ADS      \
403         MPC8568MDS      \
404         MPC8569MDS      \
405         MPC8569MDS_ATM  \
406         MPC8569MDS_NAND \
407         MPC8572DS       \
408         MPC8572DS_36BIT \
409         P2020DS         \
410         P2020DS_36BIT   \
411         P1011RDB        \
412         P1011RDB_NAND   \
413         P1011RDB_SDCARD \
414         P1011RDB_SPIFLASH       \
415         P1020RDB        \
416         P1020RDB_NAND   \
417         P1020RDB_SDCARD \
418         P1020RDB_SPIFLASH       \
419         P2010RDB        \
420         P2010RDB_NAND   \
421         P2010RDB_SDCARD \
422         P2010RDB_SPIFLASH       \
423         P2020RDB        \
424         P2020RDB_NAND   \
425         P2020RDB_SDCARD \
426         P2020RDB_SPIFLASH       \
427         PM854           \
428         PM856           \
429         sbc8540         \
430         sbc8548         \
431         sbc8548_PCI_33  \
432         sbc8548_PCI_66  \
433         sbc8548_PCI_33_PCIE \
434         sbc8548_PCI_66_PCIE \
435         sbc8560         \
436         socrates        \
437         stxgp3          \
438         stxssa          \
439         TQM8540         \
440         TQM8541         \
441         TQM8548         \
442         TQM8548_AG      \
443         TQM8548_BE      \
444         TQM8555         \
445         TQM8560         \
446         XPEDITE5200     \
447         XPEDITE5370     \
448 "
449
450 #########################################################################
451 ## MPC86xx Systems
452 #########################################################################
453
454 LIST_86xx="             \
455         MPC8610HPCD     \
456         MPC8641HPCN     \
457         sbc8641d        \
458         XPEDITE5170     \
459 "
460
461 #########################################################################
462 ## 74xx/7xx Systems
463 #########################################################################
464
465 LIST_74xx="             \
466         DB64360         \
467         DB64460         \
468         EVB64260        \
469         mpc7448hpc2     \
470         P3G4            \
471         p3m7448         \
472         PCIPPC2         \
473         PCIPPC6         \
474         ZUMA            \
475 "
476
477 LIST_7xx="              \
478         BAB7xx          \
479         CPCI750         \
480         ELPPC           \
481         p3m750          \
482         ppmc7xx         \
483 "
484
485 #########################################################################
486 ## PowerPC groups
487 #########################################################################
488
489 LIST_TSEC="             \
490         ${LIST_83xx}    \
491         ${LIST_85xx}    \
492         ${LIST_86xx}    \
493 "
494
495 LIST_powerpc="          \
496         ${LIST_5xx}     \
497         ${LIST_512x}    \
498         ${LIST_5xxx}    \
499         ${LIST_8xx}     \
500         ${LIST_8220}    \
501         ${LIST_824x}    \
502         ${LIST_8260}    \
503         ${LIST_83xx}    \
504         ${LIST_85xx}    \
505         ${LIST_86xx}    \
506         ${LIST_4xx}     \
507         ${LIST_74xx}    \
508         ${LIST_7xx}     \
509 "
510
511 # Alias "ppc" -> "powerpc" to not break compatibility with older scripts
512 # still using "ppc" instead of "powerpc"
513 LIST_ppc="              \
514         ${LIST_powerpc} \
515 "
516
517 #########################################################################
518 ## StrongARM Systems
519 #########################################################################
520
521 LIST_SA="               \
522         assabet         \
523         dnp1110         \
524         gcplus          \
525         lart            \
526         shannon         \
527 "
528
529 #########################################################################
530 ## ARM7 Systems
531 #########################################################################
532
533 LIST_ARM7="             \
534         ap7             \
535         ap720t          \
536         armadillo       \
537         B2              \
538         ep7312          \
539         evb4510         \
540         impa7           \
541         integratorap    \
542         lpc2292sodimm   \
543         modnet50        \
544         SMN42           \
545 "
546
547 #########################################################################
548 ## ARM9 Systems
549 #########################################################################
550
551 LIST_ARM9="                     \
552         a320evb                 \
553         ap920t                  \
554         ap922_XA10              \
555         ap926ejs                \
556         ap946es                 \
557         ap966                   \
558         cp920t                  \
559         cp922_XA10              \
560         cp926ejs                \
561         cp946es                 \
562         cp966                   \
563         da830evm                \
564         edb9301                 \
565         edb9302                 \
566         edb9302a                \
567         edb9307                 \
568         edb9307a                \
569         edb9312                 \
570         edb9315                 \
571         edb9315a                \
572         guruplug                \
573         imx27lite               \
574         lpd7a400                \
575         magnesium               \
576         mv88f6281gtw_ge         \
577         mx1ads                  \
578         mx1fs2                  \
579         netstar                 \
580         nhk8815                 \
581         nhk8815_onenand         \
582         omap1510inn             \
583         omap1610h2              \
584         omap1610inn             \
585         omap5912osk             \
586         omap730p2               \
587         openrd_base             \
588         rd6281a                 \
589         sbc2410x                \
590         scb9328                 \
591         sheevaplug              \
592         smdk2400                \
593         smdk2410                \
594         spear300                \
595         spear310                \
596         spear320                \
597         spear600                \
598         suen3                   \
599         trab                    \
600         VCMA9                   \
601         versatile               \
602         versatileab             \
603         versatilepb             \
604         voiceblue               \
605         davinci_dvevm           \
606         davinci_schmoogie       \
607         davinci_sffsdr          \
608         davinci_sonata          \
609         davinci_dm355evm        \
610         davinci_dm355leopard    \
611         davinci_dm365evm        \
612         davinci_dm6467evm       \
613 "
614
615 #########################################################################
616 ## ARM10 Systems
617 #########################################################################
618 LIST_ARM10="            \
619         integratorcp    \
620         cp1026          \
621 "
622
623 #########################################################################
624 ## ARM11 Systems
625 #########################################################################
626 LIST_ARM11="                    \
627         cp1136                  \
628         omap2420h4              \
629         apollon                 \
630         imx31_litekit           \
631         imx31_phycore           \
632         imx31_phycore_eet       \
633         mx31ads                 \
634         mx31pdk                 \
635         mx31pdk_nand            \
636         qong                    \
637         smdk6400                \
638         tnetv107x_evm           \
639 "
640
641 #########################################################################
642 ## ARM Cortex-A8 Systems
643 #########################################################################
644 LIST_ARM_CORTEX_A8="            \
645         devkit8000              \
646         mx51evk                 \
647         omap3_beagle            \
648         omap3_overo             \
649         omap3_evm               \
650         omap3_pandora           \
651         omap3_sdp3430           \
652         omap3_zoom1             \
653         omap3_zoom2             \
654         smdkc100                \
655 "
656
657 #########################################################################
658 ## AT91 Systems
659 #########################################################################
660
661 LIST_at91="                     \
662         afeb9260                \
663         at91cap9adk             \
664         at91rm9200dk            \
665         at91rm9200ek            \
666         at91sam9260ek           \
667         at91sam9261ek           \
668         at91sam9263ek           \
669         at91sam9g10ek           \
670         at91sam9g20ek           \
671         at91sam9m10g45ek        \
672         at91sam9rlek            \
673         cmc_pu2                 \
674         CPUAT91                 \
675         CPU9260                 \
676         CPU9G20                 \
677         csb637                  \
678         eb_cpux9k2              \
679         kb9202                  \
680         meesc                   \
681         mp2usb                  \
682         m501sk                  \
683         otc570                  \
684         pm9261                  \
685         pm9263                  \
686         pm9g45                  \
687         SBC35_A9G20             \
688         TNY_A9260               \
689         TNY_A9G20               \
690 "
691
692 #########################################################################
693 ## Xscale Systems
694 #########################################################################
695
696 LIST_pxa="              \
697         cerf250         \
698         cradle          \
699         csb226          \
700         delta           \
701         innokom         \
702         lubbock         \
703         pleb2           \
704         polaris         \
705         pxa255_idp      \
706         trizepsiv       \
707         wepep250        \
708         xaeniax         \
709         xm250           \
710         xsengine        \
711         zylonite        \
712 "
713
714 LIST_ixp="              \
715         actux1          \
716         actux2          \
717         actux3          \
718         actux4          \
719         ixdp425         \
720         ixdpg425        \
721         pdnb3           \
722         scpu            \
723 "
724
725 #########################################################################
726 ## ARM groups
727 #########################################################################
728
729 LIST_arm="                      \
730         ${LIST_SA}              \
731         ${LIST_ARM7}            \
732         ${LIST_ARM9}            \
733         ${LIST_ARM10}           \
734         ${LIST_ARM11}           \
735         ${LIST_ARM_CORTEX_A8}   \
736         ${LIST_at91}            \
737         ${LIST_pxa}             \
738         ${LIST_ixp}             \
739 "
740
741 #########################################################################
742 ## MIPS Systems         (default = big endian)
743 #########################################################################
744
745 LIST_mips4kc="          \
746         incaip          \
747         qemu_mips       \
748         vct_platinum    \
749         vct_platinum_small      \
750         vct_platinum_onenand    \
751         vct_platinum_onenand_small      \
752         vct_platinumavc \
753         vct_platinumavc_small   \
754         vct_platinumavc_onenand \
755         vct_platinumavc_onenand_small   \
756         vct_premium     \
757         vct_premium_small       \
758         vct_premium_onenand     \
759         vct_premium_onenand_small       \
760 "
761
762 LIST_mips5kc="          \
763         purple          \
764 "
765
766 LIST_au1xx0="           \
767         dbau1000        \
768         dbau1100        \
769         dbau1500        \
770         dbau1550        \
771         dbau1550_el     \
772         gth2            \
773 "
774
775 LIST_mips="             \
776         ${LIST_mips4kc} \
777         ${LIST_mips5kc} \
778         ${LIST_au1xx0}  \
779 "
780
781 #########################################################################
782 ## MIPS Systems         (little endian)
783 #########################################################################
784
785 LIST_mips4kc_el=""
786
787 LIST_mips5kc_el=""
788
789 LIST_au1xx0_el="        \
790         dbau1550_el     \
791         pb1000          \
792 "
793
794 LIST_mips_el="                  \
795         ${LIST_mips4kc_el}      \
796         ${LIST_mips5kc_el}      \
797         ${LIST_au1xx0_el}       \
798 "
799
800 #########################################################################
801 ## i386 Systems
802 #########################################################################
803
804 LIST_I486="             \
805         sc520_cdp       \
806         sc520_eNET      \
807         sc520_spunk     \
808         sc520_spunk_rel \
809 "
810
811 LIST_x86="              \
812         ${LIST_I486}    \
813 "
814
815 #########################################################################
816 ## NIOS Systems
817 #########################################################################
818
819 LIST_nios="                     \
820         ADNPESC1                \
821         ADNPESC1_base_32        \
822         ADNPESC1_DNPEVA2_base_32\
823         DK1C20                  \
824         DK1C20_standard_32      \
825         DK1S10                  \
826         DK1S10_standard_32      \
827         DK1S10_mtx_ldk_20       \
828 "
829
830 #########################################################################
831 ## Nios-II Systems
832 #########################################################################
833
834 LIST_nios2="            \
835         EP1C20          \
836         EP1S10          \
837         EP1S40          \
838         PCI5441         \
839         PK1C20          \
840         nios2-generic   \
841 "
842
843 #########################################################################
844 ## MicroBlaze Systems
845 #########################################################################
846
847 LIST_microblaze="                       \
848         microblaze-generic              \
849 "
850
851 #########################################################################
852 ## ColdFire Systems
853 #########################################################################
854
855 LIST_coldfire="                 \
856         astro_mcf5373l          \
857         cobra5272               \
858         EB+MCF-EV123            \
859         EB+MCF-EV123_internal   \
860         idmr                    \
861         M5208EVBE               \
862         M52277EVB               \
863         M5235EVB                \
864         M5249EVB                \
865         M5253DEMO               \
866         M5253EVBE               \
867         M5271EVB                \
868         M5272C3                 \
869         M5275EVB                \
870         M5282EVB                \
871         M53017EVB               \
872         M5329AFEE               \
873         M5373EVB                \
874         M54451EVB               \
875         M54455EVB               \
876         M5475AFE                \
877         M5485AFE                \
878         TASREG                  \
879 "
880
881 #########################################################################
882 ## AVR32 Systems
883 #########################################################################
884
885 LIST_avr32="            \
886         atstk1002       \
887         atstk1003       \
888         atstk1004       \
889         atstk1006       \
890         atngw100        \
891         favr-32-ezkit   \
892         hammerhead      \
893         mimc200         \
894 "
895
896 #########################################################################
897 ## Blackfin Systems
898 #########################################################################
899
900 LIST_blackfin="         \
901         bf518f-ezbrd    \
902         bf526-ezbrd     \
903         bf527-ezkit     \
904         bf527-ezkit-v2  \
905         bf533-ezkit     \
906         bf533-stamp     \
907         bf537-minotaur  \
908         bf537-pnav      \
909         bf537-srv1      \
910         bf537-stamp     \
911         bf538f-ezkit    \
912         bf548-ezkit     \
913         bf561-acvilon   \
914         bf561-ezkit     \
915         blackstamp      \
916         cm-bf527        \
917         cm-bf533        \
918         cm-bf537e       \
919         cm-bf537u       \
920         cm-bf548        \
921         cm-bf561        \
922         ibf-dsp561      \
923         ip04            \
924         tcm-bf518       \
925         tcm-bf537       \
926 "
927
928 #########################################################################
929 ## SH Systems
930 #########################################################################
931
932 LIST_sh2="              \
933         rsk7203         \
934 "
935 LIST_sh3="              \
936         mpr2            \
937         ms7720se        \
938 "
939
940 LIST_sh4="              \
941         ms7750se        \
942         ms7722se        \
943         MigoR           \
944         r7780mp         \
945         r2dplus         \
946         sh7763rdp       \
947         sh7785lcr       \
948         ap325rxa        \
949         espt            \
950 "
951
952 LIST_sh="               \
953         ${LIST_sh2}     \
954         ${LIST_sh3}     \
955         ${LIST_sh4}     \
956 "
957
958 #########################################################################
959 ## SPARC Systems
960 #########################################################################
961
962 LIST_sparc="gr_xc3s_1500        gr_cpci_ax2000  gr_ep2s60       grsim   grsim_leon2"
963
964 #-----------------------------------------------------------------------
965
966 #----- for now, just run PowerPC by default -----
967 [ $# = 0 ] && set $LIST_powerpc
968
969 #-----------------------------------------------------------------------
970
971 build_target() {
972         target=$1
973
974         ${MAKE} distclean >/dev/null
975         ${MAKE} ${target}_config
976
977         ${MAKE} ${JOBS} all 2>&1 >${LOG_DIR}/$target.MAKELOG \
978                                 | tee ${LOG_DIR}/$target.ERR
979
980         # Check for 'make' errors
981         if [ ${PIPESTATUS[0]} -ne 0 ] ; then
982                 RC=1
983         fi
984
985         if [ -s ${LOG_DIR}/$target.ERR ] ; then
986                 ERR_CNT=$((ERR_CNT + 1))
987                 ERR_LIST="${ERR_LIST} $target"
988         else
989                 rm ${LOG_DIR}/$target.ERR
990         fi
991
992         TOTAL_CNT=$((TOTAL_CNT + 1))
993
994         ${CROSS_COMPILE}size ${BUILD_DIR}/u-boot \
995                                 | tee -a ${LOG_DIR}/$target.MAKELOG
996 }
997
998 #-----------------------------------------------------------------------
999
1000 print_stats() {
1001         echo ""
1002         echo "--------------------- SUMMARY ----------------------------"
1003         echo "Boards compiled: ${TOTAL_CNT}"
1004         if [ ${ERR_CNT} -gt 0 ] ; then
1005                 echo "Boards with warnings or errors: ${ERR_CNT} (${ERR_LIST} )"
1006         fi
1007         echo "----------------------------------------------------------"
1008
1009         exit $RC
1010 }
1011
1012 #-----------------------------------------------------------------------
1013 for arg in $@
1014 do
1015         case "$arg" in
1016         arm|SA|ARM7|ARM9|ARM10|ARM11|ARM_CORTEX_A8|at91|ixp|pxa \
1017         |avr32 \
1018         |blackfin \
1019         |coldfire \
1020         |microblaze \
1021         |mips|mips_el \
1022         |nios|nios2 \
1023         |ppc|powerpc|5xx|5xxx|512x|8xx|8220|824x|8260|83xx|85xx|86xx|4xx|7xx|74xx|TSEC \
1024         |sh|sh2|sh3|sh4 \
1025         |sparc \
1026         |x86|I486 \
1027         )
1028                         for target in `eval echo '$LIST_'${arg}`
1029                         do
1030                                 build_target ${target}
1031                         done
1032                         ;;
1033         *)              build_target ${arg}
1034                         ;;
1035         esac
1036 done