Merge branch 'master' of git://git.denx.de/u-boot-blackfin
[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         t3corp          \
266         taihu           \
267         taishan         \
268         v5fx30teval     \
269         v5fx30teval_flash \
270         VOH405          \
271         VOM405          \
272         W7OLMC          \
273         W7OLMG          \
274         walnut          \
275         WUH405          \
276         xilinx-ppc440-generic \
277         xilinx-ppc440-generic_flash \
278         XPEDITE1000     \
279         yellowstone     \
280         yosemite        \
281         yucca           \
282         zeus            \
283 "
284
285 #########################################################################
286 ## MPC8220 Systems
287 #########################################################################
288
289 LIST_8220="             \
290         Alaska8220      \
291         Yukon8220       \
292 "
293
294 #########################################################################
295 ## MPC824x Systems
296 #########################################################################
297
298 LIST_824x="             \
299         A3000           \
300         barco           \
301         BMW             \
302         CPC45           \
303         CU824           \
304         debris          \
305         eXalion         \
306         HIDDEN_DRAGON   \
307         IDS8247         \
308         linkstation_HGLAN       \
309         MOUSSE          \
310         MUSENKI         \
311         MVBLUE          \
312         OXC             \
313         PN62            \
314         Sandpoint8240   \
315         Sandpoint8245   \
316         sbc8240         \
317         utx8245         \
318 "
319
320 #########################################################################
321 ## MPC8260 Systems (includes 8250, 8255 etc.)
322 #########################################################################
323
324 LIST_8260="             \
325         atc             \
326         cogent_mpc8260  \
327         CPU86           \
328         CPU87           \
329         ep8248          \
330         ep8260          \
331         ep82xxm         \
332         gw8260          \
333         hymod           \
334         IPHASE4539      \
335         ISPAN           \
336         mgcoge          \
337         MPC8260ADS      \
338         MPC8266ADS      \
339         MPC8272ADS      \
340         PM826           \
341         PM828           \
342         ppmc8260        \
343         Rattler8248     \
344         RPXsuper        \
345         rsdproto        \
346         sacsng          \
347         sbc8260         \
348         SCM             \
349         TQM8260_AC      \
350         TQM8260_AD      \
351         TQM8260_AE      \
352         TQM8272         \
353         ZPC1900         \
354 "
355
356 #########################################################################
357 ## MPC83xx Systems (includes 8349, etc.)
358 #########################################################################
359
360 LIST_83xx="             \
361         caddy2          \
362         kmeter1         \
363         MPC8313ERDB_33  \
364         MPC8313ERDB_NAND_66     \
365         MPC8315ERDB     \
366         MPC8315ERDB_NAND        \
367         MPC8323ERDB     \
368         MPC832XEMDS     \
369         MPC832XEMDS_ATM \
370         MPC8349EMDS     \
371         MPC8349ITX      \
372         MPC8349ITXGP    \
373         MPC8360EMDS     \
374         MPC8360EMDS_ATM \
375         MPC8360ERDK_33  \
376         MPC8360ERDK_66  \
377         MPC837XEMDS     \
378         MPC837XERDB     \
379         MVBLM7          \
380         sbc8349         \
381         SIMPC8313_LP    \
382         TQM834x         \
383         vme8349         \
384 "
385
386
387 #########################################################################
388 ## MPC85xx Systems (includes 8540, 8560 etc.)
389 #########################################################################
390
391 LIST_85xx="             \
392         ATUM8548        \
393         MPC8536DS       \
394         MPC8536DS_NAND  \
395         MPC8536DS_SDCARD        \
396         MPC8536DS_SPIFLASH      \
397         MPC8536DS_36BIT \
398         MPC8540ADS      \
399         MPC8540EVAL     \
400         MPC8541CDS      \
401         MPC8544DS       \
402         MPC8548CDS      \
403         MPC8555CDS      \
404         MPC8560ADS      \
405         MPC8568MDS      \
406         MPC8569MDS      \
407         MPC8569MDS_ATM  \
408         MPC8569MDS_NAND \
409         MPC8572DS       \
410         MPC8572DS_36BIT \
411         P2020DS         \
412         P2020DS_36BIT   \
413         P1011RDB        \
414         P1011RDB_NAND   \
415         P1011RDB_SDCARD \
416         P1011RDB_SPIFLASH       \
417         P1020RDB        \
418         P1020RDB_NAND   \
419         P1020RDB_SDCARD \
420         P1020RDB_SPIFLASH       \
421         P2010RDB        \
422         P2010RDB_NAND   \
423         P2010RDB_SDCARD \
424         P2010RDB_SPIFLASH       \
425         P2020RDB        \
426         P2020RDB_NAND   \
427         P2020RDB_SDCARD \
428         P2020RDB_SPIFLASH       \
429         PM854           \
430         PM856           \
431         sbc8540         \
432         sbc8548         \
433         sbc8548_PCI_33  \
434         sbc8548_PCI_66  \
435         sbc8548_PCI_33_PCIE \
436         sbc8548_PCI_66_PCIE \
437         sbc8560         \
438         socrates        \
439         stxgp3          \
440         stxssa          \
441         TQM8540         \
442         TQM8541         \
443         TQM8548         \
444         TQM8548_AG      \
445         TQM8548_BE      \
446         TQM8555         \
447         TQM8560         \
448         XPEDITE5200     \
449         XPEDITE5370     \
450 "
451
452 #########################################################################
453 ## MPC86xx Systems
454 #########################################################################
455
456 LIST_86xx="             \
457         MPC8610HPCD     \
458         MPC8641HPCN_36BIT \
459         MPC8641HPCN     \
460         sbc8641d        \
461         XPEDITE5170     \
462 "
463
464 #########################################################################
465 ## 74xx/7xx Systems
466 #########################################################################
467
468 LIST_74xx="             \
469         DB64360         \
470         DB64460         \
471         EVB64260        \
472         mpc7448hpc2     \
473         P3G4            \
474         p3m7448         \
475         PCIPPC2         \
476         PCIPPC6         \
477         ZUMA            \
478 "
479
480 LIST_7xx="              \
481         BAB7xx          \
482         CPCI750         \
483         ELPPC           \
484         p3m750          \
485         ppmc7xx         \
486 "
487
488 #########################################################################
489 ## PowerPC groups
490 #########################################################################
491
492 LIST_TSEC="             \
493         ${LIST_83xx}    \
494         ${LIST_85xx}    \
495         ${LIST_86xx}    \
496 "
497
498 LIST_powerpc="          \
499         ${LIST_5xx}     \
500         ${LIST_512x}    \
501         ${LIST_5xxx}    \
502         ${LIST_8xx}     \
503         ${LIST_8220}    \
504         ${LIST_824x}    \
505         ${LIST_8260}    \
506         ${LIST_83xx}    \
507         ${LIST_85xx}    \
508         ${LIST_86xx}    \
509         ${LIST_4xx}     \
510         ${LIST_74xx}    \
511         ${LIST_7xx}     \
512 "
513
514 # Alias "ppc" -> "powerpc" to not break compatibility with older scripts
515 # still using "ppc" instead of "powerpc"
516 LIST_ppc="              \
517         ${LIST_powerpc} \
518 "
519
520 #########################################################################
521 ## StrongARM Systems
522 #########################################################################
523
524 LIST_SA="               \
525         assabet         \
526         dnp1110         \
527         gcplus          \
528         lart            \
529         shannon         \
530 "
531
532 #########################################################################
533 ## ARM7 Systems
534 #########################################################################
535
536 LIST_ARM7="             \
537         ap7             \
538         ap720t          \
539         armadillo       \
540         B2              \
541         ep7312          \
542         evb4510         \
543         impa7           \
544         integratorap    \
545         lpc2292sodimm   \
546         modnet50        \
547         SMN42           \
548 "
549
550 #########################################################################
551 ## ARM9 Systems
552 #########################################################################
553
554 LIST_ARM9="                     \
555         a320evb                 \
556         ap920t                  \
557         ap922_XA10              \
558         ap926ejs                \
559         ap946es                 \
560         ap966                   \
561         cp920t                  \
562         cp922_XA10              \
563         cp926ejs                \
564         cp946es                 \
565         cp966                   \
566         da830evm                \
567         da850evm                \
568         edb9301                 \
569         edb9302                 \
570         edb9302a                \
571         edb9307                 \
572         edb9307a                \
573         edb9312                 \
574         edb9315                 \
575         edb9315a                \
576         edminiv2                \
577         guruplug                \
578         imx27lite               \
579         lpd7a400                \
580         magnesium               \
581         mv88f6281gtw_ge         \
582         mx1ads                  \
583         mx1fs2                  \
584         netstar                 \
585         nhk8815                 \
586         nhk8815_onenand         \
587         omap1510inn             \
588         omap1610h2              \
589         omap1610inn             \
590         omap5912osk             \
591         omap730p2               \
592         openrd_base             \
593         rd6281a                 \
594         sbc2410x                \
595         scb9328                 \
596         sheevaplug              \
597         smdk2400                \
598         smdk2410                \
599         spear300                \
600         spear310                \
601         spear320                \
602         spear600                \
603         suen3                   \
604         trab                    \
605         VCMA9                   \
606         versatile               \
607         versatileab             \
608         versatilepb             \
609         voiceblue               \
610         davinci_dvevm           \
611         davinci_schmoogie       \
612         davinci_sffsdr          \
613         davinci_sonata          \
614         davinci_dm355evm        \
615         davinci_dm355leopard    \
616         davinci_dm365evm        \
617         davinci_dm6467evm       \
618 "
619
620 #########################################################################
621 ## ARM10 Systems
622 #########################################################################
623 LIST_ARM10="            \
624         integratorcp    \
625         cp1026          \
626 "
627
628 #########################################################################
629 ## ARM11 Systems
630 #########################################################################
631 LIST_ARM11="                    \
632         cp1136                  \
633         omap2420h4              \
634         apollon                 \
635         imx31_litekit           \
636         imx31_phycore           \
637         imx31_phycore_eet       \
638         mx31ads                 \
639         mx31pdk                 \
640         mx31pdk_nand            \
641         qong                    \
642         smdk6400                \
643         tnetv107x_evm           \
644 "
645
646 #########################################################################
647 ## ARM Cortex-A8 Systems
648 #########################################################################
649 LIST_ARM_CORTEX_A8="            \
650         am3517_evm              \
651         devkit8000              \
652         mx51evk                 \
653         omap3_beagle            \
654         omap3_overo             \
655         omap3_evm               \
656         omap3_pandora           \
657         omap3_sdp3430           \
658         omap3_zoom1             \
659         omap3_zoom2             \
660         s5p_goni                \
661         smdkc100                \
662 "
663
664 #########################################################################
665 ## AT91 Systems
666 #########################################################################
667
668 LIST_at91="                     \
669         afeb9260                \
670         at91cap9adk             \
671         at91rm9200dk            \
672         at91rm9200ek            \
673         at91sam9260ek           \
674         at91sam9261ek           \
675         at91sam9263ek           \
676         at91sam9g10ek           \
677         at91sam9g20ek           \
678         at91sam9m10g45ek        \
679         at91sam9rlek            \
680         cmc_pu2                 \
681         CPUAT91                 \
682         CPU9260                 \
683         CPU9G20                 \
684         csb637                  \
685         eb_cpux9k2              \
686         kb9202                  \
687         meesc                   \
688         mp2usb                  \
689         m501sk                  \
690         otc570                  \
691         pm9261                  \
692         pm9263                  \
693         pm9g45                  \
694         SBC35_A9G20             \
695         TNY_A9260               \
696         TNY_A9G20               \
697 "
698
699 #########################################################################
700 ## Xscale Systems
701 #########################################################################
702
703 LIST_pxa="              \
704         cerf250         \
705         cradle          \
706         csb226          \
707         delta           \
708         innokom         \
709         lubbock         \
710         pleb2           \
711         polaris         \
712         pxa255_idp      \
713         trizepsiv       \
714         wepep250        \
715         xaeniax         \
716         xm250           \
717         xsengine        \
718         zylonite        \
719 "
720
721 LIST_ixp="              \
722         actux1          \
723         actux2          \
724         actux3          \
725         actux4          \
726         ixdp425         \
727         ixdpg425        \
728         pdnb3           \
729         scpu            \
730 "
731
732 #########################################################################
733 ## ARM groups
734 #########################################################################
735
736 LIST_arm="                      \
737         ${LIST_SA}              \
738         ${LIST_ARM7}            \
739         ${LIST_ARM9}            \
740         ${LIST_ARM10}           \
741         ${LIST_ARM11}           \
742         ${LIST_ARM_CORTEX_A8}   \
743         ${LIST_at91}            \
744         ${LIST_pxa}             \
745         ${LIST_ixp}             \
746 "
747
748 #########################################################################
749 ## MIPS Systems         (default = big endian)
750 #########################################################################
751
752 LIST_mips4kc="          \
753         incaip          \
754         qemu_mips       \
755         vct_platinum    \
756         vct_platinum_small      \
757         vct_platinum_onenand    \
758         vct_platinum_onenand_small      \
759         vct_platinumavc \
760         vct_platinumavc_small   \
761         vct_platinumavc_onenand \
762         vct_platinumavc_onenand_small   \
763         vct_premium     \
764         vct_premium_small       \
765         vct_premium_onenand     \
766         vct_premium_onenand_small       \
767 "
768
769 LIST_mips5kc="          \
770         purple          \
771 "
772
773 LIST_au1xx0="           \
774         dbau1000        \
775         dbau1100        \
776         dbau1500        \
777         dbau1550        \
778         dbau1550_el     \
779         gth2            \
780 "
781
782 LIST_mips="             \
783         ${LIST_mips4kc} \
784         ${LIST_mips5kc} \
785         ${LIST_au1xx0}  \
786 "
787
788 #########################################################################
789 ## MIPS Systems         (little endian)
790 #########################################################################
791
792 LIST_mips4kc_el=""
793
794 LIST_mips5kc_el=""
795
796 LIST_au1xx0_el="        \
797         dbau1550_el     \
798         pb1000          \
799 "
800
801 LIST_mips_el="                  \
802         ${LIST_mips4kc_el}      \
803         ${LIST_mips5kc_el}      \
804         ${LIST_au1xx0_el}       \
805 "
806
807 #########################################################################
808 ## i386 Systems
809 #########################################################################
810
811 LIST_I486="             \
812         sc520_cdp       \
813         sc520_eNET      \
814         sc520_spunk     \
815         sc520_spunk_rel \
816 "
817
818 LIST_x86="              \
819         ${LIST_I486}    \
820 "
821
822 #########################################################################
823 ## Nios-II Systems
824 #########################################################################
825
826 LIST_nios2="            \
827         EP1C20          \
828         EP1S10          \
829         EP1S40          \
830         PCI5441         \
831         PK1C20          \
832         nios2-generic   \
833 "
834
835 #########################################################################
836 ## MicroBlaze Systems
837 #########################################################################
838
839 LIST_microblaze="                       \
840         microblaze-generic              \
841 "
842
843 #########################################################################
844 ## ColdFire Systems
845 #########################################################################
846
847 LIST_coldfire="                 \
848         astro_mcf5373l          \
849         cobra5272               \
850         EB+MCF-EV123            \
851         EB+MCF-EV123_internal   \
852         idmr                    \
853         M5208EVBE               \
854         M52277EVB               \
855         M5235EVB                \
856         M5249EVB                \
857         M5253DEMO               \
858         M5253EVBE               \
859         M5271EVB                \
860         M5272C3                 \
861         M5275EVB                \
862         M5282EVB                \
863         M53017EVB               \
864         M5329AFEE               \
865         M5373EVB                \
866         M54451EVB               \
867         M54455EVB               \
868         M5475AFE                \
869         M5485AFE                \
870         TASREG                  \
871 "
872
873 #########################################################################
874 ## AVR32 Systems
875 #########################################################################
876
877 LIST_avr32="            \
878         atstk1002       \
879         atstk1003       \
880         atstk1004       \
881         atstk1006       \
882         atngw100        \
883         favr-32-ezkit   \
884         hammerhead      \
885         mimc200         \
886 "
887
888 #########################################################################
889 ## Blackfin Systems
890 #########################################################################
891
892 LIST_blackfin="         \
893         bf518f-ezbrd    \
894         bf526-ezbrd     \
895         bf527-ad7160-eval       \
896         bf527-ezkit     \
897         bf527-ezkit-v2  \
898         bf533-ezkit     \
899         bf533-stamp     \
900         bf537-minotaur  \
901         bf537-pnav      \
902         bf537-srv1      \
903         bf537-stamp     \
904         bf538f-ezkit    \
905         bf548-ezkit     \
906         bf561-acvilon   \
907         bf561-ezkit     \
908         blackstamp      \
909         cm-bf527        \
910         cm-bf533        \
911         cm-bf537e       \
912         cm-bf537u       \
913         cm-bf548        \
914         cm-bf561        \
915         ibf-dsp561      \
916         ip04            \
917         tcm-bf518       \
918         tcm-bf537       \
919 "
920
921 #########################################################################
922 ## SH Systems
923 #########################################################################
924
925 LIST_sh2="              \
926         rsk7203         \
927 "
928 LIST_sh3="              \
929         mpr2            \
930         ms7720se        \
931 "
932
933 LIST_sh4="              \
934         ms7750se        \
935         ms7722se        \
936         MigoR           \
937         r7780mp         \
938         r2dplus         \
939         sh7763rdp       \
940         sh7785lcr       \
941         ap325rxa        \
942         espt            \
943 "
944
945 LIST_sh="               \
946         ${LIST_sh2}     \
947         ${LIST_sh3}     \
948         ${LIST_sh4}     \
949 "
950
951 #########################################################################
952 ## SPARC Systems
953 #########################################################################
954
955 LIST_sparc="gr_xc3s_1500        gr_cpci_ax2000  gr_ep2s60       grsim   grsim_leon2"
956
957 #-----------------------------------------------------------------------
958
959 #----- for now, just run PowerPC by default -----
960 [ $# = 0 ] && set $LIST_powerpc
961
962 #-----------------------------------------------------------------------
963
964 build_target() {
965         target=$1
966
967         ${MAKE} distclean >/dev/null
968         ${MAKE} ${target}_config
969
970         ${MAKE} ${JOBS} all 2>&1 >${LOG_DIR}/$target.MAKELOG \
971                                 | tee ${LOG_DIR}/$target.ERR
972
973         # Check for 'make' errors
974         if [ ${PIPESTATUS[0]} -ne 0 ] ; then
975                 RC=1
976         fi
977
978         if [ -s ${LOG_DIR}/$target.ERR ] ; then
979                 ERR_CNT=$((ERR_CNT + 1))
980                 ERR_LIST="${ERR_LIST} $target"
981         else
982                 rm ${LOG_DIR}/$target.ERR
983         fi
984
985         TOTAL_CNT=$((TOTAL_CNT + 1))
986
987         ${CROSS_COMPILE}size ${BUILD_DIR}/u-boot \
988                                 | tee -a ${LOG_DIR}/$target.MAKELOG
989 }
990
991 #-----------------------------------------------------------------------
992
993 print_stats() {
994         echo ""
995         echo "--------------------- SUMMARY ----------------------------"
996         echo "Boards compiled: ${TOTAL_CNT}"
997         if [ ${ERR_CNT} -gt 0 ] ; then
998                 echo "Boards with warnings or errors: ${ERR_CNT} (${ERR_LIST} )"
999         fi
1000         echo "----------------------------------------------------------"
1001
1002         exit $RC
1003 }
1004
1005 #-----------------------------------------------------------------------
1006 for arg in $@
1007 do
1008         case "$arg" in
1009         arm|SA|ARM7|ARM9|ARM10|ARM11|ARM_CORTEX_A8|at91|ixp|pxa \
1010         |avr32 \
1011         |blackfin \
1012         |coldfire \
1013         |microblaze \
1014         |mips|mips_el \
1015         |nios2 \
1016         |ppc|powerpc|5xx|5xxx|512x|8xx|8220|824x|8260|83xx|85xx|86xx|4xx|7xx|74xx|TSEC \
1017         |sh|sh2|sh3|sh4 \
1018         |sparc \
1019         |x86|I486 \
1020         )
1021                         for target in `eval echo '$LIST_'${arg}`
1022                         do
1023                                 build_target ${target}
1024                         done
1025                         ;;
1026         *)              build_target ${arg}
1027                         ;;
1028         esac
1029 done