]> git.sur5r.net Git - u-boot/blob - MAKEALL
Merge branch 'master' of ../master
[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         lpd7a400                \
583         magnesium               \
584         mv88f6281gtw_ge         \
585         mx1ads                  \
586         mx1fs2                  \
587         netstar                 \
588         nhk8815                 \
589         nhk8815_onenand         \
590         omap1510inn             \
591         omap1610h2              \
592         omap1610inn             \
593         omap5912osk             \
594         omap730p2               \
595         openrd_base             \
596         rd6281a                 \
597         sbc2410x                \
598         scb9328                 \
599         sheevaplug              \
600         smdk2400                \
601         smdk2410                \
602         spear300                \
603         spear310                \
604         spear320                \
605         spear600                \
606         suen3                   \
607         trab                    \
608         VCMA9                   \
609         versatile               \
610         versatileab             \
611         versatilepb             \
612         voiceblue               \
613         davinci_dvevm           \
614         davinci_schmoogie       \
615         davinci_sffsdr          \
616         davinci_sonata          \
617         davinci_dm355evm        \
618         davinci_dm355leopard    \
619         davinci_dm365evm        \
620         davinci_dm6467evm       \
621 "
622
623 #########################################################################
624 ## ARM10 Systems
625 #########################################################################
626 LIST_ARM10="            \
627         integratorcp    \
628         cp1026          \
629 "
630
631 #########################################################################
632 ## ARM11 Systems
633 #########################################################################
634 LIST_ARM11="                    \
635         cp1136                  \
636         omap2420h4              \
637         apollon                 \
638         imx31_litekit           \
639         imx31_phycore           \
640         imx31_phycore_eet       \
641         mx31ads                 \
642         mx31pdk                 \
643         mx31pdk_nand            \
644         qong                    \
645         smdk6400                \
646         tnetv107x_evm           \
647 "
648
649 #########################################################################
650 ## ARMV7 Systems
651 #########################################################################
652 LIST_ARMV7="            \
653         am3517_evm              \
654         devkit8000              \
655         mx51evk                 \
656         omap3_beagle            \
657         omap3_overo             \
658         omap3_evm               \
659         omap3_pandora           \
660         omap3_sdp3430           \
661         omap3_zoom1             \
662         omap3_zoom2             \
663         omap4_panda             \
664         omap4_sdp4430           \
665         s5p_goni                \
666         smdkc100                \
667 "
668
669 #########################################################################
670 ## AT91 Systems
671 #########################################################################
672
673 LIST_at91="                     \
674         afeb9260                \
675         at91cap9adk             \
676         at91rm9200dk            \
677         at91rm9200ek            \
678         at91sam9260ek           \
679         at91sam9261ek           \
680         at91sam9263ek           \
681         at91sam9g10ek           \
682         at91sam9g20ek           \
683         at91sam9m10g45ek        \
684         at91sam9rlek            \
685         cmc_pu2                 \
686         CPUAT91                 \
687         CPU9260                 \
688         CPU9G20                 \
689         csb637                  \
690         eb_cpux9k2              \
691         kb9202                  \
692         meesc                   \
693         mp2usb                  \
694         m501sk                  \
695         otc570                  \
696         pm9261                  \
697         pm9263                  \
698         pm9g45                  \
699         SBC35_A9G20             \
700         TNY_A9260               \
701         TNY_A9G20               \
702 "
703
704 #########################################################################
705 ## Xscale Systems
706 #########################################################################
707
708 LIST_pxa="              \
709         cerf250         \
710         colibri_pxa270  \
711         cradle          \
712         csb226          \
713         delta           \
714         innokom         \
715         lubbock         \
716         pleb2           \
717         polaris         \
718         pxa255_idp      \
719         trizepsiv       \
720         vpac270_nor     \
721         vpac270_onenand \
722         wepep250        \
723         xaeniax         \
724         xm250           \
725         xsengine        \
726         zipitz2         \
727         zylonite        \
728 "
729
730 LIST_ixp="              \
731         actux1          \
732         actux2          \
733         actux3          \
734         actux4          \
735         ixdp425         \
736         ixdpg425        \
737         pdnb3           \
738         scpu            \
739 "
740
741 #########################################################################
742 ## ARM groups
743 #########################################################################
744
745 LIST_arm="                      \
746         ${LIST_SA}              \
747         ${LIST_ARM7}            \
748         ${LIST_ARM9}            \
749         ${LIST_ARM10}           \
750         ${LIST_ARM11}           \
751         ${LIST_ARMV7}   \
752         ${LIST_at91}            \
753         ${LIST_pxa}             \
754         ${LIST_ixp}             \
755 "
756
757 #########################################################################
758 ## MIPS Systems         (default = big endian)
759 #########################################################################
760
761 LIST_mips4kc="          \
762         incaip          \
763         qemu_mips       \
764         vct_platinum    \
765         vct_platinum_small      \
766         vct_platinum_onenand    \
767         vct_platinum_onenand_small      \
768         vct_platinumavc \
769         vct_platinumavc_small   \
770         vct_platinumavc_onenand \
771         vct_platinumavc_onenand_small   \
772         vct_premium     \
773         vct_premium_small       \
774         vct_premium_onenand     \
775         vct_premium_onenand_small       \
776 "
777
778 LIST_mips5kc="          \
779         purple          \
780 "
781
782 LIST_au1xx0="           \
783         dbau1000        \
784         dbau1100        \
785         dbau1500        \
786         dbau1550        \
787         dbau1550_el     \
788         gth2            \
789 "
790
791 LIST_mips="             \
792         ${LIST_mips4kc} \
793         ${LIST_mips5kc} \
794         ${LIST_au1xx0}  \
795 "
796
797 #########################################################################
798 ## MIPS Systems         (little endian)
799 #########################################################################
800
801 LIST_mips4kc_el=""
802
803 LIST_mips5kc_el=""
804
805 LIST_au1xx0_el="        \
806         dbau1550_el     \
807         pb1000          \
808 "
809
810 LIST_mips_el="                  \
811         ${LIST_mips4kc_el}      \
812         ${LIST_mips5kc_el}      \
813         ${LIST_au1xx0_el}       \
814 "
815
816 #########################################################################
817 ## i386 Systems
818 #########################################################################
819
820 LIST_I486="             \
821         sc520_cdp       \
822         sc520_eNET      \
823         sc520_spunk     \
824         sc520_spunk_rel \
825 "
826
827 LIST_x86="              \
828         ${LIST_I486}    \
829 "
830
831 #########################################################################
832 ## Nios-II Systems
833 #########################################################################
834
835 LIST_nios2="            \
836         PCI5441         \
837         PK1C20          \
838         nios2-generic   \
839 "
840
841 #########################################################################
842 ## MicroBlaze Systems
843 #########################################################################
844
845 LIST_microblaze="                       \
846         microblaze-generic              \
847 "
848
849 #########################################################################
850 ## ColdFire Systems
851 #########################################################################
852
853 LIST_coldfire="                 \
854         astro_mcf5373l          \
855         cobra5272               \
856         EB+MCF-EV123            \
857         EB+MCF-EV123_internal   \
858         idmr                    \
859         M5208EVBE               \
860         M52277EVB               \
861         M5235EVB                \
862         M5249EVB                \
863         M5253DEMO               \
864         M5253EVBE               \
865         M5271EVB                \
866         M5272C3                 \
867         M5275EVB                \
868         M5282EVB                \
869         M53017EVB               \
870         M5329AFEE               \
871         M5373EVB                \
872         M54451EVB               \
873         M54455EVB               \
874         M5475AFE                \
875         M5485AFE                \
876         TASREG                  \
877 "
878
879 #########################################################################
880 ## AVR32 Systems
881 #########################################################################
882
883 LIST_avr32="            \
884         atstk1002       \
885         atstk1003       \
886         atstk1004       \
887         atstk1006       \
888         atngw100        \
889         favr-32-ezkit   \
890         hammerhead      \
891         mimc200         \
892 "
893
894 #########################################################################
895 ## Blackfin Systems
896 #########################################################################
897
898 LIST_blackfin="         \
899         bf518f-ezbrd    \
900         bf526-ezbrd     \
901         bf527-ad7160-eval       \
902         bf527-ezkit     \
903         bf527-ezkit-v2  \
904         bf533-ezkit     \
905         bf533-stamp     \
906         bf537-minotaur  \
907         bf537-pnav      \
908         bf537-srv1      \
909         bf537-stamp     \
910         bf538f-ezkit    \
911         bf548-ezkit     \
912         bf561-acvilon   \
913         bf561-ezkit     \
914         blackstamp      \
915         cm-bf527        \
916         cm-bf533        \
917         cm-bf537e       \
918         cm-bf537u       \
919         cm-bf548        \
920         cm-bf561        \
921         ibf-dsp561      \
922         ip04            \
923         tcm-bf518       \
924         tcm-bf537       \
925 "
926
927 #########################################################################
928 ## SH Systems
929 #########################################################################
930
931 LIST_sh2="              \
932         rsk7203         \
933 "
934 LIST_sh3="              \
935         mpr2            \
936         ms7720se        \
937 "
938
939 LIST_sh4="              \
940         ms7750se        \
941         ms7722se        \
942         MigoR           \
943         r7780mp         \
944         r2dplus         \
945         sh7763rdp       \
946         sh7785lcr       \
947         ap325rxa        \
948         espt            \
949 "
950
951 LIST_sh="               \
952         ${LIST_sh2}     \
953         ${LIST_sh3}     \
954         ${LIST_sh4}     \
955 "
956
957 #########################################################################
958 ## SPARC Systems
959 #########################################################################
960
961 LIST_sparc="gr_xc3s_1500        gr_cpci_ax2000  gr_ep2s60       grsim   grsim_leon2"
962
963 #-----------------------------------------------------------------------
964
965 #----- for now, just run PowerPC by default -----
966 [ $# = 0 ] && set $LIST_powerpc
967
968 #-----------------------------------------------------------------------
969
970 build_target() {
971         target=$1
972
973         ${MAKE} distclean >/dev/null
974         ${MAKE} ${target}_config
975
976         ${MAKE} ${JOBS} all 2>&1 >${LOG_DIR}/$target.MAKELOG \
977                                 | tee ${LOG_DIR}/$target.ERR
978
979         # Check for 'make' errors
980         if [ ${PIPESTATUS[0]} -ne 0 ] ; then
981                 RC=1
982         fi
983
984         if [ -s ${LOG_DIR}/$target.ERR ] ; then
985                 ERR_CNT=$((ERR_CNT + 1))
986                 ERR_LIST="${ERR_LIST} $target"
987         else
988                 rm ${LOG_DIR}/$target.ERR
989         fi
990
991         TOTAL_CNT=$((TOTAL_CNT + 1))
992
993         ${CROSS_COMPILE}size ${BUILD_DIR}/u-boot \
994                                 | tee -a ${LOG_DIR}/$target.MAKELOG
995 }
996
997 #-----------------------------------------------------------------------
998
999 print_stats() {
1000         echo ""
1001         echo "--------------------- SUMMARY ----------------------------"
1002         echo "Boards compiled: ${TOTAL_CNT}"
1003         if [ ${ERR_CNT} -gt 0 ] ; then
1004                 echo "Boards with warnings or errors: ${ERR_CNT} (${ERR_LIST} )"
1005         fi
1006         echo "----------------------------------------------------------"
1007
1008         exit $RC
1009 }
1010
1011 #-----------------------------------------------------------------------
1012 for arg in $@
1013 do
1014         case "$arg" in
1015         arm|SA|ARM7|ARM9|ARM10|ARM11|ARMV7|at91|ixp|pxa \
1016         |avr32 \
1017         |blackfin \
1018         |coldfire \
1019         |microblaze \
1020         |mips|mips_el \
1021         |nios2 \
1022         |ppc|powerpc|5xx|5xxx|512x|8xx|8220|824x|8260|83xx|85xx|86xx|4xx|7xx|74xx|TSEC \
1023         |sh|sh2|sh3|sh4 \
1024         |sparc \
1025         |x86|I486 \
1026         )
1027                         for target in `eval echo '$LIST_'${arg}`
1028                         do
1029                                 build_target ${target}
1030                         done
1031                         ;;
1032         *)              build_target ${arg}
1033                         ;;
1034         esac
1035 done