[U-Boot] [PATCH v4 10/13] mx31pdk: Modify to work with generic relocation

Simon Glass sjg at chromium.org
Tue Feb 21 02:32:52 CET 2012


This adds a link symbol and updates the board Makefile so that it's
SPL implementation will work with generic relocation.

Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v4:
- Split out mx31pdk changes into new patch

 nand_spl/board/freescale/mx31pdk/Makefile   |    6 ++++++
 nand_spl/board/freescale/mx31pdk/u-boot.lds |    1 +
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/nand_spl/board/freescale/mx31pdk/Makefile b/nand_spl/board/freescale/mx31pdk/Makefile
index 87784d2..4598206 100644
--- a/nand_spl/board/freescale/mx31pdk/Makefile
+++ b/nand_spl/board/freescale/mx31pdk/Makefile
@@ -13,6 +13,9 @@ CFLAGS	+= -DCONFIG_SPL_BUILD -DCONFIG_NAND_SPL
 
 SOBJS	= start.o lowlevel_init.o
 COBJS	= nand_boot_fsl_nfc.o
+ifndef CONFIG_SYS_SKIP_RELOC
+COBJS	+= reloc.o
+endif
 
 SRCS	:= $(SRCTREE)/nand_spl/nand_boot_fsl_nfc.c
 SRCS	+= $(SRCTREE)/arch/arm/cpu/arm1136/start.S
@@ -50,6 +53,9 @@ $(obj)%.o:	$(SRCTREE)/board/freescale/mx31pdk/%.S
 $(obj)%.o:	$(SRCTREE)/nand_spl/%.c
 	$(CC) $(CFLAGS) -c -o $@ $<
 
+$(obj)%.o:	$(SRCTREE)/common/%.c
+	$(CC) $(CFLAGS) -c -o $@ $<
+
 # defines $(obj).depend target
 include $(SRCTREE)/rules.mk
 
diff --git a/nand_spl/board/freescale/mx31pdk/u-boot.lds b/nand_spl/board/freescale/mx31pdk/u-boot.lds
index d2b08f6..2273e9b 100644
--- a/nand_spl/board/freescale/mx31pdk/u-boot.lds
+++ b/nand_spl/board/freescale/mx31pdk/u-boot.lds
@@ -51,6 +51,7 @@ SECTIONS
 	__u_boot_cmd_end = .;
 
 	. = ALIGN(4);
+	__image_copy_end = .;
 
 	.rel.dyn : {
 		__rel_dyn_start = .;
-- 
1.7.7.3



More information about the U-Boot mailing list