]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - Makefile
README: fix arm920t/at91 path
[karo-tx-uboot.git] / Makefile
index 0707036699a2fe5bc5ae9ece1abd91a09d11afe3..e081c25cf4057086d27f5f7c9c500287fc479d88 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -375,7 +375,7 @@ $(obj)u-boot.ldr.srec:      $(obj)u-boot.ldr
 
 $(obj)u-boot.img:      $(obj)u-boot.bin
                $(obj)tools/mkimage -A $(ARCH) -T firmware -C none \
-               -a $(CONFIG_SYS_TEXT_BASE) -e 0 \
+               -O u-boot -a $(CONFIG_SYS_TEXT_BASE) -e 0 \
                -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \
                        sed -e 's/"[     ]*$$/ for $(BOARD) board"/') \
                -d $< $@
@@ -394,6 +394,10 @@ $(obj)u-boot.sha1: $(obj)u-boot.bin
 $(obj)u-boot.dis:      $(obj)u-boot
                $(OBJDUMP) -d $< > $@
 
+$(obj)u-boot.ubl:       $(obj)u-boot-nand.bin
+               $(obj)tools/mkimage -n $(UBL_CONFIG) -T ublimage \
+               -e $(CONFIG_SYS_TEXT_BASE) -d $< $@
+
 GEN_UBOOT = \
                UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
                sed  -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
@@ -468,15 +472,19 @@ TAG_SUBDIRS = $(SUBDIRS)
 TAG_SUBDIRS += $(dir $(__LIBS))
 TAG_SUBDIRS += include
 
+FIND := find
+FINDFLAGS := -L
+
 tags ctags:
-               ctags -w -o $(obj)ctags `find $(TAG_SUBDIRS) \
+               ctags -w -o $(obj)ctags `$(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) \
                                                -name '*.[chS]' -print`
 
 etags:
-               etags -a -o $(obj)etags `find $(TAG_SUBDIRS) \
+               etags -a -o $(obj)etags `$(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) \
                                                -name '*.[chS]' -print`
 cscope:
-               find $(TAG_SUBDIRS) -name '*.[chS]' -print > cscope.files
+               $(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) -name '*.[chS]' -print > \
+                                               cscope.files
                cscope -b -q -k
 
 SYSTEM_MAP = \
@@ -533,6 +541,7 @@ tools: $(VERSION_FILE)
 endif  # config.mk
 
 $(VERSION_FILE):
+               @mkdir -p $(dir $(VERSION_FILE))
                @( localvers='$(shell $(TOPDIR)/tools/setlocalversion $(TOPDIR))' ; \
                   printf '#define PLAIN_VERSION "%s%s"\n' \
                        "$(U_BOOT_VERSION)" "$${localvers}" ; \
@@ -1072,7 +1081,8 @@ clean:
               $(obj)board/voiceblue/eeprom                               \
               $(obj)board/armltd/{integratorap,integratorcp}/u-boot.lds  \
               $(obj)u-boot.lds                                           \
-              $(obj)arch/blackfin/cpu/bootrom-asm-offsets.[chs]
+              $(obj)arch/blackfin/cpu/bootrom-asm-offsets.[chs]          \
+              $(obj)arch/blackfin/cpu/init.{lds,elf}
        @rm -f $(obj)include/bmp_logo.h
        @rm -f $(obj)lib/asm-offsets.s
        @rm -f $(obj)nand_spl/{u-boot.lds,u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map,System.map}
@@ -1097,6 +1107,7 @@ clobber:  clean
        @rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL-y)
        @rm -f $(obj)u-boot.kwb
        @rm -f $(obj)u-boot.imx
+       @rm -f $(obj)u-boot.ubl
        @rm -f $(obj)tools/{env/crc32.c,inca-swap-bytes}
        @rm -f $(obj)arch/powerpc/cpu/mpc824x/bedbug_603e.c
        @rm -fr $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm
@@ -1105,12 +1116,9 @@ clobber: clean
        @[ ! -d $(obj)onenand_ipl ] || find $(obj)onenand_ipl -name "*" -type l -print | xargs rm -f
        @[ ! -d $(obj)mmc_spl ] || find $(obj)mmc_spl -name "*" -type l -print | xargs rm -f
 
-ifeq ($(OBJTREE),$(SRCTREE))
-mrproper \
-distclean:     clobber unconfig
-else
 mrproper \
 distclean:     clobber unconfig
+ifneq ($(OBJTREE),$(SRCTREE))
        rm -rf $(obj)*
 endif