Merge branch 'master' of git://git.denx.de/u-boot-i2c
[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         MPC8569MDS      \
380         MPC8572DS       \
381         MPC8572DS_36BIT \
382         PM854           \
383         PM856           \
384         sbc8540         \
385         sbc8548         \
386         sbc8560         \
387         socrates        \
388         stxgp3          \
389         stxssa          \
390         TQM8540         \
391         TQM8541         \
392         TQM8548         \
393         TQM8548_AG      \
394         TQM8548_BE      \
395         TQM8555         \
396         TQM8560         \
397         XPEDITE5200     \
398         XPEDITE5370     \
399 "
400
401 #########################################################################
402 ## MPC86xx Systems
403 #########################################################################
404
405 LIST_86xx="             \
406         MPC8610HPCD     \
407         MPC8641HPCN     \
408         sbc8641d        \
409 "
410
411 #########################################################################
412 ## 74xx/7xx Systems
413 #########################################################################
414
415 LIST_74xx="             \
416         DB64360         \
417         DB64460         \
418         EVB64260        \
419         mpc7448hpc2     \
420         P3G4            \
421         p3m7448         \
422         PCIPPC2         \
423         PCIPPC6         \
424         ZUMA            \
425 "
426
427 LIST_7xx="              \
428         BAB7xx          \
429         CPCI750         \
430         ELPPC           \
431         p3m750          \
432         ppmc7xx         \
433 "
434
435 #########################################################################
436 ## PowerPC groups
437 #########################################################################
438
439 LIST_TSEC="             \
440         ${LIST_83xx}    \
441         ${LIST_85xx}    \
442         ${LIST_86xx}    \
443 "
444
445 LIST_ppc="              \
446         ${LIST_5xx}     \
447         ${LIST_512x}    \
448         ${LIST_5xxx}    \
449         ${LIST_8xx}     \
450         ${LIST_8220}    \
451         ${LIST_824x}    \
452         ${LIST_8260}    \
453         ${LIST_83xx}    \
454         ${LIST_85xx}    \
455         ${LIST_86xx}    \
456         ${LIST_4xx}     \
457         ${LIST_74xx}    \
458         ${LIST_7xx}     \
459 "
460
461 #########################################################################
462 ## StrongARM Systems
463 #########################################################################
464
465 LIST_SA="               \
466         assabet         \
467         dnp1110         \
468         gcplus          \
469         lart            \
470         shannon         \
471 "
472
473 #########################################################################
474 ## ARM7 Systems
475 #########################################################################
476
477 LIST_ARM7="             \
478         ap7             \
479         ap720t          \
480         armadillo       \
481         B2              \
482         ep7312          \
483         evb4510         \
484         impa7           \
485         integratorap    \
486         lpc2292sodimm   \
487         modnet50        \
488         SMN42           \
489 "
490
491 #########################################################################
492 ## ARM9 Systems
493 #########################################################################
494
495 LIST_ARM9="                     \
496         ap920t                  \
497         ap922_XA10              \
498         ap926ejs                \
499         ap946es                 \
500         ap966                   \
501         cp920t                  \
502         cp922_XA10              \
503         cp926ejs                \
504         cp946es                 \
505         cp966                   \
506         lpd7a400                \
507         mx1ads                  \
508         mx1fs2                  \
509         netstar                 \
510         nmdk8815                \
511         omap1510inn             \
512         omap1610h2              \
513         omap1610inn             \
514         omap5912osk             \
515         omap730p2               \
516         sbc2410x                \
517         scb9328                 \
518         smdk2400                \
519         smdk2410                \
520         trab                    \
521         VCMA9                   \
522         versatile               \
523         versatileab             \
524         versatilepb             \
525         voiceblue               \
526         davinci_dvevm           \
527         davinci_schmoogie       \
528         davinci_sffsdr          \
529         davinci_sonata          \
530 "
531
532 #########################################################################
533 ## ARM10 Systems
534 #########################################################################
535 LIST_ARM10="            \
536         integratorcp    \
537         cp1026          \
538 "
539
540 #########################################################################
541 ## ARM11 Systems
542 #########################################################################
543 LIST_ARM11="                    \
544         cp1136                  \
545         omap2420h4              \
546         apollon                 \
547         imx31_litekit           \
548         imx31_phycore           \
549         imx31_phycore_eet       \
550         mx31ads                 \
551         qong                    \
552         smdk6400                \
553 "
554
555 #########################################################################
556 ## ARM Cortex-A8 Systems
557 #########################################################################
558 LIST_ARM_CORTEX_A8="            \
559         omap3_beagle            \
560         omap3_overo             \
561         omap3_evm               \
562         omap3_pandora           \
563         omap3_zoom1             \
564 "
565
566 #########################################################################
567 ## AT91 Systems
568 #########################################################################
569
570 LIST_at91="             \
571         afeb9260        \
572         at91cap9adk     \
573         at91rm9200dk    \
574         at91sam9260ek   \
575         at91sam9261ek   \
576         at91sam9263ek   \
577         at91sam9g20ek   \
578         at91sam9rlek    \
579         cmc_pu2         \
580         csb637          \
581         kb9202          \
582         mp2usb          \
583         m501sk          \
584 "
585
586 #########################################################################
587 ## Xscale Systems
588 #########################################################################
589
590 LIST_pxa="              \
591         cerf250         \
592         cradle          \
593         csb226          \
594         delta           \
595         innokom         \
596         lubbock         \
597         pleb2           \
598         pxa255_idp      \
599         wepep250        \
600         xaeniax         \
601         xm250           \
602         xsengine        \
603         zylonite        \
604 "
605
606 LIST_ixp="              \
607         actux1          \
608         actux2          \
609         actux3          \
610         actux4          \
611         ixdp425         \
612         ixdpg425        \
613         pdnb3           \
614         scpu            \
615 "
616
617 #########################################################################
618 ## ARM groups
619 #########################################################################
620
621 LIST_arm="                      \
622         ${LIST_SA}              \
623         ${LIST_ARM7}            \
624         ${LIST_ARM9}            \
625         ${LIST_ARM10}           \
626         ${LIST_ARM11}           \
627         ${LIST_ARM_CORTEX_A8}   \
628         ${LIST_at91}            \
629         ${LIST_pxa}             \
630         ${LIST_ixp}             \
631 "
632
633 #########################################################################
634 ## MIPS Systems         (default = big endian)
635 #########################################################################
636
637 LIST_mips4kc="          \
638         incaip          \
639         qemu_mips       \
640         vct_platinum    \
641         vct_platinum_small      \
642         vct_platinum_onenand    \
643         vct_platinum_onenand_small      \
644         vct_platinumavc \
645         vct_platinumavc_small   \
646         vct_platinumavc_onenand \
647         vct_platinumavc_onenand_small   \
648         vct_premium     \
649         vct_premium_small       \
650         vct_premium_onenand     \
651         vct_premium_onenand_small       \
652 "
653
654 LIST_mips5kc="          \
655         purple          \
656 "
657
658 LIST_au1xx0="           \
659         dbau1000        \
660         dbau1100        \
661         dbau1500        \
662         dbau1550        \
663         dbau1550_el     \
664         gth2            \
665 "
666
667 LIST_mips="             \
668         ${LIST_mips4kc} \
669         ${LIST_mips5kc} \
670         ${LIST_au1xx0}  \
671 "
672
673 #########################################################################
674 ## MIPS Systems         (little endian)
675 #########################################################################
676
677 LIST_mips4kc_el=""
678
679 LIST_mips5kc_el=""
680
681 LIST_au1xx0_el="        \
682         dbau1550_el     \
683         pb1000          \
684 "
685
686 LIST_mips_el="                  \
687         ${LIST_mips4kc_el}      \
688         ${LIST_mips5kc_el}      \
689         ${LIST_au1xx0_el}       \
690 "
691
692 #########################################################################
693 ## i386 Systems
694 #########################################################################
695
696 LIST_I486="             \
697         sc520_cdp       \
698         sc520_eNET      \
699         sc520_spunk     \
700         sc520_spunk_rel \
701 "
702
703 LIST_x86="              \
704         ${LIST_I486}    \
705 "
706
707 #########################################################################
708 ## NIOS Systems
709 #########################################################################
710
711 LIST_nios="                     \
712         ADNPESC1                \
713         ADNPESC1_base_32        \
714         ADNPESC1_DNPEVA2_base_32\
715         DK1C20                  \
716         DK1C20_standard_32      \
717         DK1S10                  \
718         DK1S10_standard_32      \
719         DK1S10_mtx_ldk_20       \
720 "
721
722 #########################################################################
723 ## Nios-II Systems
724 #########################################################################
725
726 LIST_nios2="            \
727         EP1C20          \
728         EP1S10          \
729         EP1S40          \
730         PCI5441         \
731         PK1C20          \
732 "
733
734 #########################################################################
735 ## MicroBlaze Systems
736 #########################################################################
737
738 LIST_microblaze="                       \
739         microblaze-generic              \
740         suzaku                          \
741 "
742
743 #########################################################################
744 ## ColdFire Systems
745 #########################################################################
746
747 LIST_coldfire="                 \
748         cobra5272               \
749         EB+MCF-EV123            \
750         EB+MCF-EV123_internal   \
751         idmr                    \
752         M52277EVB               \
753         M5235EVB                \
754         M5249EVB                \
755         M5253DEMO               \
756         M5253EVBE               \
757         M5271EVB                \
758         M5272C3                 \
759         M5275EVB                \
760         M5282EVB                \
761         M53017EVB               \
762         M5329AFEE               \
763         M5373EVB                \
764         M54451EVB               \
765         M54455EVB               \
766         M5475AFE                \
767         M5485AFE                \
768         TASREG                  \
769 "
770
771 #########################################################################
772 ## AVR32 Systems
773 #########################################################################
774
775 LIST_avr32="            \
776         atstk1002       \
777         atstk1003       \
778         atstk1004       \
779         atstk1006       \
780         atngw100        \
781         favr-32-ezkit   \
782         hammerhead      \
783         mimc200         \
784 "
785
786 #########################################################################
787 ## Blackfin Systems
788 #########################################################################
789
790 LIST_blackfin="         \
791         bf533-ezkit     \
792         bf533-stamp     \
793         bf537-stamp     \
794         bf561-ezkit     \
795 "
796
797 #########################################################################
798 ## SH Systems
799 #########################################################################
800
801 LIST_sh2="              \
802         rsk7203         \
803 "
804 LIST_sh3="              \
805         mpr2            \
806         ms7720se        \
807 "
808
809 LIST_sh4="              \
810         ms7750se        \
811         ms7722se        \
812         MigoR           \
813         r7780mp         \
814         r2dplus         \
815         sh7763rdp       \
816         sh7785lcr       \
817         ap325rxa        \
818 "
819
820 LIST_sh="               \
821         ${LIST_sh2}     \
822         ${LIST_sh3}     \
823         ${LIST_sh4}     \
824 "
825
826 #########################################################################
827 ## SPARC Systems
828 #########################################################################
829
830 LIST_sparc="gr_xc3s_1500        gr_cpci_ax2000  gr_ep2s60       grsim   grsim_leon2"
831
832 #-----------------------------------------------------------------------
833
834 #----- for now, just run PPC by default -----
835 [ $# = 0 ] && set $LIST_ppc
836
837 #-----------------------------------------------------------------------
838
839 build_target() {
840         target=$1
841
842         ${MAKE} distclean >/dev/null
843         ${MAKE} ${target}_config
844
845         ${MAKE} ${JOBS} all 2>&1 >${LOG_DIR}/$target.MAKELOG \
846                                 | tee ${LOG_DIR}/$target.ERR
847
848         ${CROSS_COMPILE}size ${BUILD_DIR}/u-boot \
849                                 | tee -a ${LOG_DIR}/$target.MAKELOG
850 }
851
852 #-----------------------------------------------------------------------
853
854
855 for arg in $@
856 do
857         case "$arg" in
858         arm|SA|ARM7|ARM9|ARM10|ARM11|ARM_CORTEX_A8|at91|ixp|pxa \
859         |avr32 \
860         |blackfin \
861         |coldfire \
862         |microblaze \
863         |mips|mips_el \
864         |nios|nios2 \
865         |ppc|5xx|5xxx|512x|8xx|8220|824x|8260|83xx|85xx|86xx|4xx|7xx|74xx|TSEC \
866         |sh|sh2|sh3|sh4 \
867         |sparc \
868         |x86|I486 \
869         )
870                         for target in `eval echo '$LIST_'${arg}`
871                         do
872                                 build_target ${target}
873                         done
874                         ;;
875         *)              build_target ${arg}
876                         ;;
877         esac
878 done