[U-Boot] [PATCH 3/7] arch/powerpc/config.mk: make CONFIG_SYS_LDSCRIPT settings work

Wolfgang Denk wd at denx.de
Sun Nov 21 22:03:36 CET 2010


Signed-off-by: Wolfgang Denk <wd at denx.de>
Cc: Stefan Roese <sr at denx.de>
---
 arch/powerpc/config.mk            |    7 +++++++
 arch/powerpc/cpu/ppc4xx/config.mk |    6 +++++-
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk
index 06a3b10..8cf2279 100644
--- a/arch/powerpc/config.mk
+++ b/arch/powerpc/config.mk
@@ -29,6 +29,13 @@ PLATFORM_RELFLAGS += -mrelocatable
 PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__
 PLATFORM_LDFLAGS  += -n
 
+ifdef CONFIG_SYS_LDSCRIPT
+# need to strip off double quotes
+LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT))
+else ifdef CONFIG_NAND_U_BOOT
+LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds
+endif
+
 #
 # When cross-compiling on NetBSD, we have to define __PPC__ or else we
 # will pick up a va_list declaration that is incompatible with the
diff --git a/arch/powerpc/cpu/ppc4xx/config.mk b/arch/powerpc/cpu/ppc4xx/config.mk
index 5bda710..297a53b 100644
--- a/arch/powerpc/cpu/ppc4xx/config.mk
+++ b/arch/powerpc/cpu/ppc4xx/config.mk
@@ -33,5 +33,9 @@ else
 PLATFORM_CPPFLAGS += -Wa,-m405 -mcpu=405
 endif
 
-# Use default linker script.  Board port can override in board/*/config.mk
+ifdef CONFIG_SYS_LDSCRIPT
+# need to strip off double quotes
+LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT))
+else
 LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/ppc4xx/u-boot.lds
+endif
-- 
1.7.3.2



More information about the U-Boot mailing list