sh: make lds more generic
RFC PATCH 1/2 sh: make lds more generic
currently the sh lds need to sync the lds enty and TEXT_BASE manualy and the reloc_dst is based on it
instead provide it now from the ldflags
tested on r2dplus
--- board/mpr2/u-boot.lds | 13 +++---------- board/ms7720se/u-boot.lds | 15 +++------------ board/ms7722se/u-boot.lds | 15 +++------------ board/ms7750se/u-boot.lds | 15 +++------------ board/renesas/MigoR/u-boot.lds | 15 +++------------ board/renesas/ap325rxa/u-boot.lds | 15 +++------------ board/renesas/r2dplus/u-boot.lds | 15 +++------------ board/renesas/r7780mp/u-boot.lds | 15 +++------------ board/renesas/rsk7203/u-boot.lds | 10 ++-------- board/renesas/sh7763rdp/u-boot.lds | 15 +++------------ board/renesas/sh7785lcr/u-boot.lds | 7 ++++--- sh_config.mk | 1 + 12 files changed, 34 insertions(+), 117 deletions(-)
board/mpr2/u-boot.lds +3 -10
@@ -34,16 +34,9 @@ ENTRY(_start) SECTIONS { /* - Base address of internal SDRAM is 0x8C000000. - U-Boot resides in the last 256 kB of the 64 MB. - - NOTE: This address must match with the definition of - TEXT_BASE in config.mk (in this directory). - - */ - . = 0x8C000000 + (64*1024*1024) - (256*1024); - - PROVIDE (reloc_dst = .); + * entry and reloct_dst will be provide by command line + */ + . = .; PROVIDE (_ftext = .); PROVIDE (_fcode = .);
board/ms7720se/u-boot.lds +3 -12
@@ -31,18 +31,9 @@ ENTRY(_start) SECTIONS { /* - Base address of internal SDRAM is 0x0C000000. - Although size of SDRAM can be either 16 or 32 MBytes, - we assume 16 MBytes (ie ignore upper half if the full - 32 MBytes is present). - - NOTE: This address must match with the definition of - TEXT_BASE in config.mk (in this directory). - - */ - . = 0x8C000000 + (64*1024*1024) - (256*1024); - - PROVIDE (reloc_dst = .); + * entry and reloct_dst will be provide by command line + */ + . = .; PROVIDE (_ftext = .); PROVIDE (_fcode = .);
board/ms7722se/u-boot.lds +3 -12
@@ -28,18 +28,9 @@ ENTRY(_start) SECTIONS { /* - Base address of internal SDRAM is 0x0C000000. - Although size of SDRAM can be either 16 or 32 MBytes, - we assume 16 MBytes (ie ignore upper half if the full - 32 MBytes is present). - - NOTE: This address must match with the definition of - TEXT_BASE in config.mk (in this directory). - - */ - . = 0x8C000000 + (64*1024*1024) - (256*1024); - - PROVIDE (reloc_dst = .); + * entry and reloct_dst will be provide by command line + */ + . = .; PROVIDE (_ftext = .); PROVIDE (_fcode = .);
board/ms7750se/u-boot.lds +3 -12
@@ -28,18 +28,9 @@ ENTRY(_start) SECTIONS { /* - Base address of internal SDRAM is 0x0C000000. - Although size of SDRAM can be either 16 or 32 MBytes, - we assume 16 MBytes (ie ignore upper half if the full - 32 MBytes is present). - - NOTE: This address must match with the definition of - TEXT_BASE in config.mk (in this directory). - - */ - . = 0x8C000000 + (64*1024*1024) - (256*1024); - - PROVIDE (reloc_dst = .); + * entry and reloct_dst will be provide by command line + */ + . = .; PROVIDE (_ftext = .); PROVIDE (_fcode = .);
board/renesas/MigoR/u-boot.lds +3 -12
@@ -28,18 +28,9 @@ ENTRY(_start) SECTIONS { /* - Base address of internal SDRAM is 0x0C000000. - Although size of SDRAM can be either 16 or 32 MBytes, - we assume 16 MBytes (ie ignore upper half if the full - 32 MBytes is present). - - NOTE: This address must match with the definition of - TEXT_BASE in config.mk (in this directory). - - */ - . = 0x8C000000 + (64*1024*1024) - (256*1024); - - PROVIDE (reloc_dst = .); + * entry and reloct_dst will be provide by command line + */ + . = .; PROVIDE (_ftext = .); PROVIDE (_fcode = .);
board/renesas/ap325rxa/u-boot.lds +3 -12
@@ -28,18 +28,9 @@ ENTRY(_start) SECTIONS { /* - Base address of internal SDRAM is 0x88000000. - Although size of SDRAM can be either 16 or 32 MBytes, - we assume 16 MBytes (ie ignore upper half if the full - 32 MBytes is present). - - NOTE: This address must match with the definition of - TEXT_BASE in config.mk (in this directory). - - */ - . = 0x88000000 + (128*1024*1024) - (256*1024); - - PROVIDE (reloc_dst = .); + * entry and reloct_dst will be provide by command line + */ + . = .; PROVIDE (_ftext = .); PROVIDE (_fcode = .);
board/renesas/r2dplus/u-boot.lds +3 -12
@@ -28,18 +28,9 @@ ENTRY(_start) SECTIONS { /* - Base address of internal SDRAM is 0x0C000000. - Although size of SDRAM can be either 16 or 32 MBytes, - we assume 16 MBytes (ie ignore upper half if the full - 32 MBytes is present). - - NOTE: This address must match with the definition of - TEXT_BASE in config.mk (in this directory). - - */ - . = 0x0C000000 + (64*1024*1024) - (256*1024); - - PROVIDE (reloc_dst = .); + * entry and reloct_dst will be provide by command line + */ + . = .; PROVIDE (_ftext = .); PROVIDE (_fcode = .);
board/renesas/r7780mp/u-boot.lds +3 -12
@@ -28,18 +28,9 @@ ENTRY(_start) SECTIONS { /* - Base address of internal SDRAM is 0x0C000000. - Although size of SDRAM can be either 16 or 32 MBytes, - we assume 16 MBytes (ie ignore upper half if the full - 32 MBytes is present). - - NOTE: This address must match with the definition of - TEXT_BASE in config.mk (in this directory). - - */ - . = 0x08000000 + (128*1024*1024) - (256*1024); - - PROVIDE (reloc_dst = .); + * entry and reloct_dst will be provide by command line + */ + . = .; PROVIDE (_ftext = .); PROVIDE (_fcode = .);
board/renesas/rsk7203/u-boot.lds +2 -8
@@ -28,15 +28,9 @@ ENTRY(_start) SECTIONS { /* - * Base address of internal SDRAM is 0x0C000000. - * - * NOTE: This address must match with the definition of - *TEXT_BASE in config.mk (in this directory). + * entry and reloct_dst will be provide by command line */ - - . = 0x0C000000 + (8*1024*1024) - (256*1024); - - PROVIDE (reloc_dst = .); + . = .; PROVIDE (_ftext = .); PROVIDE (_fcode = .);
board/renesas/sh7763rdp/u-boot.lds +3 -12
@@ -28,18 +28,9 @@ ENTRY(_start) SECTIONS { /* - Base address of internal SDRAM is 0x0C000000. - Although size of SDRAM can be either 16 or 32 MBytes, - we assume 16 MBytes (ie ignore upper half if the full - 32 MBytes is present). - - NOTE: This address must match with the definition of - TEXT_BASE in config.mk (in this directory). - - */ - . = 0x8C000000 + (64*1024*1024) - (256*1024); - - PROVIDE (reloc_dst = .); + * entry and reloct_dst will be provide by command line + */ + . = .; PROVIDE (_ftext = .); PROVIDE (_fcode = .);
board/renesas/sh7785lcr/u-boot.lds +4 -3
@@ -28,9 +28,10 @@ ENTRY(_start) SECTIONS { - . = 0x88000000 + (128 * 1024 * 1024) - (512 * 1024); - - PROVIDE (reloc_dst = .); + /* + * entry and reloct_dst will be provide by command line + */ + . = .; PROVIDE (_ftext = .); PROVIDE (_fcode = .);
sh_config.mk +1 -0
@@ -22,3 +22,4 @@ # PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__ +PLATFORM_LDFLAGS += -e $(TEXT_BASE) --defsym reloc_dst=$(TEXT_BASE)
Signature · 1 line
1.6.1.3
RFC PATCH 1/2 sh: make lds more generic
Quoted 10 lines · Jean-Christophe PLAGNIOL-VILLARD
currently the sh lds need to sync the lds enty and
TEXT_BASEmanualy and thereloc_dstis based on itinstead provide it now from the ldflags
tested on r2dplus
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>Cc Nobuhiro Iwamatsu <[email protected]>---
Ping
Best Regards,
J.
RFC PATCH 1/2 sh: make lds more generic
2009/5/23 Jean-Christophe PLAGNIOL-VILLARD <[email protected]>:
Quoted 13 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 10 lines
currently the sh lds need to sync the lds enty and
TEXT_BASEmanualy and thereloc_dstis based on itinstead provide it now from the ldflags
tested on r2dplus
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>Cc Nobuhiro Iwamatsu <[email protected]>---
Ping
Sorry, answer is late.
I will test this patch, and rend report for you. If no problem, I will apply this patch to testing branch.
Best regards,
Nobuhiro
Signature · 1 line
Nobuhiro Iwamatsu
RFC PATCH 2/2 sh: unify lds
In reply to Jean-Christophe PLAGNIOL-VILLARDall sh boards use the same cpu lds so move it to cpu/$(CPU)
that could be overwrite in following order
SOC
BOARD
via the corresponding config.mk
tested on r2dplus
---
board/ms7722se/u-boot.lds | 96 ------------------------
board/ms7750se/u-boot.lds | 96 ------------------------
board/renesas/MigoR/u-boot.lds | 96 ------------------------
board/renesas/ap325rxa/u-boot.lds | 96 ------------------------
board/renesas/r2dplus/u-boot.lds | 96 ------------------------
board/renesas/r7780mp/u-boot.lds | 96 ------------------------
board/renesas/sh7763rdp/u-boot.lds | 96 ------------------------
board/renesas/sh7785lcr/u-boot.lds | 97 -------------------------
{board/renesas/rsk7203 => cpu/sh2}/u-boot.lds | 0
{board/mpr2 => cpu/sh3}/u-boot.lds | 0
{board/ms7720se => cpu/sh4}/u-boot.lds | 12 ++--
sh_config.mk | 2 +
12 files changed, 8 insertions(+), 775 deletions(-)
delete mode 100644 board/ms7722se/u-boot.lds
delete mode 100644 board/ms7750se/u-boot.lds
delete mode 100644 board/renesas/MigoR/u-boot.lds
delete mode 100644 board/renesas/ap325rxa/u-boot.lds
delete mode 100644 board/renesas/r2dplus/u-boot.lds
delete mode 100644 board/renesas/r7780mp/u-boot.lds
delete mode 100644 board/renesas/sh7763rdp/u-boot.lds
delete mode 100644 board/renesas/sh7785lcr/u-boot.lds
rename {board/renesas/rsk7203 => cpu/sh2}/u-boot.lds (100%)
rename {board/mpr2 => cpu/sh3}/u-boot.lds (100%)
rename {board/ms7720se => cpu/sh4}/u-boot.lds (95%)board/ms7722se/u-boot.lds deleted +0 -96
@@ -1,96 +0,0 @@ -/* - * Copyrigth (c) 2007 - * Nobuhiro Iwamatsu <[email protected]> - * - * 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 - */ - -OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux") -OUTPUT_ARCH(sh) -ENTRY(_start) - -SECTIONS -{ - /* - * entry and reloct_dst will be provide by command line - */ - . = .; - - PROVIDE (_ftext = .); - PROVIDE (_fcode = .); - PROVIDE (_start = .); - - .text : - { - cpu/sh4/start.o (.text) - . = ALIGN(8192); - common/env_embedded.o (.ppcenv) - . = ALIGN(8192); - common/env_embedded.o (.ppcenvr) - . = ALIGN(8192); - *(.text) - . = ALIGN(4); - } =0xFF - PROVIDE (_ecode = .); - .rodata : - { - *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) - . = ALIGN(4); - } - PROVIDE (_etext = .); - - - PROVIDE (_fdata = .); - .data : - { - *(.data) - . = ALIGN(4); - } - PROVIDE (_edata = .); - - PROVIDE (_fgot = .); - .got : - { - *(.got) - . = ALIGN(4); - } - PROVIDE (_egot = .); - - PROVIDE (__u_boot_cmd_start = .); - .u_boot_cmd : - { - *(.u_boot_cmd) - . = ALIGN(4); - } - PROVIDE (__u_boot_cmd_end = .); - - PROVIDE (reloc_dst_end = .); - /* _reloc_dst_end = .; */ - - PROVIDE (bss_start = .); - PROVIDE (__bss_start = .); - .bss (NOLOAD) : - { - *(.bss) - . = ALIGN(4); - } - PROVIDE (bss_end = .); - - PROVIDE (_end = .); -}
board/ms7750se/u-boot.lds deleted +0 -96
96 lines not on this page · raw message
board/renesas/MigoR/u-boot.lds deleted +0 -96
96 lines not on this page · raw message
board/renesas/ap325rxa/u-boot.lds deleted +0 -96
96 lines not on this page · raw message
board/renesas/r2dplus/u-boot.lds deleted +0 -96
96 lines not on this page · raw message
board/renesas/r7780mp/u-boot.lds deleted +0 -96
96 lines not on this page · raw message
board/renesas/sh7763rdp/u-boot.lds deleted +0 -96
96 lines not on this page · raw message
board/renesas/sh7785lcr/u-boot.lds deleted +0 -97
97 lines not on this page · raw message
cpu/sh2/u-boot.lds renamed from board/renesas/rsk7203/u-boot.lds +0 -0
cpu/sh3/u-boot.lds renamed from board/mpr2/u-boot.lds +0 -0
cpu/sh4/u-boot.lds renamed from board/ms7720se/u-boot.lds +6 -6
@@ -1,10 +1,10 @@ /* - * Copyrigth (c) 2007 - * Yoshihiro Shimoda <[email protected]> - * - * Copyrigth (c) 2007 + * Copyright (C) 2007 * Nobuhiro Iwamatsu <[email protected]> * + * Copyright (C) 2008-2009 + * Yoshihiro Shimoda <[email protected]> + * * See file CREDITS for list of people who contributed to this * project. *
@@ -41,7 +41,7 @@ SECTIONS .text : { - cpu/sh3/start.o (.text) + cpu/sh4/start.o (.text) . = ALIGN(8192); common/env_embedded.o (.ppcenv) . = ALIGN(8192);
@@ -88,7 +88,7 @@ SECTIONS PROVIDE (bss_start = .); PROVIDE (__bss_start = .); - .bss : + .bss (NOLOAD) : { *(.bss) . = ALIGN(4);
sh_config.mk +2 -0
@@ -23,3 +23,5 @@ PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__ PLATFORM_LDFLAGS += -e $(TEXT_BASE) --defsym reloc_dst=$(TEXT_BASE) + +LDSCRIPT := $(SRCTREE)/cpu/$(CPU)/u-boot.lds
Signature · 1 line
1.6.1.3
RFC PATCH 1/2 sh: make lds more generic
In reply to Jean-Christophe PLAGNIOL-VILLARD2009/5/14 Jean-Christophe PLAGNIOL-VILLARD <[email protected]>:
Quoted 9 lines
currently the sh lds need to sync the lds enty and
TEXT_BASEmanualy and thereloc_dstis based on itinstead provide it now from the ldflags
tested on r2dplus
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>Cc Nobuhiro Iwamatsu <[email protected]>
Appilied these patch collection.
Thank you!
Best regards,
Nobuhiro
Signature · 1 line
Nobuhiro Iwamatsu
RFC PATCH 1/2 sh: make lds more generic
Dear Nobuhiro Iwamatsu,
Quoted 6 lines · In message <[email protected]> you…
2009/5/14 Jean-Christophe PLAGNIOL-VILLARD <[email protected]>:
Quoted 5 lines
currently the sh lds need to sync the lds enty and
TEXT_BASEmanualy and thereloc_dstis based on itinstead provide it now from the ldflags
Quoted 7 lines
Quoted 4 lines
tested on r2dplus
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>Cc Nobuhiro Iwamatsu <[email protected]>Appilied these patch collection.
Thank you!
Sorry, but I don't agree. The commit message is terrible. "sh lds need to sync the lds enty" - what is that suppoosed to mean?
I insist on readable and understandable commit messages.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I perceive a possibility of an immediate chronological sequence of
events which includes a violence.
- Terry Pratchett, _The Dark Side of the Sun_RFC PATCH 1/2 sh: make lds more generic
Hi, Wolfgang.
2009/5/27 Wolfgang Denk <[email protected]>:
Quoted 14 lines
Dear Nobuhiro Iwamatsu,
Quoted 11 lines · In message <[email protected]> you…
2009/5/14 Jean-Christophe PLAGNIOL-VILLARD <[email protected]>:
Quoted 9 lines
currently the sh lds need to sync the lds enty and
TEXT_BASEmanualy and thereloc_dstis based on itinstead provide it now from the ldflags
tested on r2dplus
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>Cc Nobuhiro Iwamatsu <[email protected]>
Quoted 8 lines
Quoted 2 lines
Appilied these patch collection.
Thank you!Sorry, but I don't agree. The commit message is terrible. "sh lds need to sync the lds enty" - what is that suppoosed to mean?
I insist on readable and understandable commit messages.
OK , you are right.
Jean-Christophe, please update commit message and resend.
Best regards,
Nobuhiro
Signature · 1 line
Nobuhiro Iwamatsu