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