]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - Makefile
mx28evk: Fix PSWITCH key position
[karo-tx-uboot.git] / Makefile
index 01bf2b0cf8be5c3f0d4fa8b38fc168780a2257fe..0197239c8d2a927768c083e076b3bec7787ea55c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -21,9 +21,9 @@
 # MA 02111-1307 USA
 #
 
-VERSION = 2011
-PATCHLEVEL = 12
-SUBLEVEL =
+VERSION = 2012
+PATCHLEVEL = 04
+SUBLEVEL = 01
 EXTRAVERSION =
 ifneq "$(SUBLEVEL)" ""
 U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
@@ -174,6 +174,8 @@ include $(TOPDIR)/config.mk
 # that (or fail if absent).  Otherwise, search for a linker script in a
 # standard location.
 
+LDSCRIPT_MAKEFILE_DIR = $(dir $(LDSCRIPT))
+
 ifndef LDSCRIPT
        #LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug
        ifdef CONFIG_SYS_LDSCRIPT
@@ -182,6 +184,7 @@ ifndef LDSCRIPT
        endif
 endif
 
+# If there is no specified link script, we look in a number of places for it
 ifndef LDSCRIPT
        ifeq ($(CONFIG_NAND_U_BOOT),y)
                LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds
@@ -195,6 +198,11 @@ ifndef LDSCRIPT
        ifeq ($(wildcard $(LDSCRIPT)),)
                LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot.lds
        endif
+       ifeq ($(wildcard $(LDSCRIPT)),)
+               LDSCRIPT := $(TOPDIR)/arch/$(ARCH)/cpu/u-boot.lds
+               # We don't expect a Makefile here
+               LDSCRIPT_MAKEFILE_DIR =
+       endif
        ifeq ($(wildcard $(LDSCRIPT)),)
 $(error could not find linker script)
        endif
@@ -221,6 +229,9 @@ LIBS  = lib/libgeneric.o
 LIBS += lib/lzma/liblzma.o
 LIBS += lib/lzo/liblzo.o
 LIBS += lib/zlib/libz.o
+ifeq ($(CONFIG_TIZEN),y)
+LIBS += lib/tizen/libtizen.o
+endif
 LIBS += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \
        "board/$(VENDOR)/common/lib$(VENDOR).o"; fi)
 LIBS += $(CPUDIR)/lib$(CPU).o
@@ -336,6 +347,7 @@ export PLATFORM_LIBS
 # on the fly.
 LDPPFLAGS += \
        -include $(TOPDIR)/include/u-boot/u-boot.lds.h \
+       -DCPUDIR=$(CPUDIR) \
        $(shell $(LD) --version | \
          sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p')
 
@@ -513,7 +525,7 @@ depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) \
                $(obj)include/autoconf.mk \
                $(obj)include/generated/generic-asm-offsets.h \
                $(obj)include/generated/asm-offsets.h
-               for dir in $(SUBDIRS) $(CPUDIR) $(dir $(LDSCRIPT)) ; do \
+               for dir in $(SUBDIRS) $(CPUDIR) $(LDSCRIPT_MAKEFILE_DIR) ; do \
                        $(MAKE) -C $$dir _depend ; done
 
 TAG_SUBDIRS = $(SUBDIRS)
@@ -547,6 +559,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)
 #