diff options
author | Marian Balakowicz <m8@semihalf.com> | 2008-02-21 17:18:01 +0100 |
---|---|---|
committer | Marian Balakowicz <m8@semihalf.com> | 2008-02-21 17:18:01 +0100 |
commit | 20c93959330aba8b5bbdbfde1ef319e99eba235d (patch) | |
tree | ef82297e3aeb904f94584e6d136fac55ec32c317 /Makefile | |
parent | 5cf746c303710329f8040d9c62ee354313e3e91f (diff) | |
parent | 928d1d77f8623c120d8763e20e1ca58df9c5c4c6 (diff) | |
download | u-boot-imx-20c93959330aba8b5bbdbfde1ef319e99eba235d.zip u-boot-imx-20c93959330aba8b5bbdbfde1ef319e99eba235d.tar.gz u-boot-imx-20c93959330aba8b5bbdbfde1ef319e99eba235d.tar.bz2 |
Merge branch 'master' of /home/git/u-boot
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 107 |
1 files changed, 58 insertions, 49 deletions
@@ -23,8 +23,8 @@ VERSION = 1 PATCHLEVEL = 3 -SUBLEVEL = 1 -EXTRAVERSION = +SUBLEVEL = 2 +EXTRAVERSION = -rc1 U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) VERSION_FILE = $(obj)include/version_autogenerated.h @@ -185,18 +185,6 @@ endif ifeq ($(CPU),mpc85xx) OBJS += cpu/$(CPU)/resetvec.o endif -ifeq ($(CPU),bf533) -OBJS += cpu/$(CPU)/start1.o cpu/$(CPU)/interrupt.o cpu/$(CPU)/cache.o -OBJS += cpu/$(CPU)/flush.o cpu/$(CPU)/init_sdram.o -endif -ifeq ($(CPU),bf537) -OBJS += cpu/$(CPU)/start1.o cpu/$(CPU)/interrupt.o cpu/$(CPU)/cache.o -OBJS += cpu/$(CPU)/flush.o cpu/$(CPU)/init_sdram.o -endif -ifeq ($(CPU),bf561) -OBJS += cpu/$(CPU)/start1.o cpu/$(CPU)/interrupt.o cpu/$(CPU)/cache.o -OBJS += cpu/$(CPU)/flush.o cpu/$(CPU)/init_sdram.o -endif OBJS := $(addprefix $(obj),$(OBJS)) @@ -253,9 +241,7 @@ LIBS += $(shell if [ -d post/board/$(BOARDDIR) ]; then echo \ "post/board/$(BOARDDIR)/libpost$(BOARD).a"; fi) LIBS += common/libcommon.a LIBS += libfdt/libfdt.a -ifeq ($(CONFIG_API),y) LIBS += api/libapi.a -endif LIBS := $(addprefix $(obj),$(LIBS)) .PHONY : $(LIBS) @@ -266,11 +252,8 @@ PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) - # The "tools" are needed early, so put this first # Don't include stuff already done in $(LIBS) SUBDIRS = tools \ - examples - -ifeq ($(CONFIG_API),y) -SUBDIRS += api_examples -endif + examples \ + api_examples .PHONY : $(SUBDIRS) @@ -279,13 +262,21 @@ 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 +endif + __OBJS := $(subst $(obj),,$(OBJS)) __LIBS := $(subst $(obj),,$(LIBS)) ######################################################################### ######################################################################### -ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND) +ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND) $(U_BOOT_ONENAND) +ifeq ($(ARCH),blackfin) +ALL += $(obj)u-boot.ldr +endif all: $(ALL) @@ -298,6 +289,15 @@ $(obj)u-boot.srec: $(obj)u-boot $(obj)u-boot.bin: $(obj)u-boot $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ +$(obj)u-boot.ldr: $(obj)u-boot + $(LDR) -T $(CONFIG_BFIN_CPU) -f -c $@ $< $(LDR_FLAGS) + +$(obj)u-boot.ldr.hex: $(obj)u-boot.ldr + $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ -I binary + +$(obj)u-boot.ldr.srec: $(obj)u-boot.ldr + $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ -I binary + $(obj)u-boot.img: $(obj)u-boot.bin ./tools/mkimage -A $(ARCH) -T firmware -C none \ -a $(TEXT_BASE) -e 0 \ @@ -312,18 +312,18 @@ $(obj)u-boot.dis: $(obj)u-boot $(OBJDUMP) -d $< > $@ $(obj)u-boot: depend $(SUBDIRS) $(OBJS) $(LIBS) $(LDSCRIPT) - UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\ + UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) |sed -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\ cd $(LNDIR) && $(LD) $(LDFLAGS) $$UNDEF_SYM $(__OBJS) \ --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \ -Map u-boot.map -o u-boot -$(OBJS): $(obj)include/autoconf.mk +$(OBJS): depend $(obj)include/autoconf.mk $(MAKE) -C cpu/$(CPU) $(if $(REMOTE_BUILD),$@,$(notdir $@)) -$(LIBS): $(obj)include/autoconf.mk +$(LIBS): depend $(obj)include/autoconf.mk $(MAKE) -C $(dir $(subst $(obj),,$@)) -$(SUBDIRS): $(obj)include/autoconf.mk +$(SUBDIRS): depend $(obj)include/autoconf.mk $(MAKE) -C $@ all $(NAND_SPL): $(VERSION_FILE) $(obj)include/autoconf.mk @@ -332,12 +332,19 @@ $(NAND_SPL): $(VERSION_FILE) $(obj)include/autoconf.mk $(U_BOOT_NAND): $(NAND_SPL) $(obj)u-boot.bin $(obj)include/autoconf.mk cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin +$(ONENAND_IPL): $(VERSION_FILE) $(obj)include/autoconf.mk + $(MAKE) -C onenand_ipl/board/$(BOARDDIR) all + +$(U_BOOT_ONENAND): $(ONENAND_IPL) $(obj)u-boot.bin $(obj)include/autoconf.mk + cat $(obj)onenand_ipl/onenand-ipl-2k.bin $(obj)u-boot.bin > $(obj)u-boot-onenand.bin + $(VERSION_FILE): @( echo -n "#define U_BOOT_VERSION \"U-Boot " ; \ echo -n "$(U_BOOT_VERSION)" ; \ echo -n $(shell $(CONFIG_SHELL) $(TOPDIR)/tools/setlocalversion \ $(TOPDIR)) ; \ - echo "\"" ) > $(VERSION_FILE) + echo "\"" ) > $@.tmp + @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@ gdbtools: $(MAKE) -C tools/gdb all || exit 1 @@ -1225,9 +1232,11 @@ G2000_config: unconfig @$(MKCONFIG) $(@:_config=) ppc ppc4xx g2000 hcu4_config: unconfig + @mkdir -p $(obj)board/netstal/common @$(MKCONFIG) $(@:_config=) ppc ppc4xx hcu4 netstal hcu5_config: unconfig + @mkdir -p $(obj)board/netstal/common @$(MKCONFIG) $(@:_config=) ppc ppc4xx hcu5 netstal HH405_config: unconfig @@ -2301,8 +2310,11 @@ xtract_omap1610xxx = $(subst _cs0boot,,$(subst _cs3boot,,$(subst _cs_autoboot,,$ xtract_omap730p2 = $(subst _cs0boot,,$(subst _cs3boot,, $(subst _config,,$1))) +at91cap9adk_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs at91cap9adk atmel at91cap9 + at91rm9200dk_config : unconfig - @$(MKCONFIG) $(@:_config=) arm arm920t at91rm9200dk NULL at91rm9200 + @$(MKCONFIG) $(@:_config=) arm arm920t at91rm9200dk atmel at91rm9200 cmc_pu2_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm920t cmc_pu2 NULL at91rm9200 @@ -2313,6 +2325,8 @@ csb637_config : unconfig mp2usb_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm920t mp2usb NULL at91rm9200 +m501sk_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm920t m501sk NULL at91rm9200 ######################################################################## ## ARM Integrator boards - see doc/README-integrator for more info. @@ -2353,17 +2367,8 @@ mx1ads_config : unconfig mx1fs2_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm920t mx1fs2 NULL imx -netstar_32_config \ netstar_config: unconfig - @mkdir -p $(obj)include - @if [ "$(findstring _32_,$@)" ] ; then \ - $(XECHO) "... 32MB SDRAM" ; \ - echo "#define PHYS_SDRAM_1_SIZE SZ_32M" >>$(obj)include/config.h ; \ - else \ - $(XECHO) "... 64MB SDRAM" ; \ - echo "#define PHYS_SDRAM_1_SIZE SZ_64M" >>$(obj)include/config.h ; \ - fi - @$(MKCONFIG) -a netstar arm arm925t netstar + @$(MKCONFIG) $(@:_config=) arm arm925t netstar omap1510inn_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm925t omap1510inn @@ -2602,7 +2607,9 @@ omap2420h4_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm1136 omap2420h4 apollon_config : unconfig + @echo "#define CONFIG_ONENAND_U_BOOT" > $(obj)include/config.h @$(MKCONFIG) $(@:_config=) arm arm1136 apollon + @echo "CONFIG_ONENAND_U_BOOT = y" >> $(obj)include/config.mk #======================================================================== # i386 @@ -2815,20 +2822,19 @@ xupv2p_config: unconfig @echo "#define CONFIG_XUPV2P 1" >> $(obj)include/config.h @$(MKCONFIG) -a $(@:_config=) microblaze microblaze xupv2p xilinx -######################################################################### -## Blackfin -######################################################################### -bf533-ezkit_config: unconfig - @$(MKCONFIG) $(@:_config=) blackfin bf533 bf533-ezkit +#======================================================================== +# Blackfin +#======================================================================== -bf533-stamp_config: unconfig - @$(MKCONFIG) $(@:_config=) blackfin bf533 bf533-stamp +# Analog Devices boards +BFIN_BOARDS = bf533-ezkit bf533-stamp bf537-stamp bf561-ezkit -bf537-stamp_config: unconfig - @$(MKCONFIG) $(@:_config=) blackfin bf537 bf537-stamp +$(BFIN_BOARDS:%=%_config) : unconfig + @$(MKCONFIG) $(@:_config=) blackfin $(firstword $(subst -, ,$@)) $(@:_config=) -bf561-ezkit_config: unconfig - @$(MKCONFIG) $(@:_config=) blackfin bf561 bf561-ezkit +$(BFIN_BOARDS): + $(MAKE) $@_config + $(MAKE) #======================================================================== # AVR32 @@ -2903,6 +2909,8 @@ clean: @rm -f $(obj)board/bf537-stamp/u-boot.lds $(obj)board/bf561-ezkit/u-boot.lds @rm -f $(obj)include/bmp_logo.h @rm -f $(obj)nand_spl/u-boot-spl $(obj)nand_spl/u-boot-spl.map + @rm -f $(obj)onenand_ipl/onenand-ipl $(obj)onenand_ipl/onenand-ipl.bin \ + $(obj)onenand_ipl/onenand-ipl-2k.bin $(obj)onenand_ipl/onenand-ipl.map @rm -f $(obj)api_examples/demo $(VERSION_FILE) clobber: clean @@ -2918,6 +2926,7 @@ clobber: clean @rm -f $(obj)tools/inca-swap-bytes $(obj)cpu/mpc824x/bedbug_603e.c @rm -f $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm @[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -lname "*" -print | xargs rm -f + @[ ! -d $(obj)onenand_ipl ] || find $(obj)onenand_ipl -lname "*" -print | xargs rm -f @[ ! -d $(obj)api_examples ] || find $(obj)api_examples -lname "*" -print | xargs rm -f ifeq ($(OBJTREE),$(SRCTREE)) |