From patchwork Wed Jul 4 06:02:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajeshwari Birje X-Patchwork-Id: 168893 X-Patchwork-Delegate: promsoft@gmail.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 8A12B2C0325 for ; Wed, 4 Jul 2012 15:59:29 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3253128114; Wed, 4 Jul 2012 07:59:21 +0200 (CEST) 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 Et6HphzBQB0s; Wed, 4 Jul 2012 07:59:20 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 70F7128107; Wed, 4 Jul 2012 07:59:11 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6177928107 for ; Wed, 4 Jul 2012 07:59:10 +0200 (CEST) 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 jb3-+0Hznmdl for ; Wed, 4 Jul 2012 07:59:09 +0200 (CEST) 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 mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by theia.denx.de (Postfix) with ESMTP id 06312280E9 for ; Wed, 4 Jul 2012 07:59:06 +0200 (CEST) Received: from epcpsbgm2.samsung.com (mailout4.samsung.com [203.254.224.34]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M6M00MSQGKAGD40@mailout4.samsung.com> for u-boot@lists.denx.de; Wed, 04 Jul 2012 14:59:04 +0900 (KST) X-AuditID: cbfee61b-b7f776d000002f3f-d8-4ff3dba73165 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 03.A7.12095.7ABD3FF4; Wed, 04 Jul 2012 14:59:04 +0900 (KST) Received: from rajeshwari-linux.sisodomain.com ([107.108.215.115]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M6M00GQYGLOH980@mmp1.samsung.com> for u-boot@lists.denx.de; Wed, 04 Jul 2012 14:59:03 +0900 (KST) From: Rajeshwari Shinde To: u-boot@lists.denx.de Date: Wed, 04 Jul 2012 11:32:53 +0530 Message-id: <1341381780-2725-4-git-send-email-rajeshwari.s@samsung.com> X-Mailer: git-send-email 1.7.4.4 In-reply-to: <1341381780-2725-1-git-send-email-rajeshwari.s@samsung.com> References: <1341381780-2725-1-git-send-email-rajeshwari.s@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCJMWRmVeSWpSXmKPExsVy+t9jAd0Vtz/7G5yfy2zxdm8nuwOjx9k7 OxgDGKO4bFJSczLLUov07RK4Mhrv7WAu+CtV0XXwAXsD4yXRLkZODgkBE4nr7WtYIWwxiQv3 1rN1MXJxCAksYpSYte8hC4Szikli59xDbCBVbAJGEltPTmMEsUUEJCR+9V9lBCliFljBKDGn ZxsLSEJYwE7i9PNOdhCbRUBV4v6HVjCbV8Bd4uW67ywQ6xQkjk39CraaU8BDonnLFzBbCKim Y0sb4wRG3gWMDKsYRVMLkguKk9JzjfSKE3OLS/PS9ZLzczcxgv3+THoH46oGi0OMAhyMSjy8 N6589hdiTSwrrsw9xCjBwawkwntzN1CINyWxsiq1KD++qDQntfgQozQHi5I4b5P1BX8hgfTE ktTs1NSC1CKYLBMHp1QDo9d0qc9Ljkk6TorquPh/8a0mPxG7XVOXbLNz4tWdPlXJwZE3k/XR C3f/pOKfitfblY7elAyzfti8+WV4kxmnDNvOI6vljJh3RiQedmFfzvVfesoV31Ce7zmxYQd9 r20Xz92p2/rjY4UJ64PkHc9/LHC2jUn/dsud/dZCrSnzFm+9U6Lw3GejnhJLcUaioRZzUXEi AAGKMg33AQAA X-TM-AS-MML: No Cc: jy0922.shim@samsung.com, patches@linaro.org, jh80.chung@samsung.com, alim.akhtar@samsung.com Subject: [U-Boot] [PATCH 03/10 V6] SMDK5250: Add smdk5250-uboot-spl.lds X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Default spl/u-boot-spl.lds created by spl/Makefile resolves the spl text load addr to 0x0. As 0x0 belongs to iROM addr so Global variables can not be used. Adding specific smdk5250-uboot-spl.lds makes possible to use Global Variables in spl. Signed-off-by: Alim Akhtar Signed-off-by: Rajeshwari Shinde --- Changes in V2: - None. Changes in V3: - None Changes in V4: - None. Changes in V5: - None Changes in V6: - None board/samsung/smdk5250/smdk5250-uboot-spl.lds | 66 +++++++++++++++++++++++++ include/configs/smdk5250.h | 5 ++ 2 files changed, 71 insertions(+), 0 deletions(-) create mode 100644 board/samsung/smdk5250/smdk5250-uboot-spl.lds diff --git a/board/samsung/smdk5250/smdk5250-uboot-spl.lds b/board/samsung/smdk5250/smdk5250-uboot-spl.lds new file mode 100644 index 0000000..d78dd77 --- /dev/null +++ b/board/samsung/smdk5250/smdk5250-uboot-spl.lds @@ -0,0 +1,66 @@ +/* + * (C) Copyright 2002 + * Gary Jennejohn, DENX Software Engineering, + * + * Copyright (C) 2012 Samsung Electronics + * + * Based on arch/arm/cpu/armv7/omap-common/u-boot-spl.lds + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +MEMORY { .sram : ORIGIN = CONFIG_SPL_TEXT_BASE, \ + LENGTH = CONFIG_SPL_MAX_SIZE } + +OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") +OUTPUT_ARCH(arm) +ENTRY(_start) + +SECTIONS +{ + .text : + { + __start = .; + arch/arm/cpu/armv7/start.o (.text) + *(.text*) + } >.sram + . = ALIGN(4); + + .rodata : { *(SORT_BY_ALIGNMENT(.rodata*)) } >.sram + . = ALIGN(4); + + .data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram + . = ALIGN(4); + + /* Align .machine_param on 256 byte boundary for easier searching */ + .machine_param ALIGN(0x100) : { *(.machine_param) } >.sram + . = ALIGN(4); + + __image_copy_end = .; + _end = .; + + .bss : + { + . = ALIGN(4); + __bss_start = .; + *(.bss*) + . = ALIGN(4); + __bss_end__ = .; + } >.sram +} diff --git a/include/configs/smdk5250.h b/include/configs/smdk5250.h index 2360a8f..0e5a6e4 100644 --- a/include/configs/smdk5250.h +++ b/include/configs/smdk5250.h @@ -106,6 +106,11 @@ #define CONFIG_SPL #define COPY_BL2_FNPTR_ADDR 0x02020030 +/* specific .lds file */ +#define CONFIG_SPL_LDSCRIPT "board/samsung/smdk5250/smdk5250-uboot-spl.lds" +#define CONFIG_SPL_TEXT_BASE 0x02023400 +#define CONFIG_SPL_MAX_SIZE (14 * 1024) + #define CONFIG_BOOTCOMMAND "mmc read 40007000 451 2000; bootm 40007000" /* Miscellaneous configurable options */