From patchwork Mon Jul 2 11:36:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajeshwari Birje X-Patchwork-Id: 168570 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 DC80F2C0086 for ; Mon, 2 Jul 2012 21:33:49 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A0291280A1; Mon, 2 Jul 2012 13:33:43 +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 SepoP-5T6oBt; Mon, 2 Jul 2012 13:33:43 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6EAD0280C7; Mon, 2 Jul 2012 13:33:27 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BC8F2280BF for ; Mon, 2 Jul 2012 13:33:25 +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 kcfbRWVDLL3z for ; Mon, 2 Jul 2012 13:33:24 +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 E3C21280A0 for ; Mon, 2 Jul 2012 13:33:15 +0200 (CEST) Received: from epcpsbgm1.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 <0M6J00CPO6QI1XH0@mailout4.samsung.com> for u-boot@lists.denx.de; Mon, 02 Jul 2012 20:33:13 +0900 (KST) X-AuditID: cbfee61a-b7f086d000000e64-a0-4ff186f97c29 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id FB.50.03684.9F681FF4; Mon, 02 Jul 2012 20:33:13 +0900 (KST) Received: from rajeshwari-linux.sisodomain.com ([107.108.215.115]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M6J00MOX6QL8K70@mmp2.samsung.com> for u-boot@lists.denx.de; Mon, 02 Jul 2012 20:33:13 +0900 (KST) From: Rajeshwari Shinde To: u-boot@lists.denx.de Date: Mon, 02 Jul 2012 17:06:38 +0530 Message-id: <1341229005-19008-4-git-send-email-rajeshwari.s@samsung.com> X-Mailer: git-send-email 1.7.4.4 In-reply-to: <1341229005-19008-1-git-send-email-rajeshwari.s@samsung.com> References: <1341229005-19008-1-git-send-email-rajeshwari.s@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCJMWRmVeSWpSXmKPExsVy+t9jQd2fbR/9Dea8ELN4u7eT3YHR4+yd HYwBjFFcNimpOZllqUX6dglcGUcPT2EuuCZVseVmF2MD40HRLkZODgkBE4kv8zaxQNhiEhfu rWfrYuTiEBKYzijR0H+aHcJZxSRxd9NGRpAqNgEjia0np4HZIgISEr/6rzKCFDELrGCUmNOz DWyUsICdxPHVa9lAbBYBVYnjk4+zgti8Ah4StzftZoRYpyBxbOpXsDingKfEjMuTwWwhoJpb XQeYJzDyLmBkWMUomlqQXFCclJ5rqFecmFtcmpeul5yfu4kR7PdnUjsYVzZYHGIU4GBU4uF9 0PzRX4g1say4MvcQowQHs5II74YEoBBvSmJlVWpRfnxRaU5q8SFGaQ4WJXHeJusL/kIC6Ykl qdmpqQWpRTBZJg5OqQbGYKv4CVp7y07d2/Jy5ZoXGaynLkSF79kle+CYuzynwafPHmdUfRy1 Vl6fsPWIJXONxzI2e3/JZ+FqjDNF93Z3eXy5qnlbatcLv/ni+r5rG3Tqj6sdtZIqnpEv0hJl udYuSvlBRU0f4wvRLW33fwptYA1MFfh9keWcwTzHRPNeuT1TLt1dXW6vxFKckWioxVxUnAgA oUsSf/cBAAA= 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 V5] 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 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 9659f9e..405abd5 100644 --- a/include/configs/smdk5250.h +++ b/include/configs/smdk5250.h @@ -105,6 +105,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 */