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