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 Shinde X-Patchwork-Id: 9803 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 4715023E47 for ; Wed, 4 Jul 2012 05:59:07 +0000 (UTC) Received: from mail-ob0-f180.google.com (mail-ob0-f180.google.com [209.85.214.180]) by fiordland.canonical.com (Postfix) with ESMTP id E477CA18797 for ; Wed, 4 Jul 2012 05:59:06 +0000 (UTC) Received: by obbuo19 with SMTP id uo19so12009672obb.11 for ; Tue, 03 Jul 2012 22:59:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:x-auditid :from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-brightmail-tracker:x-tm-as-mml:x-gm-message-state; bh=IV8S/bX2WX3hvy4VLMlV26zEz8gesskmzJ4tpPbzmEE=; b=beE75PjKCs7vUL3SX8RDCwu3SkDI9wu7JaWgEDy7n5hWAm8YZd5Ru3X60bbYo77UFh vzlN7cXbrGKiR/+5iTSJsEHUc09u4h5RT78bE88zXWoUnVulgwio0FOZhuB/miTOfFYf uVDbGhqMQ1sN0SI3fUw+hV7rjjBcgOzajw4AmDHjgYPrMcs1ow1Ok8vBm+oDqUYW8iNV r7GU4sYTHWnsBzKJrM0vEvUJsjFdY0foNfzwPt3G3+WypvZl4LDKkDmNZ7cTwMwblTrW 0XXZ4TC/7GBhc4geGW4O2uaD4lcdqex6DvU+XRny9bHXmQwlF7GRFJ43uaCrP2k5YeHN n5OQ== Received: by 10.50.87.227 with SMTP id bb3mr10428231igb.57.1341381546109; Tue, 03 Jul 2012 22:59:06 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp49610ibb; Tue, 3 Jul 2012 22:59:05 -0700 (PDT) Received: by 10.68.222.103 with SMTP id ql7mr15028599pbc.68.1341381545319; Tue, 03 Jul 2012 22:59:05 -0700 (PDT) Received: from mailout2.samsung.com (mailout2.samsung.com. [203.254.224.25]) by mx.google.com with ESMTP id qf1si30996317pbc.175.2012.07.03.22.59.04; Tue, 03 Jul 2012 22:59:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of rajeshwari.s@samsung.com designates 203.254.224.25 as permitted sender) client-ip=203.254.224.25; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of rajeshwari.s@samsung.com designates 203.254.224.25 as permitted sender) smtp.mail=rajeshwari.s@samsung.com Received: from epcpsbgm1.samsung.com (mailout2.samsung.com [203.254.224.25]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M6M00ATXGM4MO60@mailout2.samsung.com>; Wed, 04 Jul 2012 14:59:04 +0900 (KST) X-AuditID: cbfee61a-b7f086d000000e64-10-4ff3dba73829 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 20.23.03684.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>; Wed, 04 Jul 2012 14:59:03 +0900 (KST) From: Rajeshwari Shinde To: u-boot@lists.denx.de Cc: patches@linaro.org, alim.akhtar@samsung.com, sjg@chromium.org, mk7.kang@samsung.com, chander.kashyap@linaro.org, jy0922.shim@samsung.com, jh80.chung@samsung.com Subject: [PATCH 03/10 V6] SMDK5250: Add smdk5250-uboot-spl.lds 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+NgFnrJJMWRmVeSWpSXmKPExsVy+t9jAd0Vtz/7G6zYymjxcP1NFosph7+w ODB53Lm2hy2AMYrLJiU1J7MstUjfLoEro/HeDuaCv1IVXQcfsDcwXhLtYuTkkBAwkZi7eyMr hC0mceHeerYuRi4OIYFFjBKT+r6wQjgTmSTmfdjABlLFJmAksfXkNEYQW0RAQuJX/1VGkCJm gRWMEnN6trGAJIQF7CROP+9kB7FZBFQl7n9oBbN5BdwlXq77zgKxTkHi2NSvYKs5BTwkmrd8 AbOFgGo6trQxTmDkXcDIsIpRNLUguaA4KT3XUK84Mbe4NC9dLzk/dxMjOACeSe1gXNlgcYhR gINRiYfX+spnfyHWxLLiytxDjBIczEoivDd3A4V4UxIrq1KL8uOLSnNSiw8xSnOwKInzNllf 8BcSSE8sSc1OTS1ILYLJMnFwSjUw7o/S3B9/TMM4TvJ1+t7ZvO6u6p/36r4QyGt+O3Gxj3lc 4IaHjvVnlB/wz6kTrPgn3Cj6/Hj3zaMechLuZ8LSH7f/vfLVZqe5z7oLsoZB+d1891T+Oaxz U4i1nDLz5GGFOM4Vs6un5RvIyy35PvXJnLu9dhd29Z83fRB+SD01Ju1Zjqx/9h8HJZbijERD Leai4kQAuU3Y5/wBAAA= X-TM-AS-MML: No X-Gm-Message-State: ALoCoQkd7C/EA/o3PygWrRl3zCRi1n1Zneik8xRmI9QAe5TXfk0rl2OuxUY4Du5pg7Yofzoa8Z0O 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 */