Erasing works too now. The CS don't care causes problem with READSTATUS,
[platform/kernel/u-boot.git] / Makefile
index 86cb6a8..26f5ae6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2000-2005
+# (C) Copyright 2000-2006
 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
 #
 # See file CREDITS for list of people who contributed to this
 # MA 02111-1307 USA
 #
 
+VERSION = 1
+PATCHLEVEL = 1
+SUBLEVEL = 4
+EXTRAVERSION =
+U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
+VERSION_FILE = include/version_autogenerated.h
+
 HOSTARCH := $(shell uname -m | \
        sed -e s/i.86/i386/ \
            -e s/sun4u/sparc64/ \
@@ -121,6 +128,7 @@ LIBS += drivers/libdrivers.a
 LIBS += drivers/sk98lin/libsk98lin.a
 LIBS += post/libpost.a post/cpu/libcpu.a
 LIBS += common/libcommon.a
+LIBS += $(BOARDLIBS)
 .PHONY : $(LIBS)
 
 # Add GCC lib
@@ -154,14 +162,14 @@ u-boot.bin:       u-boot
 u-boot.img:    u-boot.bin
                ./tools/mkimage -A $(ARCH) -T firmware -C none \
                -a $(TEXT_BASE) -e 0 \
-               -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' include/version.h | \
+               -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \
                        sed -e 's/"[     ]*$$/ for $(BOARD) board"/') \
                -d $< $@
 
 u-boot.dis:    u-boot
                $(OBJDUMP) -d $< > $@
 
-u-boot:                depend $(SUBDIRS) $(OBJS) $(LIBS) $(LDSCRIPT)
+u-boot:                depend version $(SUBDIRS) $(OBJS) $(LIBS) $(LDSCRIPT)
                UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) |sed  -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
                $(LD) $(LDFLAGS) $$UNDEF_SYM $(OBJS) \
                        --start-group $(LIBS) --end-group $(PLATFORM_LIBS) \
@@ -173,6 +181,13 @@ $(LIBS):
 $(SUBDIRS):
                $(MAKE) -C $@ all
 
+version:
+               @echo -n "#define U_BOOT_VERSION \"U-Boot " > $(VERSION_FILE); \
+               echo -n "$(U_BOOT_VERSION)" >> $(VERSION_FILE); \
+               echo -n $(shell $(CONFIG_SHELL) $(TOPDIR)/tools/setlocalversion \
+                        $(TOPDIR)) >> $(VERSION_FILE); \
+               echo "\"" >> $(VERSION_FILE)
+
 gdbtools:
                $(MAKE) -C tools/gdb || exit 1
 
@@ -193,6 +208,9 @@ etags:
                                net disk rtc dtt drivers drivers/sk98lin common \
                        \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
 
+ctags:
+               ctags -Re
+
 System.map:    u-boot
                @$(NM) $< | \
                grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
@@ -301,6 +319,14 @@ PM520_ROMBOOT_DDR_config:  unconfig
                }
        @./mkconfig -a PM520 ppc mpc5xxx pm520
 
+smmaco4_config: unconfig
+       @./mkconfig -a smmaco4 ppc mpc5xxx tqm5200
+
+spieval_config:        unconfig
+       echo "#define CONFIG_CS_AUTOCONF">>include/config.h
+       echo "... with automatic CS configuration"
+       @./mkconfig -a spieval ppc mpc5xxx tqm5200
+
 MINI5200_config        \
 EVAL5200_config        \
 TOP5200_config:        unconfig
@@ -366,11 +392,6 @@ MiniFAP_config:    unconfig
                }
        @./mkconfig -a TQM5200 ppc mpc5xxx tqm5200
 
-spieval_config:        unconfig
-       echo "#define CONFIG_CS_AUTOCONF">>include/config.h
-       echo "... with automatic CS configuration"
-       @./mkconfig -a spieval ppc mpc5xxx tqm5200
-
 #########################################################################
 ## MPC8xx Systems
 #########################################################################
@@ -721,6 +742,9 @@ xtract_4xx = $(subst _25,,$(subst _33,,$(subst _BA,,$(subst _ME,,$(subst _HI,,$(
 ADCIOP_config: unconfig
        @./mkconfig $(@:_config=) ppc ppc4xx adciop esd
 
+AP1000_config:unconfig
+       @./mkconfig $(@:_config=) ppc ppc4xx ap1000 amirix
+
 APC405_config: unconfig
        @./mkconfig $(@:_config=) ppc ppc4xx apc405 esd
 
@@ -812,6 +836,9 @@ JSE_config: unconfig
 KAREF_config: unconfig
        @./mkconfig $(@:_config=) ppc ppc4xx karef sandburst
 
+luan_config:   unconfig
+       @./mkconfig $(@:_config=) ppc ppc4xx luan amcc
+
 METROBOX_config: unconfig
        @./mkconfig $(@:_config=) ppc ppc4xx metrobox sandburst
 
@@ -836,6 +863,9 @@ OCRTC_config                \
 ORSG_config:   unconfig
        @./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd
 
+p3p440_config: unconfig
+       @./mkconfig $(@:_config=) ppc ppc4xx p3p440 prodrive
+
 PCI405_config: unconfig
        @./mkconfig $(@:_config=) ppc ppc4xx pci405 esd
 
@@ -891,6 +921,9 @@ VOH405_config:      unconfig
 VOM405_config: unconfig
        @./mkconfig $(@:_config=) ppc ppc4xx vom405 esd
 
+CMS700_config: unconfig
+       @./mkconfig $(@:_config=) ppc ppc4xx cms700 esd
+
 W7OLMC_config  \
 W7OLMG_config: unconfig
        @./mkconfig $(@:_config=) ppc ppc4xx w7o
@@ -990,9 +1023,6 @@ SL8245_config: unconfig
 utx8245_config: unconfig
        @./mkconfig $(@:_config=) ppc mpc824x utx8245
 
-cobra5272_config :             unconfig
-       @./mkconfig $(@:_config=) m68k mcf52x2 cobra5272
-
 #########################################################################
 ## MPC8260 Systems
 #########################################################################
@@ -1222,6 +1252,9 @@ ZPC1900_config: unconfig
 ## Coldfire
 #########################################################################
 
+cobra5272_config :             unconfig
+       @./mkconfig $(@:_config=) m68k mcf52x2 cobra5272
+
 M5272C3_config :               unconfig
        @./mkconfig $(@:_config=) m68k mcf52x2 m5272c3
 
@@ -1238,6 +1271,9 @@ TASREG_config :           unconfig
 MPC8349ADS_config:     unconfig
        @./mkconfig $(@:_config=) ppc mpc83xx mpc8349ads
 
+TQM834x_config:        unconfig
+       @./mkconfig $(@:_config=) ppc mpc83xx tqm834x
+
 #########################################################################
 ## MPC85xx Systems
 #########################################################################
@@ -1310,11 +1346,19 @@ sbc8560_66_config:      unconfig
 stxgp3_config:         unconfig
        @./mkconfig $(@:_config=) ppc mpc85xx stxgp3
 
-TQM8540_config:      unconfig
-       @./mkconfig $(@:_config=) ppc mpc85xx tqm8540
-
-TQM8560_config:      unconfig
-       @./mkconfig $(@:_config=) ppc mpc85xx tqm8560
+TQM8540_config         \
+TQM8541_config         \
+TQM8555_config         \
+TQM8560_config:                unconfig
+       @CTYPE=$(subst TQM,,$(@:_config=)); \
+       >include/config.h ; \
+       echo "... TQM"$${CTYPE}; \
+       echo "#define CONFIG_MPC$${CTYPE}">>include/config.h; \
+       echo "#define CONFIG_TQM$${CTYPE}">>include/config.h; \
+       echo "#define CONFIG_HOSTNAME tqm$${CTYPE}">>include/config.h; \
+       echo "#define CONFIG_BOARDNAME \"TQM$${CTYPE}\"">>include/config.h; \
+       echo "#define CFG_BOOTFILE \"bootfile=/tftpboot/tqm$${CTYPE}/uImage\0\"">>include/config.h
+       @./mkconfig -a TQM85xx ppc mpc85xx tqm85xx
 
 #########################################################################
 ## 74xx/7xx Systems
@@ -1436,6 +1480,17 @@ mx1ads_config    :       unconfig
 mx1fs2_config  :       unconfig
        @./mkconfig $(@:_config=) arm arm920t mx1fs2 NULL imx
 
+netstar_32_config      \
+netstar_config:                unconfig
+       @if [ "$(findstring _32_,$@)" ] ; then \
+               echo "... 32MB SDRAM" ; \
+               echo "#define PHYS_SDRAM_1_SIZE SZ_32M" >>include/config.h ; \
+       else \
+               echo "... 64MB SDRAM" ; \
+               echo "#define PHYS_SDRAM_1_SIZE SZ_64M" >>include/config.h ; \
+       fi
+       @./mkconfig -a netstar arm arm925t netstar
+
 omap1510inn_config :   unconfig
        @./mkconfig $(@:_config=) arm arm925t omap1510inn
 
@@ -1580,6 +1635,9 @@ cerf250_config :  unconfig
 cradle_config  :       unconfig
        @./mkconfig $(@:_config=) arm pxa cradle
 
+delta_config :
+       @./mkconfig $(@:_config=) arm pxa delta
+
 csb226_config  :       unconfig
        @./mkconfig $(@:_config=) arm pxa csb226
 
@@ -1595,6 +1653,9 @@ lubbock_config    :       unconfig
 logodl_config  :       unconfig
        @./mkconfig $(@:_config=) arm pxa logodl
 
+pxa255_idp_config:     unconfig
+       @./mkconfig $(@:_config=) arm pxa pxa255_idp
+
 wepep250_config        :       unconfig
        @./mkconfig $(@:_config=) arm pxa wepep250
 
@@ -1607,6 +1668,9 @@ xm250_config      :       unconfig
 xsengine_config :      unconfig
        @./mkconfig $(@:_config=) arm pxa xsengine
 
+zylonite_config :
+       @./mkconfig $(@:_config=) arm pxa zylonite
+
 #########################################################################
 ## ARM1136 Systems
 #########################################################################
@@ -1806,13 +1870,15 @@ clean:
        rm -f board/cray/L1/bootscript.c board/cray/L1/bootscript.image
        rm -f board/trab/trab_fkt board/voiceblue/eeprom
        rm -f board/integratorap/u-boot.lds board/integratorcp/u-boot.lds
+       rm -f u-boot.objdump-*
 
 clobber:       clean
        find . -type f \( -name .depend \
                -o -name '*.srec' -o -name '*.bin' -o -name u-boot.img \) \
                -print0 \
                | xargs -0 rm -f
-       rm -f $(OBJS) *.bak tags TAGS
+       rm -f $(OBJS) *.bak tags include/version_autogenerated.h
+
        rm -fr *.*~
        rm -f u-boot u-boot.map u-boot.hex $(ALL)
        rm -f tools/crc32.c tools/environment.c tools/env/crc32.c