]> git.sur5r.net Git - u-boot/blobdiff - lib_arm/config.mk
Add support for Freescale MX25 SOC
[u-boot] / lib_arm / config.mk
index a13603e40917b32db8b9703814bbd01f1e8d3c92..3c078df3c127c2fe680cfc9fa0fc3011d79df3d8 100644 (file)
 
 CROSS_COMPILE ?= arm-linux-
 
+ifeq ($(BOARD),omap2420h4)
+STANDALONE_LOAD_ADDR = 0x80300000
+else
+ifeq ($(SOC),omap3)
+STANDALONE_LOAD_ADDR = 0x80300000
+else
+STANDALONE_LOAD_ADDR = 0xc100000
+endif
+endif
+
 PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
 
+# Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
+PLATFORM_CPPFLAGS += $(call cc-option,-marm,)
+
+# Try if EABI is supported, else fall back to old API,
+# i. e. for example:
+# - with ELDK 4.2 (EABI supported), use:
+#      -mabi=aapcs-linux -mno-thumb-interwork
+# - with ELDK 4.1 (gcc 4.x, no EABI), use:
+#      -mabi=apcs-gnu -mno-thumb-interwork
+# - with ELDK 3.1 (gcc 3.x), use:
+#      -mapcs-32 -mno-thumb-interwork
+PLATFORM_CPPFLAGS += $(call cc-option,\
+                               -mabi=aapcs-linux -mno-thumb-interwork,\
+                               $(call cc-option,\
+                                       -mapcs-32,\
+                                       $(call cc-option,\
+                                               -mabi=apcs-gnu,\
+                                       )\
+                               ) $(call cc-option,-mno-thumb-interwork,)\
+                       )
+
+# For EABI, make sure to provide raise()
+ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS)))
+# This file is parsed several times; make sure to add only once.
+ifeq (,$(findstring lib_arm/eabi_compat.o,$(PLATFORM_LIBS)))
+PLATFORM_LIBS += $(OBJTREE)/lib_arm/eabi_compat.o
+endif
+endif
 LDSCRIPT := $(SRCTREE)/cpu/$(CPU)/u-boot.lds