]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - Makefile
Unified codebase for TX28, TX48, TX51, TX53
[karo-tx-uboot.git] / Makefile
index 023ea23a38bdb3d187eaf2950999b989820bfa92..be62a69e40f16664bb6ba2b1d57841b41f8badaa 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -30,8 +30,6 @@ U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 else
 U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL)$(EXTRAVERSION)
 endif
-TIMESTAMP_FILE = $(obj)include/generated/timestamp_autogenerated.h
-VERSION_FILE = $(obj)include/generated/version_autogenerated.h
 
 HOSTARCH := $(shell uname -m | \
        sed -e s/i.86/x86/ \
@@ -130,6 +128,9 @@ src :=
 endif
 export obj src
 
+TIMESTAMP_FILE = $(obj)include/generated/timestamp_autogenerated.h
+VERSION_FILE = $(obj)include/generated/version_autogenerated.h
+
 # Make sure CDPATH settings don't interfere
 unexport CDPATH
 
@@ -449,9 +450,11 @@ $(obj)u-boot.ais:       $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
                        $(obj)u-boot.ais
                rm $(obj)spl/u-boot-spl{,-pad}.ais
 
-$(obj)u-boot.sb:       $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin
-               elftosb -zdf imx28 -c $(TOPDIR)/board/$(BOARDDIR)/u-boot.bd \
-                       -o $(obj)u-boot.sb
+$(obj)u-boot.bd:       $(TOPDIR)/board/$(BOARDDIR)/u-boot.bd
+               sed "s:@@BUILD_DIR@@:$(obj):g" $< > $@
+
+$(obj)u-boot.sb:       $(obj)u-boot.bd elftosb $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin
+               $(TOPDIR)/tools/elftosb/bld/linux/elftosb -zdf imx28 -c $< -o $@
 
 ifeq ($(CONFIG_SANDBOX),y)
 GEN_UBOOT = \
@@ -515,6 +518,8 @@ $(obj)spl/u-boot-spl.bin:   $(SUBDIR_TOOLS) depend
 
 updater:
                $(MAKE) -C tools/updater all
+elftosb:
+               $(MAKE) -C $(SUBDIR_TOOLS)/elftosb all
 
 # Explicitly make _depend in subdirs containing multiple targets to prevent
 # parallel sub-makes creating .depend files simultaneously.
@@ -556,6 +561,13 @@ SYSTEM_MAP = \
 $(obj)System.map:      $(obj)u-boot
                @$(call SYSTEM_MAP,$<) > $(obj)System.map
 
+checkthumb:
+       @if test $(call cc-version) -lt 0404; then \
+               echo -n '*** Your GCC does not produce working '; \
+               echo 'binaries in THUMB mode.'; \
+               echo '*** Your board is configured for THUMB mode.'; \
+               false; \
+       fi
 #
 # Auto-generate the autoconf.mk file (which is included by all makefiles)
 #