[U-Boot] [PATCH] powerpc: fix LDSCRIPT in NAND boot

Zhao Chenhui b35336 at freescale.com
Fri Jan 28 09:17:56 CET 2011


ONFIG_NAND_U_BOOT indicates whether the SPL is used, while
CONFIG_NAND_SPL is set only when building the SPL itself (and isn't
available in makefiles anyway).  This is the linker script for the
main U-Boot when SPL is in use, so CONFIG_NAND_U_BOOT is the
variable to use.

Also, refrain from overriding LDSCRIPT with a NAND-specific script,
unless such a script exists.

Signed-off-by: Zhao Chenhui <b35336 at freescale.com>
Acked-by: Scott Wood <scottwood at freescale.com>
---
 arch/powerpc/config.mk |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk
index 2912604..08ad333 100644
--- a/arch/powerpc/config.mk
+++ b/arch/powerpc/config.mk
@@ -32,8 +32,10 @@ PLATFORM_LDFLAGS  += -n --gc-sections
 ifdef CONFIG_SYS_LDSCRIPT
 # need to strip off double quotes
 LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT))
-else ifdef CONFIG_NAND_SPL
-LDSCRIPT := $(SRCTREE)/$(CONFIG_BOARDDIR)/u-boot-nand.lds
+else ifdef CONFIG_NAND_U_BOOT
+ifneq ($(wildcard $(SRCTREE)/$(CPUDIR)/u-boot-nand.lds),)
+LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot-nand.lds
+endif
 else
 ifneq ($(wildcard $(SRCTREE)/arch/powerpc/cpu/$(CPU)/u-boot.lds),)
 LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/$(CPU)/u-boot.lds
-- 
1.6.4.1




More information about the U-Boot mailing list