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