# MA 02111-1307 USA
#
-VERSION = 2010
-PATCHLEVEL = 12
+VERSION = 2011
+PATCHLEVEL = 03
SUBLEVEL =
-EXTRAVERSION = -rc3
+EXTRAVERSION =
ifneq "$(SUBLEVEL)" ""
U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
else
LIBS += drivers/rtc/librtc.o
LIBS += drivers/serial/libserial.o
LIBS += drivers/twserial/libtws.o
+LIBS += drivers/usb/eth/libusb_eth.a
LIBS += drivers/usb/gadget/libusb_gadget.o
LIBS += drivers/usb/host/libusb_host.o
LIBS += drivers/usb/musb/libusb_musb.o
$(shell $(LD) --version | \
sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p')
-ifeq ($(CONFIG_NAND_U_BOOT),y)
-NAND_SPL = nand_spl
-U_BOOT_NAND = $(obj)u-boot-nand.bin
-endif
-
-ifeq ($(CONFIG_ONENAND_U_BOOT),y)
-ONENAND_IPL = onenand_ipl
-U_BOOT_ONENAND = $(obj)u-boot-onenand.bin
-ONENAND_BIN ?= $(obj)onenand_ipl/onenand-ipl-2k.bin
-endif
-
__OBJS := $(subst $(obj),,$(OBJS))
__LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD))
endif
# Always append ALL so that arch config.mk's can add custom ones
-ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND) $(U_BOOT_ONENAND)
+ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map
+
+ifeq ($(CONFIG_NAND_U_BOOT),y)
+ALL += $(obj)u-boot-nand.bin
+endif
+
+ifeq ($(CONFIG_ONENAND_U_BOOT),y)
+ALL += $(obj)u-boot-onenand.bin
+ONENAND_BIN ?= $(obj)onenand_ipl/onenand-ipl-2k.bin
+endif
all: $(ALL)
GEN_UBOOT = \
UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
sed -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
- cd $(LNDIR) && $(LD) $(LDFLAGS) $$UNDEF_SYM $(__OBJS) \
+ cd $(LNDIR) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) $$UNDEF_SYM $(__OBJS) \
--start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
-Map u-boot.map -o u-boot
$(obj)u-boot: depend \
$(obj)u-boot.lds: $(LDSCRIPT)
$(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
-$(NAND_SPL): $(TIMESTAMP_FILE) $(VERSION_FILE) depend
+nand_spl: $(TIMESTAMP_FILE) $(VERSION_FILE) depend
$(MAKE) -C nand_spl/board/$(BOARDDIR) all
-$(U_BOOT_NAND): $(NAND_SPL) $(obj)u-boot.bin
+$(obj)u-boot-nand.bin: nand_spl $(obj)u-boot.bin
cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin
-$(ONENAND_IPL): $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
+onenand_ipl: $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
$(MAKE) -C onenand_ipl/board/$(BOARDDIR) all
-$(U_BOOT_ONENAND): $(ONENAND_IPL) $(obj)u-boot.bin
+$(obj)u-boot-onenand.bin: onenand_ipl $(obj)u-boot.bin
cat $(ONENAND_BIN) $(obj)u-boot.bin > $(obj)u-boot-onenand.bin
$(VERSION_FILE):
- @( printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' "$(U_BOOT_VERSION)" \
- '$(shell $(TOPDIR)/tools/setlocalversion $(TOPDIR))' ) > $@.tmp
+ @( localvers='$(shell $(TOPDIR)/tools/setlocalversion $(TOPDIR))' ; \
+ printf '#define PLAIN_VERSION "%s%s"\n' \
+ "$(U_BOOT_VERSION)" "$${localvers}" ; \
+ printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' \
+ "$(U_BOOT_VERSION)" "$${localvers}" ; \
+ ) > $@.tmp
+ @( printf '#define CC_VERSION_STRING "%s"\n' \
+ '$(shell $(CC) --version | head -n 1)' )>> $@.tmp
+ @( printf '#define LD_VERSION_STRING "%s"\n' \
+ '$(shell $(LD) -v | head -n 1)' )>> $@.tmp
@cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
$(TIMESTAMP_FILE):
%_config:: unconfig
@$(MKCONFIG) -A $(@:_config=)
-sinclude .boards.depend
-.boards.depend: boards.cfg
+sinclude $(obj).boards.depend
+$(obj).boards.depend: boards.cfg
awk '(NF && $$1 !~ /^#/) { print $$1 ": " $$1 "_config; $$(MAKE)" }' $< > $@
#
@echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk
#========================================================================
-# MIPS
-#========================================================================
-#########################################################################
-## MIPS32 4Kc
-#########################################################################
-
-incaip_100MHz_config \
-incaip_133MHz_config \
-incaip_150MHz_config \
-incaip_config: unconfig
- @mkdir -p $(obj)include
- @[ -z "$(findstring _100MHz,$@)" ] || \
- echo "#define CPU_CLOCK_RATE 100000000" >>$(obj)include/config.h
- @[ -z "$(findstring _133MHz,$@)" ] || \
- echo "#define CPU_CLOCK_RATE 133000000" >>$(obj)include/config.h
- @[ -z "$(findstring _150MHz,$@)" ] || \
- echo "#define CPU_CLOCK_RATE 150000000" >>$(obj)include/config.h
- @$(MKCONFIG) -n $@ -a incaip mips mips incaip
-
-vct_premium_config \
-vct_premium_small_config \
-vct_premium_onenand_config \
-vct_premium_onenand_small_config \
-vct_platinum_config \
-vct_platinum_small_config \
-vct_platinum_onenand_config \
-vct_platinum_onenand_small_config \
-vct_platinumavc_config \
-vct_platinumavc_small_config \
-vct_platinumavc_onenand_config \
-vct_platinumavc_onenand_small_config: unconfig
- @mkdir -p $(obj)include
- @[ -z "$(findstring _premium,$@)" ] || \
- echo "#define CONFIG_VCT_PREMIUM" > $(obj)include/config.h
- @[ -z "$(findstring _platinum_,$@)" ] || \
- echo "#define CONFIG_VCT_PLATINUM" > $(obj)include/config.h
- @[ -z "$(findstring _platinumavc,$@)" ] || \
- echo "#define CONFIG_VCT_PLATINUMAVC" > $(obj)include/config.h
- @[ -z "$(findstring _onenand,$@)" ] || \
- echo "#define CONFIG_VCT_ONENAND" >> $(obj)include/config.h
- @[ -z "$(findstring _small,$@)" ] || \
- echo "#define CONFIG_VCT_SMALL_IMAGE" >> $(obj)include/config.h
- @$(MKCONFIG) -n $@ -a vct mips mips vct micronas
-
-#########################################################################
-## MIPS32 AU1X00
-#########################################################################
-
-dbau1000_config : unconfig
- @mkdir -p $(obj)include
- @echo "#define CONFIG_DBAU1000 1" >$(obj)include/config.h
- @$(MKCONFIG) -a dbau1x00 mips mips dbau1x00
-
-dbau1100_config : unconfig
- @mkdir -p $(obj)include
- @echo "#define CONFIG_DBAU1100 1" >$(obj)include/config.h
- @$(MKCONFIG) -a dbau1x00 mips mips dbau1x00
-
-dbau1500_config : unconfig
- @mkdir -p $(obj)include
- @echo "#define CONFIG_DBAU1500 1" >$(obj)include/config.h
- @$(MKCONFIG) -a dbau1x00 mips mips dbau1x00
-
-dbau1550_config : unconfig
- @mkdir -p $(obj)include
- @echo "#define CONFIG_DBAU1550 1" >$(obj)include/config.h
- @$(MKCONFIG) -a dbau1x00 mips mips dbau1x00
-
-dbau1550_el_config : unconfig
- @mkdir -p $(obj)include
- @echo "#define CONFIG_DBAU1550 1" >$(obj)include/config.h
- @$(MKCONFIG) -a dbau1x00 mips mips dbau1x00
-
-gth2_config : unconfig
- @mkdir -p $(obj)include
- @echo "#define CONFIG_GTH2 1" >$(obj)include/config.h
- @$(MKCONFIG) -a $@ mips mips gth2
-
-pb1000_config : unconfig
- @mkdir -p $(obj)include
- @echo "#define CONFIG_PB1000 1" >$(obj)include/config.h
- @$(MKCONFIG) -a pb1x00 mips mips pb1x00
-
-qemu_mips_config : unconfig
- @mkdir -p $(obj)include
- @echo "#define CONFIG_QEMU_MIPS 1" >$(obj)include/config.h
- @$(MKCONFIG) -a qemu-mips mips mips qemu-mips
-
-#========================================================================
# Nios
#========================================================================
@rm -f $(obj)u-boot.imx
@rm -f $(obj)tools/{env/crc32.c,inca-swap-bytes}
@rm -f $(obj)arch/powerpc/cpu/mpc824x/bedbug_603e.c
- @rm -f $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm
+ @rm -fr $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm
@rm -fr $(obj)include/generated
@[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name "*" -type l -print | xargs rm -f
@[ ! -d $(obj)onenand_ipl ] || find $(obj)onenand_ipl -name "*" -type l -print | xargs rm -f