at91: add support for the PM9263 board of Ronetix GmbH
The PM9263 board is based on the AT91SAM9263-EK board.
Here is the page on Ronetix website:
http://www.ronetix.at/starter_kit_9263.html
Signed-off-by: Ilko Iliev <iliev@ronetix.at>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
diff --git a/cpu/arm926ejs/at91/Makefile b/cpu/arm926ejs/at91/Makefile
index 3d45c42..fbc82d1 100644
--- a/cpu/arm926ejs/at91/Makefile
+++ b/cpu/arm926ejs/at91/Makefile
@@ -63,11 +63,14 @@
SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y))
-all: $(obj).depend $(LIB)
+all: $(obj).depend $(LIB) $(obj)u-boot.lds
$(LIB): $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
+$(obj)u-boot.lds: u-boot.lds.S
+ $(CPP) $(CPPFLAGS) -D__ASSEMBLY__ -DCONFIG_BOARDDIR=$(BOARDDIR) -P $^ > $@
+
#########################################################################
# defines $(obj).depend target
diff --git a/cpu/arm926ejs/at91/config.mk b/cpu/arm926ejs/at91/config.mk
index 06177e6..147bd4c 100644
--- a/cpu/arm926ejs/at91/config.mk
+++ b/cpu/arm926ejs/at91/config.mk
@@ -1,2 +1,2 @@
PLATFORM_CPPFLAGS += $(call cc-option,-mtune=arm926ejs,)
-LDSCRIPT := $(SRCTREE)/cpu/arm926ejs/at91/u-boot.lds
+LDSCRIPT := $(OBJTREE)/cpu/arm926ejs/at91/u-boot.lds
diff --git a/cpu/arm926ejs/at91/lowlevel_init.S b/cpu/arm926ejs/at91/lowlevel_init.S
index ec6ad5d..54b3f3d 100644
--- a/cpu/arm926ejs/at91/lowlevel_init.S
+++ b/cpu/arm926ejs/at91/lowlevel_init.S
@@ -30,6 +30,8 @@
#ifndef CONFIG_SKIP_LOWLEVEL_INIT
.globl lowlevel_init
+.weak lowlevel_init
+.set lowlevel_init,function
lowlevel_init:
/*
diff --git a/cpu/arm926ejs/at91/u-boot.lds b/cpu/arm926ejs/at91/u-boot.lds.S
similarity index 89%
rename from cpu/arm926ejs/at91/u-boot.lds
rename to cpu/arm926ejs/at91/u-boot.lds.S
index ebb1f93..4e82bca 100644
--- a/cpu/arm926ejs/at91/u-boot.lds
+++ b/cpu/arm926ejs/at91/u-boot.lds.S
@@ -21,6 +21,8 @@
* MA 02111-1307 USA
*/
+#include <config.h>
+
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/
OUTPUT_ARCH(arm)
@@ -32,8 +34,11 @@
. = ALIGN(4);
.text :
{
- cpu/arm926ejs/start.o (.text)
- *(.text)
+ cpu/arm926ejs/start.o (.text)
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
+ board/CONFIG_BOARDDIR/lowlevel_init.o (.text)
+#endif
+ *(.text)
}
. = ALIGN(4);