diff options
Diffstat (limited to 'cpu/arm926ejs')
-rw-r--r-- | cpu/arm926ejs/at91/Makefile | 5 | ||||
-rw-r--r-- | cpu/arm926ejs/at91/config.mk | 2 | ||||
-rw-r--r-- | cpu/arm926ejs/at91/lowlevel_init.S | 2 | ||||
-rw-r--r-- | cpu/arm926ejs/at91/u-boot.lds.S (renamed from cpu/arm926ejs/at91/u-boot.lds) | 9 |
4 files changed, 14 insertions, 4 deletions
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 @@ SOBJS = lowlevel_init.o 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 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 @@ SECTIONS . = 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); |