]> git.sur5r.net Git - u-boot/blob - MAKEALL
Save environment data to mmc.
[u-boot] / 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         hermes          \
122         IAD210          \
123         ICU862_100MHz   \
124         IP860           \
125         IVML24          \
126         IVML24_128      \
127         IVML24_256      \
128         IVMS8           \
129         IVMS8_128       \
130         IVMS8_256       \
131         KUP4K           \
132         KUP4X           \
133         LANTEC          \
134         lwmon           \
135         kmsupx4         \
136         MBX             \
137         MBX860T         \
138         mgsuvd          \
139         MHPC            \
140         MPC86xADS       \
141         MPC885ADS       \
142         NETPHONE        \
143         NETTA           \
144         NETTA2          \
145         NETTA_ISDN      \
146         NETVIA          \
147         NETVIA_V2       \
148         NX823           \
149         pcu_e           \
150         QS823           \
151         QS850           \
152         QS860T          \
153         quantum         \
154         R360MPI         \
155         RBC823          \
156         rmu             \
157         RPXClassic      \
158         RPXlite         \
159         RPXlite_DW      \
160         RRvision        \
161         SM850           \
162         spc1920         \
163         SPD823TS        \
164         svm_sc8xx       \
165         SXNI855T        \
166         TK885D          \
167         TOP860          \
168         TQM823L         \
169         TQM823L_LCD     \
170         TQM850L         \
171         TQM855L         \
172         TQM860L         \
173         TQM885D         \
174         uc100           \
175         v37             \
176 "
177
178 #########################################################################
179 ## PPC4xx Systems
180 #########################################################################
181
182 LIST_4xx="              \
183         acadia          \
184         acadia_nand     \
185         ADCIOP          \
186         alpr            \
187         AP1000          \
188         APC405          \
189         AR405           \
190         arches          \
191         ASH405          \
192         bamboo          \
193         bamboo_nand     \
194         bubinga         \
195         CANBT           \
196         canyonlands     \
197         canyonlands_nand \
198         CMS700          \
199         CPCI2DP         \
200         CPCI405         \
201         CPCI4052        \
202         CPCI405AB       \
203         CPCI405DT       \
204         CPCIISER4       \
205         CRAYL1          \
206         csb272          \
207         csb472          \
208         DASA_SIM        \
209         devconcenter    \
210         dlvision        \
211         DP405           \
212         DU405           \
213         DU440           \
214         ebony           \
215         ERIC            \
216         fx12mm          \
217         G2000           \
218         gdppc440etx     \
219         glacier         \
220         haleakala       \
221         haleakala_nand  \
222         hcu4            \
223         hcu5            \
224         HH405           \
225         HUB405          \
226         icon            \
227         intip           \
228         JSE             \
229         KAREF           \
230         katmai          \
231         kilauea         \
232         kilauea_nand    \
233         korat           \
234         luan            \
235         lwmon5          \
236         makalu          \
237         mcu25           \
238         METROBOX        \
239         MIP405          \
240         MIP405T         \
241         ML2             \
242         ml507           \
243         ml507_flash     \
244         neo             \
245         ocotea          \
246         OCRTC           \
247         ORSG            \
248         p3p440          \
249         PCI405          \
250         pcs440ep        \
251         PIP405          \
252         PLU405          \
253         PMC405          \
254         PMC405DE        \
255         PMC440          \
256         PPChameleonEVB  \
257         quad100hd       \
258         rainier         \
259         redwood         \
260         sbc405          \
261         sc3             \
262         sequoia         \
263         sequoia_nand    \
264         t3corp          \
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         MPC8308RDB      \
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         ve8313          \
384         vme8349         \
385 "
386
387
388 #########################################################################
389 ## MPC85xx Systems (includes 8540, 8560 etc.)
390 #########################################################################
391
392 LIST_85xx="             \
393         ATUM8548        \
394         MPC8536DS       \
395         MPC8536DS_NAND  \
396         MPC8536DS_SDCARD        \
397         MPC8536DS_SPIFLASH      \
398         MPC8536DS_36BIT \
399         MPC8540ADS      \
400         MPC8540EVAL     \
401         MPC8541CDS      \
402         MPC8544DS       \
403         MPC8548CDS      \
404         MPC8555CDS      \
405         MPC8560ADS      \
406         MPC8568MDS      \
407         MPC8569MDS      \
408         MPC8569MDS_ATM  \
409         MPC8569MDS_NAND \
410         MPC8572DS       \
411         MPC8572DS_36BIT \
412         P1022DS         \
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         P4080DS         \
432         PM854           \
433         PM856           \
434         sbc8540         \
435         sbc8548         \
436         sbc8548_PCI_33  \
437         sbc8548_PCI_66  \
438         sbc8548_PCI_33_PCIE \
439         sbc8548_PCI_66_PCIE \
440         sbc8560         \
441         socrates        \
442         stxgp3          \
443         stxssa          \
444         TQM8540         \
445         TQM8541         \
446         TQM8548         \
447         TQM8548_AG      \
448         TQM8548_BE      \
449         TQM8555         \
450         TQM8560         \
451         XPEDITE5200     \
452         XPEDITE5370     \
453 "
454
455 #########################################################################
456 ## MPC86xx Systems
457 #########################################################################
458
459 LIST_86xx="             \
460         MPC8610HPCD     \
461         MPC8641HPCN_36BIT \
462         MPC8641HPCN     \
463         sbc8641d        \
464         XPEDITE5170     \
465 "
466
467 #########################################################################
468 ## 74xx/7xx Systems
469 #########################################################################
470
471 LIST_74xx="             \
472         DB64360         \
473         DB64460         \
474         EVB64260        \
475         mpc7448hpc2     \
476         P3G4            \
477         p3m7448         \
478         PCIPPC2         \
479         PCIPPC6         \
480         ZUMA            \
481 "
482
483 LIST_7xx="              \
484         BAB7xx          \
485         CPCI750         \
486         ELPPC           \
487         p3m750          \
488         ppmc7xx         \
489 "
490
491 #########################################################################
492 ## PowerPC groups
493 #########################################################################
494
495 LIST_TSEC="             \
496         ${LIST_83xx}    \
497         ${LIST_85xx}    \
498         ${LIST_86xx}    \
499 "
500
501 LIST_powerpc="          \
502         ${LIST_5xx}     \
503         ${LIST_512x}    \
504         ${LIST_5xxx}    \
505         ${LIST_8xx}     \
506         ${LIST_8220}    \
507         ${LIST_824x}    \
508         ${LIST_8260}    \
509         ${LIST_83xx}    \
510         ${LIST_85xx}    \
511         ${LIST_86xx}    \
512         ${LIST_4xx}     \
513         ${LIST_74xx}    \
514         ${LIST_7xx}     \
515 "
516
517 # Alias "ppc" -> "powerpc" to not break compatibility with older scripts
518 # still using "ppc" instead of "powerpc"
519 LIST_ppc="              \
520         ${LIST_powerpc} \
521 "
522
523 #########################################################################
524 ## StrongARM Systems
525 #########################################################################
526
527 LIST_SA="               \
528         assabet         \
529         dnp1110         \
530         gcplus          \
531         lart            \
532         shannon         \
533 "
534
535 #########################################################################
536 ## ARM7 Systems
537 #########################################################################
538
539 LIST_ARM7="             \
540         ap7             \
541         ap720t          \
542         armadillo       \
543         B2              \
544         ep7312          \
545         evb4510         \
546         impa7           \
547         integratorap    \
548         lpc2292sodimm   \
549         modnet50        \
550         SMN42           \
551 "
552
553 #########################################################################
554 ## ARM9 Systems
555 #########################################################################
556
557 LIST_ARM9="                     \
558         a320evb                 \
559         ap920t                  \
560         ap922_XA10              \
561         ap926ejs                \
562         ap946es                 \
563         ap966                   \
564         cp920t                  \
565         cp922_XA10              \
566         cp926ejs                \
567         cp946es                 \
568         cp966                   \
569         da830evm                \
570         da850evm                \
571         edb9301                 \
572         edb9302                 \
573         edb9302a                \
574         edb9307                 \
575         edb9307a                \
576         edb9312                 \
577         edb9315                 \
578         edb9315a                \
579         edminiv2                \
580         guruplug                \
581         imx27lite               \
582         jadecpu                 \
583         lpd7a400                \
584         magnesium               \
585         mv88f6281gtw_ge         \
586         mx1ads                  \
587         mx1fs2                  \
588         netstar                 \
589         nhk8815                 \
590         nhk8815_onenand         \
591         omap1510inn             \
592         omap1610h2              \
593         omap1610inn             \
594         omap5912osk             \
595         omap730p2               \
596         openrd_base             \
597         rd6281a                 \
598         sbc2410x                \
599         scb9328                 \
600         sheevaplug              \
601         smdk2400                \
602         smdk2410                \
603         spear300                \
604         spear310                \
605         spear320                \
606         spear600                \
607         suen3                   \
608         trab                    \
609         VCMA9                   \
610         versatile               \
611         versatileab             \
612         versatilepb             \
613         voiceblue               \
614         davinci_dvevm           \
615         davinci_schmoogie       \
616         davinci_sffsdr          \
617         davinci_sonata          \
618         davinci_dm355evm        \
619         davinci_dm355leopard    \
620         davinci_dm365evm        \
621         davinci_dm6467evm       \
622 "
623
624 #########################################################################
625 ## ARM10 Systems
626 #########################################################################
627 LIST_ARM10="            \
628         integratorcp    \
629         cp1026          \
630 "
631
632 #########################################################################
633 ## ARM11 Systems
634 #########################################################################
635 LIST_ARM11="                    \
636         cp1136                  \
637         omap2420h4              \
638         apollon                 \
639         imx31_litekit           \
640         imx31_phycore           \
641         imx31_phycore_eet       \
642         mx31ads                 \
643         mx31pdk                 \
644         mx31pdk_nand            \
645         qong                    \
646         smdk6400                \
647         tnetv107x_evm           \
648 "
649
650 #########################################################################
651 ## ARMV7 Systems
652 #########################################################################
653 LIST_ARMV7="            \
654         am3517_evm              \
655         devkit8000              \
656         mx51evk                 \
657         omap3_beagle            \
658         omap3_overo             \
659         omap3_evm               \
660         omap3_pandora           \
661         omap3_sdp3430           \
662         omap3_zoom1             \
663         omap3_zoom2             \
664         omap4_panda             \
665         omap4_sdp4430           \
666         s5p_goni                \
667         smdkc100                \
668 "
669
670 #########################################################################
671 ## AT91 Systems
672 #########################################################################
673
674 LIST_at91="                     \
675         afeb9260                \
676         at91cap9adk             \
677         at91rm9200dk            \
678         at91rm9200ek            \
679         at91sam9260ek           \
680         at91sam9261ek           \
681         at91sam9263ek           \
682         at91sam9g10ek           \
683         at91sam9g20ek           \
684         at91sam9m10g45ek        \
685         at91sam9rlek            \
686         cmc_pu2                 \
687         CPUAT91                 \
688         CPU9260                 \
689         CPU9G20                 \
690         csb637                  \
691         eb_cpux9k2              \
692         kb9202                  \
693         meesc                   \
694         mp2usb                  \
695         m501sk                  \
696         otc570                  \
697         pm9261                  \
698         pm9263                  \
699         pm9g45                  \
700         SBC35_A9G20             \
701         TNY_A9260               \
702         TNY_A9G20               \
703 "
704
705 #########################################################################
706 ## Xscale Systems
707 #########################################################################
708
709 LIST_pxa="              \
710         cerf250         \
711         colibri_pxa270  \
712         cradle          \
713         csb226          \
714         delta           \
715         innokom         \
716         lubbock         \
717         pleb2           \
718         polaris         \
719         pxa255_idp      \
720         trizepsiv       \
721         vpac270_nor     \
722         vpac270_onenand \
723         wepep250        \
724         xaeniax         \
725         xm250           \
726         xsengine        \
727         zipitz2         \
728         zylonite        \
729 "
730
731 LIST_ixp="              \
732         actux1          \
733         actux2          \
734         actux3          \
735         actux4          \
736         ixdp425         \
737         ixdpg425        \
738         pdnb3           \
739         scpu            \
740 "
741
742 #########################################################################
743 ## ARM groups
744 #########################################################################
745
746 LIST_arm="                      \
747         ${LIST_SA}              \
748         ${LIST_ARM7}            \
749         ${LIST_ARM9}            \
750         ${LIST_ARM10}           \
751         ${LIST_ARM11}           \
752         ${LIST_ARMV7}   \
753         ${LIST_at91}            \
754         ${LIST_pxa}             \
755         ${LIST_ixp}             \
756 "
757
758 #########################################################################
759 ## MIPS Systems         (default = big endian)
760 #########################################################################
761
762 LIST_mips4kc="          \
763         incaip          \
764         qemu_mips       \
765         vct_platinum    \
766         vct_platinum_small      \
767         vct_platinum_onenand    \
768         vct_platinum_onenand_small      \
769         vct_platinumavc \
770         vct_platinumavc_small   \
771         vct_platinumavc_onenand \
772         vct_platinumavc_onenand_small   \
773         vct_premium     \
774         vct_premium_small       \
775         vct_premium_onenand     \
776         vct_premium_onenand_small       \
777 "
778
779 LIST_mips5kc="          \
780         purple          \
781 "
782
783 LIST_au1xx0="           \
784         dbau1000        \
785         dbau1100        \
786         dbau1500        \
787         dbau1550        \
788         dbau1550_el     \
789         gth2            \
790 "
791
792 LIST_mips="             \
793         ${LIST_mips4kc} \
794         ${LIST_mips5kc} \
795         ${LIST_au1xx0}  \
796 "
797
798 #########################################################################
799 ## MIPS Systems         (little endian)
800 #########################################################################
801
802 LIST_mips4kc_el=""
803
804 LIST_mips5kc_el=""
805
806 LIST_au1xx0_el="        \
807         dbau1550_el     \
808         pb1000          \
809 "
810
811 LIST_mips_el="                  \
812         ${LIST_mips4kc_el}      \
813         ${LIST_mips5kc_el}      \
814         ${LIST_au1xx0_el}       \
815 "
816
817 #########################################################################
818 ## i386 Systems
819 #########################################################################
820
821 LIST_I486="             \
822         sc520_eNET      \
823 "
824
825 LIST_x86="              \
826         ${LIST_I486}    \
827 "
828
829 #########################################################################
830 ## Nios-II Systems
831 #########################################################################
832
833 LIST_nios2="            \
834         PCI5441         \
835         PK1C20          \
836         nios2-generic   \
837 "
838
839 #########################################################################
840 ## MicroBlaze Systems
841 #########################################################################
842
843 LIST_microblaze="                       \
844         microblaze-generic              \
845 "
846
847 #########################################################################
848 ## ColdFire Systems
849 #########################################################################
850
851 LIST_coldfire="                 \
852         astro_mcf5373l          \
853         cobra5272               \
854         EB+MCF-EV123            \
855         EB+MCF-EV123_internal   \
856         idmr                    \
857         M5208EVBE               \
858         M52277EVB               \
859         M5235EVB                \
860         M5249EVB                \
861         M5253DEMO               \
862         M5253EVBE               \
863         M5271EVB                \
864         M5272C3                 \
865         M5275EVB                \
866         M5282EVB                \
867         M53017EVB               \
868         M5329AFEE               \
869         M5373EVB                \
870         M54451EVB               \
871         M54455EVB               \
872         M5475AFE                \
873         M5485AFE                \
874         TASREG                  \
875 "
876
877 #########################################################################
878 ## AVR32 Systems
879 #########################################################################
880
881 LIST_avr32="            \
882         atstk1002       \
883         atstk1003       \
884         atstk1004       \
885         atstk1006       \
886         atngw100        \
887         favr-32-ezkit   \
888         hammerhead      \
889         mimc200         \
890 "
891
892 #########################################################################
893 ## Blackfin Systems
894 #########################################################################
895
896 LIST_blackfin="         \
897         bf518f-ezbrd    \
898         bf526-ezbrd     \
899         bf527-ad7160-eval       \
900         bf527-ezkit     \
901         bf527-ezkit-v2  \
902         bf533-ezkit     \
903         bf533-stamp     \
904         bf537-minotaur  \
905         bf537-pnav      \
906         bf537-srv1      \
907         bf537-stamp     \
908         bf538f-ezkit    \
909         bf548-ezkit     \
910         bf561-acvilon   \
911         bf561-ezkit     \
912         blackstamp      \
913         cm-bf527        \
914         cm-bf533        \
915         cm-bf537e       \
916         cm-bf537u       \
917         cm-bf548        \
918         cm-bf561        \
919         ibf-dsp561      \
920         ip04            \
921         tcm-bf518       \
922         tcm-bf537       \
923 "
924
925 #########################################################################
926 ## SH Systems
927 #########################################################################
928
929 LIST_sh2="              \
930         rsk7203         \
931 "
932 LIST_sh3="              \
933         mpr2            \
934         ms7720se        \
935 "
936
937 LIST_sh4="              \
938         ms7750se        \
939         ms7722se        \
940         MigoR           \
941         r7780mp         \
942         r2dplus         \
943         sh7763rdp       \
944         sh7785lcr       \
945         ap325rxa        \
946         espt            \
947 "
948
949 LIST_sh="               \
950         ${LIST_sh2}     \
951         ${LIST_sh3}     \
952         ${LIST_sh4}     \
953 "
954
955 #########################################################################
956 ## SPARC Systems
957 #########################################################################
958
959 LIST_sparc="gr_xc3s_1500        gr_cpci_ax2000  gr_ep2s60       grsim   grsim_leon2"
960
961 #-----------------------------------------------------------------------
962
963 #----- for now, just run PowerPC by default -----
964 [ $# = 0 ] && set $LIST_powerpc
965
966 #-----------------------------------------------------------------------
967
968 build_target() {
969         target=$1
970
971         ${MAKE} distclean >/dev/null
972         ${MAKE} ${target}_config
973
974         ${MAKE} ${JOBS} all 2>&1 >${LOG_DIR}/$target.MAKELOG \
975                                 | tee ${LOG_DIR}/$target.ERR
976
977         # Check for 'make' errors
978         if [ ${PIPESTATUS[0]} -ne 0 ] ; then
979                 RC=1
980         fi
981
982         if [ -s ${LOG_DIR}/$target.ERR ] ; then
983                 ERR_CNT=$((ERR_CNT + 1))
984                 ERR_LIST="${ERR_LIST} $target"
985         else
986                 rm ${LOG_DIR}/$target.ERR
987         fi
988
989         TOTAL_CNT=$((TOTAL_CNT + 1))
990
991         ${CROSS_COMPILE}size ${BUILD_DIR}/u-boot \
992                                 | tee -a ${LOG_DIR}/$target.MAKELOG
993 }
994
995 #-----------------------------------------------------------------------
996
997 print_stats() {
998         echo ""
999         echo "--------------------- SUMMARY ----------------------------"
1000         echo "Boards compiled: ${TOTAL_CNT}"
1001         if [ ${ERR_CNT} -gt 0 ] ; then
1002                 echo "Boards with warnings or errors: ${ERR_CNT} (${ERR_LIST} )"
1003         fi
1004         echo "----------------------------------------------------------"
1005
1006         exit $RC
1007 }
1008
1009 #-----------------------------------------------------------------------
1010 for arg in $@
1011 do
1012         case "$arg" in
1013         arm|SA|ARM7|ARM9|ARM10|ARM11|ARMV7|at91|ixp|pxa \
1014         |avr32 \
1015         |blackfin \
1016         |coldfire \
1017         |microblaze \
1018         |mips|mips_el \
1019         |nios2 \
1020         |ppc|powerpc|5xx|5xxx|512x|8xx|8220|824x|8260|83xx|85xx|86xx|4xx|7xx|74xx|TSEC \
1021         |sh|sh2|sh3|sh4 \
1022         |sparc \
1023         |x86|I486 \
1024         )
1025                         for target in `eval echo '$LIST_'${arg}`
1026                         do
1027                                 build_target ${target}
1028                         done
1029                         ;;
1030         *)              build_target ${arg}
1031                         ;;
1032         esac
1033 done