From patchwork Fri Jan 28 08:17:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Chenhui X-Patchwork-Id: 80801 X-Patchwork-Delegate: scottwood@freescale.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 32577B70DA for ; Fri, 28 Jan 2011 19:33:13 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7875728084; Fri, 28 Jan 2011 09:33:10 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W7DUP1amXThw; Fri, 28 Jan 2011 09:33:10 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 676E328085; Fri, 28 Jan 2011 09:33:08 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 277F628085 for ; Fri, 28 Jan 2011 09:33:06 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yFXRwfrEwAhb for ; Fri, 28 Jan 2011 09:33:04 +0100 (CET) X-Greylist: delayed 902 seconds by postgrey-1.27 at theia; Fri, 28 Jan 2011 09:33:02 CET X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from AM1EHSOBE003.bigfish.com (am1ehsobe003.messaging.microsoft.com [213.199.154.206]) by theia.denx.de (Postfix) with ESMTPS id 0782228084 for ; Fri, 28 Jan 2011 09:33:02 +0100 (CET) Received: from mail42-am1-R.bigfish.com (10.3.201.250) by AM1EHSOBE003.bigfish.com (10.3.204.23) with Microsoft SMTP Server id 14.1.225.8; Fri, 28 Jan 2011 08:17:59 +0000 Received: from mail42-am1 (localhost.localdomain [127.0.0.1]) by mail42-am1-R.bigfish.com (Postfix) with ESMTP id 8FCC812780B2 for ; Fri, 28 Jan 2011 08:17:59 +0000 (UTC) X-SpamScore: 3 X-BigFish: VS3(zzzz1202h1082kzz8275bhz2dh2a8h668h61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: KIP:(null); UIP:(null); IPVD:NLI; H:de01egw02.freescale.net; RD:de01egw02.freescale.net; EFVD:NLI Received: from mail42-am1 (localhost.localdomain [127.0.0.1]) by mail42-am1 (MessageSwitch) id 1296202679215032_23396; Fri, 28 Jan 2011 08:17:59 +0000 (UTC) Received: from AM1EHSMHS002.bigfish.com (unknown [10.3.201.250]) by mail42-am1.bigfish.com (Postfix) with ESMTP id 3241818E004D for ; Fri, 28 Jan 2011 08:17:59 +0000 (UTC) Received: from de01egw02.freescale.net (192.88.165.103) by AM1EHSMHS002.bigfish.com (10.3.207.102) with Microsoft SMTP Server (TLS) id 14.1.225.8; Fri, 28 Jan 2011 08:17:58 +0000 Received: from az33smr01.freescale.net (az33smr01.freescale.net [10.64.34.199]) by de01egw02.freescale.net (8.14.3/8.14.3) with ESMTP id p0S8Huqb003257 for ; Fri, 28 Jan 2011 01:17:57 -0700 (MST) Received: from localhost.localdomain ([10.193.20.166]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id p0S8HrRR020095; Fri, 28 Jan 2011 02:17:54 -0600 (CST) From: Zhao Chenhui To: Date: Fri, 28 Jan 2011 16:17:56 +0800 Message-ID: <1296202676-30873-1-git-send-email-b35336@freescale.com> X-Mailer: git-send-email 1.6.4.1 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Subject: [U-Boot] [PATCH] powerpc: fix LDSCRIPT in NAND boot X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 Acked-by: Scott Wood --- 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