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