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

login
register
mail settings
Submitter Wolfgang Denk
Date Nov. 21, 2010, 9:03 p.m.
Message ID <1290373420-3053-4-git-send-email-wd@denx.de>
Download mbox | patch
Permalink /patch/72457/
State Superseded
Headers show

Comments

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

Patch

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