diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 50 |
1 files changed, 25 insertions, 25 deletions
@@ -241,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) @@ -254,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) @@ -267,13 +262,18 @@ 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 @@ -317,13 +317,13 @@ $(obj)u-boot: depend $(SUBDIRS) $(OBJS) $(LIBS) $(LDSCRIPT) --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 @@ -2467,20 +2474,8 @@ versatileab_config \ versatilepb_config : unconfig @board/versatile/split_by_variant.sh $@ -voiceblue_smallflash_config \ voiceblue_config: unconfig - @mkdir -p $(obj)include - @mkdir -p $(obj)board/voiceblue - @if [ "$(findstring _smallflash_,$@)" ] ; then \ - $(XECHO) "... boot from lower flash bank" ; \ - echo "#define VOICEBLUE_SMALL_FLASH" >>$(obj)include/config.h ; \ - echo "VOICEBLUE_SMALL_FLASH=y" >$(obj)board/voiceblue/config.tmp ; \ - else \ - $(XECHO) "... boot from upper flash bank" ; \ - >$(obj)include/config.h ; \ - echo "VOICEBLUE_SMALL_FLASH=n" >$(obj)board/voiceblue/config.tmp ; \ - fi - @$(MKCONFIG) -a voiceblue arm arm925t voiceblue + @$(MKCONFIG) $(@:_config=) arm arm925t voiceblue cm4008_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm920t cm4008 NULL ks8695 @@ -2614,7 +2609,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 @@ -2914,6 +2911,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 @@ -2928,6 +2927,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)) |