]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - Makefile
* Patch by Sam Song, 11 October 2004:
[karo-tx-uboot.git] / Makefile
index 26dddb9a202a86e8104dbe57afe8ca9df83b9eca..363f1c53250d43eac7758828f783e9fd0b5fc557 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -45,7 +45,7 @@ export        TOPDIR
 ifeq (include/config.mk,$(wildcard include/config.mk))
 # load ARCH, BOARD, and CPU configuration
 include include/config.mk
-export ARCH CPU BOARD VENDOR
+export ARCH CPU BOARD VENDOR SOC
 # load other configuration
 include $(TOPDIR)/config.mk
 
@@ -72,6 +72,9 @@ endif
 ifeq ($(ARCH),nios)
 CROSS_COMPILE = nios-elf-
 endif
+ifeq ($(ARCH),nios2)
+CROSS_COMPILE = nios2-elf-
+endif
 ifeq ($(ARCH),m68k)
 CROSS_COMPILE = m68k-elf-
 endif
@@ -101,9 +104,12 @@ endif
 LIBS  = lib_generic/libgeneric.a
 LIBS += board/$(BOARDDIR)/lib$(BOARD).a
 LIBS += cpu/$(CPU)/lib$(CPU).a
+ifdef SOC
+LIBS += cpu/$(CPU)/$(SOC)/lib$(SOC).a
+endif
 LIBS += lib_$(ARCH)/lib$(ARCH).a
 LIBS += fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a \
-       fs/reiserfs/libreiserfs.a
+       fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a
 LIBS += net/libnet.a
 LIBS += disk/libdisk.a
 LIBS += rtc/librtc.a
@@ -133,6 +139,9 @@ ALL = u-boot.srec u-boot.bin System.map
 
 all:           $(ALL)
 
+u-boot.hex:    u-boot
+               $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@
+
 u-boot.srec:   u-boot
                $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@
 
@@ -176,6 +185,9 @@ tags:
 
 etags:
                etags -a `find $(SUBDIRS) include \
+                               lib_generic board/$(BOARDDIR) cpu/$(CPU) lib_$(ARCH) \
+                               fs/cramfs fs/fat fs/fdos fs/jffs2 \
+                               net disk rtc dtt drivers drivers/sk98lin common \
                        \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
 
 System.map:    u-boot
@@ -249,11 +261,8 @@ icecube_5100_config:                       unconfig
                }
        @./mkconfig -a IceCube ppc mpc5xxx icecube
 
-MINI5200_config        \
-EVAL5200_config        \
-TOP5200_config:        unconfig
-       @ echo "#define CONFIG_$(@:_config=) 1" >include/config.h
-       @./mkconfig -a TOP5200 ppc mpc5xxx top5200 emk
+inka4x0_config:                unconfig
+       @./mkconfig inka4x0 ppc mpc5xxx inka4x0
 
 PM520_config \
 PM520_DDR_config \
@@ -270,6 +279,71 @@ PM520_ROMBOOT_DDR_config:  unconfig
                }
        @./mkconfig -a PM520 ppc mpc5xxx pm520
 
+MINI5200_config        \
+EVAL5200_config        \
+TOP5200_config:        unconfig
+       @ echo "#define CONFIG_$(@:_config=) 1" >include/config.h
+       @./mkconfig -a TOP5200 ppc mpc5xxx top5200 emk
+
+Total5100_config               \
+Total5200_config               \
+Total5200_lowboot_config       \
+Total5200_Rev2_config          \
+Total5200_Rev2_lowboot_config: unconfig
+       @ >include/config.h
+       @[ -z "$(findstring 5100,$@)" ] || \
+               { echo "#define CONFIG_MGT5100"         >>include/config.h ; \
+                 echo "... with MGT5100 processor" ; \
+               }
+       @[ -z "$(findstring 5200,$@)" ] || \
+               { echo "#define CONFIG_MPC5200"         >>include/config.h ; \
+                 echo "... with MPC5200 processor" ; \
+               }
+       @[ -n "$(findstring Rev,$@)" ] || \
+               { echo "#define CONFIG_TOTAL5200_REV 1" >>include/config.h ; \
+                 echo "... revision 1 board" ; \
+               }
+       @[ -z "$(findstring Rev2_,$@)" ] || \
+               { echo "#define CONFIG_TOTAL5200_REV 2" >>include/config.h ; \
+                 echo "... revision 2 board" ; \
+               }
+       @[ -z "$(findstring lowboot_,$@)" ] || \
+               { echo "TEXT_BASE = 0xFE000000" >board/total5200/config.tmp ; \
+                 echo "... with lowboot configuration" ; \
+               }
+       @./mkconfig -a Total5200 ppc mpc5xxx total5200
+
+TQM5200_auto_config            \
+TQM5200_AA_config      \
+TQM5200_AB_config      \
+TQM5200_AC_config      \
+MiniFAP_config:        unconfig
+       @ >include/config.h
+       @[ -z "$(findstring MiniFAP,$@)" ] || \
+               { echo "#define CONFIG_MINIFAP" >>include/config.h ; \
+                 echo "#define CONFIG_TQM5200_AC"      >>include/config.h ; \
+                 echo "... TQM5200_AC on MiniFAP" ; \
+               }
+       @[ -z "$(findstring AA,$@)" ] || \
+               { echo "#define CONFIG_TQM5200_AA"      >>include/config.h ; \
+                 echo "... with 4 MB Flash, 16 MB SDRAM, 32 kB EEPROM" ; \
+               }
+       @[ -z "$(findstring AB,$@)" ] || \
+               { echo "#define CONFIG_TQM5200_AB"      >>include/config.h ; \
+                 echo "... with 64 MB Flash, 64 MB SDRAM, 32 kB EEPROM, 512 kB SRAM" ; \
+                 echo "... with Graphics Controller"; \
+               }
+       @[ -z "$(findstring AC,$@)" ] || \
+               { echo "#define CONFIG_TQM5200_AC"      >>include/config.h ; \
+                 echo "... with 4 MB Flash, 128 MB SDRAM" ; \
+                 echo "... with Graphics Controller"; \
+               }
+       @[ -z "$(findstring auto,$@)" ] || \
+               { echo "#define CONFIG_CS_AUTOCONF"     >>include/config.h ; \
+                 echo "... with automatic CS configuration" ; \
+               }
+       @./mkconfig -a TQM5200 ppc mpc5xxx tqm5200
+
 #########################################################################
 ## MPC8xx Systems
 #########################################################################
@@ -478,6 +552,9 @@ NETTA2_config:              unconfig
                 }
        @./mkconfig -a $(call xtract_NETTA2,$@) ppc mpc8xx netta2
 
+NC650_config:  unconfig
+       @./mkconfig $(@:_config=) ppc mpc8xx nc650
+
 NX823_config:          unconfig
        @./mkconfig $(@:_config=) ppc mpc8xx nx823
 
@@ -493,6 +570,9 @@ QS823_config:       unconfig
 QS860T_config: unconfig
        @./mkconfig $(@:_config=) ppc mpc8xx qs860t snmc
 
+quantum_config:        unconfig
+       @./mkconfig $(@:_config=) ppc mpc8xx quantum
+
 R360MPI_config:        unconfig
        @./mkconfig $(@:_config=) ppc mpc8xx r360mpi
 
@@ -590,6 +670,9 @@ TTTech_config:      unconfig
        @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
        @./mkconfig -a TQM823L ppc mpc8xx tqm8xx
 
+uc100_config   :       unconfig
+       @./mkconfig $(@:_config=) ppc mpc8xx uc100
+
 v37_config:    unconfig
        @echo "#define CONFIG_LCD" >include/config.h
        @echo "#define CONFIG_SHARP_LQ084V1DG21" >>include/config.h
@@ -608,6 +691,9 @@ xtract_4xx = $(subst _25,,$(subst _33,,$(subst _BA,,$(subst _ME,,$(subst _HI,,$(
 ADCIOP_config: unconfig
        @./mkconfig $(@:_config=) ppc ppc4xx adciop esd
 
+APC405_config: unconfig
+       @./mkconfig $(@:_config=) ppc ppc4xx apc405 esd
+
 AR405_config:  unconfig
        @./mkconfig $(@:_config=) ppc ppc4xx ar405 esd
 
@@ -620,13 +706,24 @@ BUBINGA405EP_config:      unconfig
 CANBT_config:  unconfig
        @./mkconfig $(@:_config=) ppc ppc4xx canbt esd
 
-CATcenter_config:      unconfig
+CATcenter_config       \
+CATcenter_25_config    \
+CATcenter_33_config:   unconfig
        @ echo "/* CATcenter uses PPChameleon Model ME */"  > include/config.h
        @ echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 1" >> include/config.h
+       @[ -z "$(findstring _25,$@)" ] || \
+               { echo "#define CONFIG_PPCHAMELEON_CLK_25" >>include/config.h ; \
+                 echo "SysClk = 25MHz" ; \
+               }
+       @[ -z "$(findstring _33,$@)" ] || \
+               { echo "#define CONFIG_PPCHAMELEON_CLK_33" >>include/config.h ; \
+                 echo "SysClk = 33MHz" ; \
+               }
        @./mkconfig -a $(call xtract_4xx,$@) ppc ppc4xx PPChameleonEVB dave
 
 CPCI405_config \
 CPCI4052_config        \
+CPCI405DT_config       \
 CPCI405AB_config:      unconfig
        @./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd
        @echo "BOARD_REVISION = $(@:_config=)"  >>include/config.mk
@@ -664,6 +761,12 @@ ERIC_config:       unconfig
 EXBITGEN_config:       unconfig
        @./mkconfig $(@:_config=) ppc ppc4xx exbitgen
 
+G2000_config:  unconfig
+       @./mkconfig $(@:_config=) ppc ppc4xx g2000
+
+HH405_config:  unconfig
+       @./mkconfig $(@:_config=) ppc ppc4xx hh405 esd
+
 HUB405_config: unconfig
        @./mkconfig $(@:_config=) ppc ppc4xx hub405 esd
 
@@ -703,6 +806,7 @@ PLU405_config:      unconfig
 PMC405_config: unconfig
        @./mkconfig $(@:_config=) ppc ppc4xx pmc405 esd
 
+PPChameleonEVB_config          \
 PPChameleonEVB_BA_25_config    \
 PPChameleonEVB_ME_25_config    \
 PPChameleonEVB_HI_25_config    \
@@ -710,31 +814,34 @@ PPChameleonEVB_BA_33_config       \
 PPChameleonEVB_ME_33_config    \
 PPChameleonEVB_HI_33_config:   unconfig
        @ >include/config.h
-       @[ -z "$(findstring _MODEL_BA,$@)" ] || \
+       @[ -z "$(findstring EVB_BA,$@)" ] || \
                { echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 0" >>include/config.h ; \
                  echo "... BASIC model" ; \
                }
-       @[ -z "$(findstring _MODEL_ME,$@)" ] || \
+       @[ -z "$(findstring EVB_ME,$@)" ] || \
                { echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 1" >>include/config.h ; \
                  echo "... MEDIUM model" ; \
                }
-       @[ -z "$(findstring _MODEL_HI,$@)" ] || \
+       @[ -z "$(findstring EVB_HI,$@)" ] || \
                { echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 2" >>include/config.h ; \
                  echo "... HIGH-END model" ; \
                }
        @[ -z "$(findstring _25,$@)" ] || \
                { echo "#define CONFIG_PPCHAMELEON_CLK_25" >>include/config.h ; \
-                 echo " SysClk = 25MHz" ; \
+                 echo "SysClk = 25MHz" ; \
                }
        @[ -z "$(findstring _33,$@)" ] || \
                { echo "#define CONFIG_PPCHAMELEON_CLK_33" >>include/config.h ; \
-                 echo " SysClk = 33MHz" ; \
+                 echo "SysClk = 33MHz" ; \
                }
        @./mkconfig -a $(call xtract_4xx,$@) ppc ppc4xx PPChameleonEVB dave
 
 VOH405_config: unconfig
        @./mkconfig $(@:_config=) ppc ppc4xx voh405 esd
 
+VOM405_config: unconfig
+       @./mkconfig $(@:_config=) ppc ppc4xx vom405 esd
+
 W7OLMC_config  \
 W7OLMG_config: unconfig
        @./mkconfig $(@:_config=) ppc ppc4xx w7o
@@ -742,9 +849,21 @@ W7OLMG_config: unconfig
 WALNUT405_config:      unconfig
        @./mkconfig $(@:_config=) ppc ppc4xx walnut405
 
+WUH405_config: unconfig
+       @./mkconfig $(@:_config=) ppc ppc4xx wuh405 esd
+
 XPEDITE1K_config:      unconfig
        @./mkconfig $(@:_config=) ppc ppc4xx xpedite1k
 
+#########################################################################
+## MPC8220 Systems
+#########################################################################
+Alaska8220_config:     unconfig
+       @./mkconfig $(@:_config=) ppc mpc8220 alaska
+
+Yukon8220_config:      unconfig
+       @./mkconfig $(@:_config=) ppc mpc8220 yukon
+
 #########################################################################
 ## MPC824x Systems
 #########################################################################
@@ -799,12 +918,18 @@ Sandpoint8240_config: unconfig
 Sandpoint8245_config: unconfig
        @./mkconfig $(@:_config=) ppc mpc824x sandpoint
 
+sbc8240_config: unconfig
+       @./mkconfig $(@:_config=) ppc mpc824x sbc8240
+
 SL8245_config: unconfig
        @./mkconfig $(@:_config=) ppc mpc824x sl8245
 
 utx8245_config: unconfig
        @./mkconfig $(@:_config=) ppc mpc824x utx8245
 
+cobra5272_config :             unconfig
+       @./mkconfig $(@:_config=) m68k mcf52x2 cobra5272
+
 #########################################################################
 ## MPC8260 Systems
 #########################################################################
@@ -997,6 +1122,9 @@ M5272C3_config :           unconfig
 M5282EVB_config :              unconfig
        @./mkconfig $(@:_config=) m68k mcf52x2 m5282evb
 
+TASREG_config :                unconfig
+       @./mkconfig $(@:_config=) m68k mcf52x2 tasreg esd
+
 #########################################################################
 ## MPC85xx Systems
 #########################################################################
@@ -1007,6 +1135,36 @@ MPC8540ADS_config:       unconfig
 MPC8560ADS_config:     unconfig
        @./mkconfig $(@:_config=) ppc mpc85xx mpc8560ads
 
+MPC8541CDS_config:     unconfig
+       @./mkconfig $(@:_config=) ppc mpc85xx mpc8541cds cds
+
+MPC8555CDS_config:     unconfig
+       @./mkconfig $(@:_config=) ppc mpc85xx mpc8555cds cds
+
+sbc8540_config \
+sbc8540_33_config \
+sbc8540_66_config:     unconfig
+       @if [ "$(findstring _66_,$@)" ] ; then \
+               echo "#define CONFIG_PCI_66"    >>include/config.h ; \
+               echo "... 66 MHz PCI" ; \
+       else \
+               >include/config.h ; \
+               echo "... 33 MHz PCI" ; \
+       fi
+       @./mkconfig -a SBC8540 ppc mpc85xx sbc8560
+
+sbc8560_config \
+sbc8560_33_config \
+sbc8560_66_config:      unconfig
+       @if [ "$(findstring _66_,$@)" ] ; then \
+               echo "#define CONFIG_PCI_66"    >>include/config.h ; \
+               echo "... 66 MHz PCI" ; \
+       else \
+               >include/config.h ; \
+               echo "... 33 MHz PCI" ; \
+       fi
+       @./mkconfig -a sbc8560 ppc mpc85xx sbc8560
+
 stxgp3_config:         unconfig
        @./mkconfig $(@:_config=) ppc mpc85xx stxgp3
 
@@ -1020,6 +1178,9 @@ AmigaOneG3SE_config:      unconfig
 BAB7xx_config: unconfig
        @./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec
 
+CPCI750_config:        unconfig
+       @./mkconfig CPCI750 ppc 74xx_7xx cpci750 esd
+
 DB64360_config:  unconfig
        @./mkconfig DB64360 ppc 74xx_7xx db64360 Marvell
 
@@ -1075,16 +1236,22 @@ xtract_omap1610xxx = $(subst _cs0boot,,$(subst _cs3boot,,$(subst _cs_autoboot,,$
 
 xtract_omap730p2 = $(subst _cs0boot,,$(subst _cs3boot,, $(subst _config,,$1)))
 
-integratorcp_config :  unconfig
-       @./mkconfig $(@:_config=) arm arm926ejs integratorcp
-
 integratorap_config :  unconfig
        @./mkconfig $(@:_config=) arm arm926ejs integratorap
 
+integratorcp_config :  unconfig
+       @./mkconfig $(@:_config=) arm arm926ejs integratorcp
+
 lpd7a400_config \
 lpd7a404_config:       unconfig
        @./mkconfig $(@:_config=) arm lh7a40x lpd7a40x
 
+mx1ads_config  :       unconfig
+       @./mkconfig $(@:_config=) arm arm920t mx1ads NULL imx
+
+mx1fs2_config  :       unconfig
+       @./mkconfig $(@:_config=) arm arm920t mx1fs2 NULL imx
+
 omap1510inn_config :   unconfig
        @./mkconfig $(@:_config=) arm arm925t omap1510inn
 
@@ -1123,11 +1290,14 @@ omap730p2_cs3boot_config :      unconfig
        fi;
        @./mkconfig -a $(call xtract_omap730p2,$@) arm arm926ejs omap730p2
 
+scb9328_config :       unconfig
+       @./mkconfig $(@:_config=) arm arm920t scb9328 NULL imx
+
 smdk2400_config        :       unconfig
-       @./mkconfig $(@:_config=) arm arm920t smdk2400
+       @./mkconfig $(@:_config=) arm arm920t smdk2400 NULL s3c24x0
 
 smdk2410_config        :       unconfig
-       @./mkconfig $(@:_config=) arm arm920t smdk2410
+       @./mkconfig $(@:_config=) arm arm920t smdk2410 NULL s3c24x0
 
 SX1_config :           unconfig
        @./mkconfig $(@:_config=) arm arm925t sx1
@@ -1155,10 +1325,10 @@ trab_old_config:        unconfig
                  echo "... with 8 MB Flash, 16 MB RAM" ; \
                  echo "TEXT_BASE = 0x0CF40000" >board/trab/config.tmp ; \
                }
-       @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab
+       @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab NULL s3c24x0
 
 VCMA9_config   :       unconfig
-       @./mkconfig $(@:_config=) arm arm920t vcma9 mpl
+       @./mkconfig $(@:_config=) arm arm920t vcma9 mpl s3c24x0
 
 versatile_config :     unconfig
        @./mkconfig $(@:_config=) arm arm926ejs versatile
@@ -1170,13 +1340,6 @@ versatile_config :       unconfig
 B2_config      :       unconfig
        @./mkconfig $(@:_config=) arm s3c44b0 B2 dave
 
-#########################################################################
-## MC9328 (Dragonball) Systems
-#########################################################################
-
-mx1ads_config  :       unconfig
-       @./mkconfig $(@:_config=) arm mc9328 mx1ads
-
 #########################################################################
 ## ARM720T Systems
 #########################################################################
@@ -1200,10 +1363,16 @@ evb4510_config :        unconfig
 at91rm9200dk_config    :       unconfig
        @./mkconfig $(@:_config=) arm at91rm9200 at91rm9200dk
 
+cmc_pu2_config :       unconfig
+       @./mkconfig $(@:_config=) arm at91rm9200 cmc_pu2
+
 #########################################################################
 ## XScale Systems
 #########################################################################
 
+cerf250_config :       unconfig
+       @./mkconfig $(@:_config=) arm pxa cerf250
+
 cradle_config  :       unconfig
        @./mkconfig $(@:_config=) arm pxa cradle
 
@@ -1225,12 +1394,21 @@ logodl_config   :       unconfig
 wepep250_config        :       unconfig
        @./mkconfig $(@:_config=) arm pxa wepep250
 
+xaeniax_config :       unconfig
+       @./mkconfig $(@:_config=) arm pxa xaeniax
+
 xm250_config   :       unconfig
        @./mkconfig $(@:_config=) arm pxa xm250
 
 xsengine_config :      unconfig
        @./mkconfig $(@:_config=) arm pxa xsengine
 
+#########################################################################
+## ARM1136 Systems
+#########################################################################
+omap2420h4_config :    unconfig
+       @./mkconfig $(@:_config=) arm arm1136 omap2420h4
+
 #========================================================================
 # i386
 #========================================================================
@@ -1295,6 +1473,16 @@ dbau1500_config          :       unconfig
        @echo "#define CONFIG_DBAU1500 1" >>include/config.h
        @./mkconfig -a dbau1x00 mips mips dbau1x00
 
+dbau1550_config                :       unconfig
+       @ >include/config.h
+       @echo "#define CONFIG_DBAU1550 1" >>include/config.h
+       @./mkconfig -a dbau1x00 mips mips dbau1x00
+
+dbau1550_el_config     :       unconfig
+       @ >include/config.h
+       @echo "#define CONFIG_DBAU1550 1" >>include/config.h
+       @./mkconfig -a dbau1x00 mips mips dbau1x00 "" little
+
 #########################################################################
 ## MIPS64 5Kc
 #########################################################################
@@ -1368,6 +1556,15 @@ ADNPESC1_config: unconfig
                }
        @./mkconfig -a ADNPESC1 nios nios adnpesc1 ssv
 
+#########################################################################
+## Nios-II
+#########################################################################
+
+PK1C20_config : unconfig
+       @./mkconfig  PK1C20 nios2 nios2 pk1c20 psyent
+
+PCI5441_config : unconfig
+       @./mkconfig  PCI5441 nios2 nios2 pci5441 psyent
 
 #========================================================================
 # MicroBlaze
@@ -1392,7 +1589,7 @@ clean:
              examples/eepro100_eeprom examples/sched \
              examples/mem_to_mem_idma2intr examples/82559_eeprom
        rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr
-       rm -f tools/mpc86x_clk
+       rm -f tools/mpc86x_clk tools/ncb
        rm -f tools/easylogo/easylogo tools/bmp_logo
        rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
        rm -f tools/env/fw_printenv tools/env/fw_setenv
@@ -1406,7 +1603,7 @@ clobber:  clean
                | xargs -0 rm -f
        rm -f $(OBJS) *.bak tags TAGS
        rm -fr *.*~
-       rm -f u-boot u-boot.map $(ALL)
+       rm -f u-boot u-boot.map u-boot.hex $(ALL)
        rm -f tools/crc32.c tools/environment.c tools/env/crc32.c
        rm -f tools/inca-swap-bytes cpu/mpc824x/bedbug_603e.c
        rm -f include/asm/proc include/asm/arch include/asm