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