Skip to contentSkip to conversation

Address partial linking issues

PATCH Superseded Wolfgang Denk 9 participants 68 messages Nov 21, 2010 – Dec 1, 2010

Subsystems (7)
Network drivers PowerPC Kbuild PCI +3 more subsystems
lore
Share & tools
lore
#0 lore raw

cover Address partial linking issues

The switch from archive libraries to partial linking has introduced a number of problems, that are non-trivial to solve. For example, it is no longer possible to include individual object files in the linker script as we did before for example in the case of boards with embedded environment to fill up the gap caused by the need to align the environment on flash erase block boundaries.

The best (but unfortunately not easiest) approach to address this problem is probably to enable -ffunction-sections (and -ffunction-sections) so we can again (and even in much finer granularity) place certain code where we want it. When doing this step, it seems only consequent to also add --gc-sections which has the added benefit of reducing the memory footprint of the U-Boot image (both in flash and in RAM).

Unfortunately, this requires changes to a lot of linker scripts.

The following patch series prepares the groung a bit, then enables --gc-sections, -ffunction-sections and -ffunction-sections for the Power Archtiecture, and then starts to make all PowerPC boards build again, beginning with 4xx. As it turns out, this process uncovers a number of (so far undetected) bugs that have creapt in, which I try to fix as well.

To Stefan Roese: Stefan, I need your help fixing the kilauea_nand and haleakala_nand board configurations; currently these fail with a "undefined reference to `initdram'" error. It appears that in the past these included the code from cpu/ppc4xx/denali_spd_ddr2.c, but I doubt that was correct?

Comments and.or help converting the remaining processors welcome.

Note: these patches are also available in the "gc-sections" branch of the u-boot-testing repository.

Overview:
=========

[PATCH 1/7] common/Makefile: don't include env_embedded.o into libcommon

 common/Makefile |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

[PATCH 2/7] cpu/ppc4xx/Makefile: build only needed object files

 arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c           |    4 ---
 arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c |    3 --
 arch/powerpc/cpu/ppc4xx/Makefile                 |   25 ++++++++-------------
 3 files changed, 10 insertions(+), 22 deletions(-)

[PATCH 3/7] arch/powerpc/config.mk: make CONFIG_SYS_LDSCRIPT settings work

 arch/powerpc/config.mk            |    7 +++++++
 arch/powerpc/cpu/ppc4xx/config.mk |    6 +++++-
 2 files changed, 12 insertions(+), 1 deletions(-)

[PATCH 4/7] PPChameleonEVB and CATcenter need a custom linker script

 board/dave/PPChameleonEVB/u-boot.lds |  128 ++++++++++++++++++++++++++++++++++
 include/configs/CATcenter.h          |    1 +
 include/configs/PPChameleonEVB.h     |    1 +
 3 files changed, 130 insertions(+), 0 deletions(-)
 create mode 100644 board/dave/PPChameleonEVB/u-boot.lds

[PATCH 5/7] ERIC: drop unsupported board configuration

 CREDITS                |    4 -
 MAINTAINERS            |    2 -
 board/eric/Makefile    |   51 ---
 board/eric/eric.c      |  203 ---------
 board/eric/eric.h      |   44 --
 board/eric/flash.c     | 1131 ------------------------------------------------
 board/eric/init.S      |  359 ---------------
 boards.cfg             |    1 -
 doc/README.scrapyard   |    3 +-
 include/configs/ERIC.h |  369 ----------------
 10 files changed, 2 insertions(+), 2165 deletions(-)
 delete mode 100644 board/eric/Makefile
 delete mode 100644 board/eric/eric.c
 delete mode 100644 board/eric/eric.h
 delete mode 100644 board/eric/flash.c
 delete mode 100644 board/eric/init.S
 delete mode 100644 include/configs/ERIC.h

[PATCH 6/7] POWERPC: enable --gc-sections and -ffunction-sections -fdata-sections

 arch/powerpc/config.mk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

[PATCH 7/7] 4xx: Cleanup for partial linking and --gc-sections

 arch/powerpc/cpu/ppc4xx/Makefile       |    2 +-
 arch/powerpc/cpu/ppc4xx/u-boot.lds     |   53 +++++--------------------
 board/amcc/bamboo/Makefile             |    6 ++-
 board/amcc/bamboo/u-boot-nand.lds      |   50 +++++------------------
 board/amcc/bluestone/Makefile          |    6 ++-
 board/amcc/canyonlands/Makefile        |    6 ++-
 board/amcc/canyonlands/u-boot-nand.lds |   48 ++++------------------
 board/amcc/sequoia/Makefile            |    6 ++-
 board/amcc/sequoia/u-boot-nand.lds     |   48 ++++------------------
 board/amcc/sequoia/u-boot-ram.lds      |   50 +++++------------------
 board/amirix/ap1000/Makefile           |    4 +-
 board/amirix/ap1000/u-boot.lds         |   67 +++++--------------------------
 board/cray/L1/L1.c                     |    6 ---
 board/esd/dasa_sim/u-boot.lds          |   57 ++++++---------------------
 board/esd/du440/Makefile               |    6 ++-
 board/esd/pmc440/Makefile              |    6 ++-
 board/gdsys/intip/Makefile             |    6 ++-
 board/korat/Makefile                   |    6 ++-
 board/lwmon5/Makefile                  |    6 ++-
 board/ml2/u-boot.lds                   |   69 ++++---------------------------
 board/netstal/hcu5/Makefile            |    4 +-
 board/sbc405/sbc405.c                  |    7 ---
 board/t3corp/Makefile                  |    6 ++-
 include/configs/AP1000.h               |    8 ++++
 include/configs/CANBT.h                |    2 +-
 include/configs/CPCI2DP.h              |    2 +-
 include/configs/DP405.h                |    1 +
 include/configs/ML2.h                  |    9 ++++
 include/configs/sc3.h                  |    2 +-
 29 files changed, 147 insertions(+), 402 deletions(-)

Best regards,

Wolfgang Denk

Signature · 4 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 used to be indecisive, now I'm not sure.
#1 lore raw

PATCH 1/7 common/Makefile: don't include env_embedded.o into libcommon

Some boards use an embedded environment, where env_embedded.o has to be linked at a special position in the U-Boot image; to make this possible, we do not include it into libcommon.o for such boards.

---
 common/Makefile |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
common/Makefile +7 -7
index e0db382..abea91c 100644
@@ -25,8 +25,6 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)libcommon.o
 
-AOBJS	=
-
 # core
 COBJS-y += main.o
 COBJS-y += console.o
@@ -52,9 +50,9 @@ COBJS-y += cmd_version.o
 COBJS-y += env_common.o
 COBJS-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o
 COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o
-COBJS-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o
+XCOBJS-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o
 COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_embedded.o
-COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_embedded.o
+XCOBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_embedded.o
 COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_embedded.o
 COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
 COBJS-$(CONFIG_ENV_IS_IN_MG_DISK) += env_mgdisk.o
@@ -169,12 +167,14 @@ COBJS-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
 
 
 COBJS	:= $(sort $(COBJS-y))
-SRCS	:= $(AOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS	:= $(addprefix $(obj),$(AOBJS) $(COBJS))
+XCOBJS	:= $(sort $(XCOBJS-y))
+SRCS	:= $(COBJS:.o=.c) $(XCOBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS))
+XOBJS	:= $(addprefix $(obj),$(XCOBJS))
 
 CPPFLAGS += -I..
 
-all:	$(LIB) $(AOBJS)
+all:	$(LIB) $(XOBJS)
 
 $(LIB): $(obj).depend $(OBJS)
 	$(call cmd_link_o_target, $(OBJS))
Signature · 1 line
1.7.3.2
#2 lore raw

PATCH 1/7 common/Makefile: don't include env_embedded.o into libcommon

Quoted 3 lines · On Sunday, November 21, 2010 16:03:34 Wolfgang Denk wrote:

Some boards use an embedded environment, where env_embedded.o has to be linked at a special position in the U-Boot image; to make this possible, we do not include it into libcommon.o for such boards.

this patch fixed the Blackfin boards with embedded env too

-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20101121/f5e6f177/attachment.pgp

#3 lore raw

PATCH 2/7 cpu/ppc4xx/Makefile: build only needed object files

In reply to Wolfgang Denk
---
 arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c           |    4 ---
 arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c |    3 --
 arch/powerpc/cpu/ppc4xx/Makefile                 |   25 ++++++++-------------
 3 files changed, 10 insertions(+), 22 deletions(-)
arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c +0 -4
index cf9d66d..9634deb 100644
@@ -50,8 +50,6 @@
 
 #include "ecc.h"
 
-#if defined(CONFIG_SDRAM_PPC4xx_IBM_DDR2)
-
 #define PPC4xx_IBM_DDR2_DUMP_REGISTER(mnemonic)				\
 	do {								\
 		u32 data;						\
@@ -3194,5 +3192,3 @@ inline void ppc4xx_ibm_ddr2_register_dump(void)
 	PPC4xx_IBM_DDR2_DUMP_REGISTER(RTSR);
 #endif /* defined(DEBUG) */
 }
-
-#endif /* CONFIG_SDRAM_PPC4xx_IBM_DDR2 */
arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c +0 -3
index e90c93e..b909fca 100644
@@ -44,8 +44,6 @@
 
 #include "ecc.h"
 
-#if defined(CONFIG_PPC4xx_DDR_AUTOCALIBRATION)
-
 /*
  * Only compile the DDR auto-calibration code for NOR boot and
  * not for NAND boot (NAND SPL and NAND U-Boot - NUB)
@@ -1253,4 +1251,3 @@ u32 DQS_autocalibration(void)
 	return 0;
 }
 #endif /* !defined(CONFIG_NAND_U_BOOT) && !defined(CONFIG_NAND_SPL) */
-#endif /* defined(CONFIG_PPC4xx_DDR_AUTOCALIBRATION) */
arch/powerpc/cpu/ppc4xx/Makefile +10 -15
index 129a61e..d97ca20 100644
@@ -34,31 +34,27 @@ SOBJS	+= kgdb.o
 
 COBJS	:= 40x_spd_sdram.o
 
+ifndef CONFIG_NAND_SPL
+ifndef CONFIG_NAND_U_BOOT
 COBJS	+= 44x_spd_ddr.o
-COBJS	+= 44x_spd_ddr2.o
-ifdef CONFIG_PPC4xx_DDR_AUTOCALIBRATION
-COBJS	+= 4xx_ibm_ddr2_autocalib.o
 endif
+endif
+COBJS-$(CONFIG_SDRAM_PPC4xx_IBM_DDR2) += 44x_spd_ddr2.o
+COBJS-$(CONFIG_PPC4xx_DDR_AUTOCALIBRATION) += 4xx_ibm_ddr2_autocalib.o
 COBJS	+= 4xx_pci.o
 COBJS	+= 4xx_pcie.o
 COBJS	+= bedbug_405.o
-ifdef CONFIG_CMD_CHIP_CONFIG
-COBJS	+= cmd_chip_config.o
-endif
+COBJS-$(CONFIG_CMD_CHIP_CONFIG)	+= cmd_chip_config.o
 COBJS	+= cpu.o
 COBJS	+= cpu_init.o
 COBJS	+= denali_data_eye.o
 COBJS	+= denali_spd_ddr2.o
 COBJS	+= ecc.o
-ifdef CONFIG_CMD_ECCTEST
-COBJS	+= cmd_ecctest.o
-endif
+COBJS-$(CONFIG_CMD_ECCTEST) += cmd_ecctest.o
 COBJS	+= fdt.o
 COBJS	+= interrupts.o
 COBJS	+= iop480_uart.o
-ifdef CONFIG_CMD_REGINFO
-COBJS	+= reginfo.o
-endif
+COBJS-$(CONFIG_CMD_REGINFO) += reginfo.o
 COBJS	+= sdram.o
 COBJS	+= speed.o
 COBJS	+= tlb.o
@@ -66,17 +62,16 @@ COBJS	+= traps.o
 COBJS	+= usb.o
 COBJS	+= usb_ohci.o
 COBJS	+= usbdev.o
+COBJS-$(CONFIG_XILINX_440) += xilinx_irq.o
 ifndef CONFIG_XILINX_440
 COBJS	+= 4xx_uart.o
 COBJS	+= gpio.o
 COBJS	+= miiphy.o
 COBJS	+= uic.o
-else
-COBJS	+= xilinx_irq.o
 endif
 
 SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
+OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS) $(COBJS-y))
 START	:= $(addprefix $(obj),$(START))
 
 all:	$(obj).depend $(START) $(LIB)
Signature · 1 line
1.7.3.2
#4 lore raw

PATCH 3/7 arch/powerpc/config.mk: make CONFIG_SYS_LDSCRIPT settings work

In reply to Wolfgang Denk
---
 arch/powerpc/config.mk            |    7 +++++++
 arch/powerpc/cpu/ppc4xx/config.mk |    6 +++++-
 2 files changed, 12 insertions(+), 1 deletions(-)
arch/powerpc/config.mk +7 -0
index 06a3b10..8cf2279 100644
@@ -29,6 +29,13 @@ PLATFORM_RELFLAGS += -mrelocatable
 PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__
 PLATFORM_LDFLAGS  += -n
 
+ifdef CONFIG_SYS_LDSCRIPT
+# need to strip off double quotes
+LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT))
+else ifdef CONFIG_NAND_U_BOOT
+LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds
+endif
+
 #
 # When cross-compiling on NetBSD, we have to define __PPC__ or else we
 # will pick up a va_list declaration that is incompatible with the
arch/powerpc/cpu/ppc4xx/config.mk +5 -1
index 5bda710..297a53b 100644
@@ -33,5 +33,9 @@ else
 PLATFORM_CPPFLAGS += -Wa,-m405 -mcpu=405
 endif
 
-# Use default linker script.  Board port can override in board/*/config.mk
+ifdef CONFIG_SYS_LDSCRIPT
+# need to strip off double quotes
+LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT))
+else
 LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/ppc4xx/u-boot.lds
+endif
Signature · 1 line
1.7.3.2
#5 lore raw

PATCH 4/7 PPChameleonEVB and CATcenter need a custom linker script

In reply to Wolfgang Denk

These boards use an embedded environment, which is not supported by the generic arch/powerpc/cpu/ppc4xx/u-boot.lds script.

The breakage was introduced by commit 2cd95a2 "ppc4xx: Remove board specific linker scripts from most PPC4xx boards"

Cc Stefan Roese <[email protected]>
Cc Andrea Marson <[email protected]>
---
 board/dave/PPChameleonEVB/u-boot.lds |  128 ++++++++++++++++++++++++++++++++++
 include/configs/CATcenter.h          |    1 +
 include/configs/PPChameleonEVB.h     |    1 +
 3 files changed, 130 insertions(+), 0 deletions(-)
 create mode 100644 board/dave/PPChameleonEVB/u-boot.lds
board/dave/PPChameleonEVB/u-boot.lds new file +128 -0
new file mode 100644
index 0000000..17f5919
@@ -0,0 +1,128 @@
+/*
+ * Copyright 2007-2009 Freescale Semiconductor, Inc.
+ *
+ * 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
+ */
+
+#include "config.h"	/* CONFIG_BOARDDIR */
+
+#ifndef RESET_VECTOR_ADDRESS
+#define RESET_VECTOR_ADDRESS	0xfffffffc
+#endif
+
+OUTPUT_ARCH(powerpc)
+
+PHDRS
+{
+  text PT_LOAD;
+  bss PT_LOAD;
+}
+
+SECTIONS
+{
+  /* Read-only sections, merged into text segment: */
+  . = + SIZEOF_HEADERS;
+  .text      :
+  {
+    *(.text*)
+   } :text
+    _etext = .;
+    PROVIDE (etext = .);
+    .rodata    :
+   {
+    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
+  } :text
+
+  /* Read-write section, merged into data segment: */
+  . = (. + 0x00FF) & 0xFFFFFF00;
+  _erotext = .;
+  PROVIDE (erotext = .);
+  .reloc   :
+  {
+    KEEP(*(.got))
+    _GOT2_TABLE_ = .;
+    KEEP(*(.got2))
+    _FIXUP_TABLE_ = .;
+    KEEP(*(.fixup))
+  }
+  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
+  __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
+
+  .data    :
+  {
+    *(.data*)
+    *(.sdata*)
+  }
+  _edata  =  .;
+  PROVIDE (edata = .);
+
+  . = .;
+  __u_boot_cmd_start = .;
+  .u_boot_cmd : { *(.u_boot_cmd) }
+  __u_boot_cmd_end = .;
+
+  . = .;
+  __start___ex_table = .;
+  __ex_table : { *(__ex_table) }
+  __stop___ex_table = .;
+
+  . = ALIGN(256);
+  __init_begin = .;
+  .text.init : { *(.text.init) }
+  .data.init : { *(.data.init) }
+  . = ALIGN(256);
+  __init_end = .;
+
+  ppcenv_assert = ASSERT(. < 0xFFFF8000, ".bss section too big, overlaps .ppcenv section. Please update your confguration: CONFIG_SYS_MONITOR_BASE, CONFIG_SYS_MONITOR_LEN and CONFIG_SYS_TEXT_BASE may need to be modified.");
+  . = 0xFFFF8000;
+  .ppcenv :
+  {
+    common/env_embedded.o(.ppcenv);
+  }
+
+  .resetvec RESET_VECTOR_ADDRESS :
+  {
+    KEEP(*(.resetvec))
+  } :text = 0xffff
+
+  . = RESET_VECTOR_ADDRESS + 0x4;
+
+  /*
+   * Make sure that the bss segment isn't linked@0x0, otherwise its
+   * address won't be updated during relocation fixups.  Note that
+   * this is a temporary fix.  Code to dynamically the fixup the bss
+   * location will be added in the future.  When the bss relocation
+   * fixup code is present this workaround should be removed.
+   */
+#if (RESET_VECTOR_ADDRESS == 0xfffffffc)
+  . |= 0x10;
+#endif
+
+  __bss_start = .;
+  .bss (NOLOAD)       :
+  {
+   *(.bss*)
+   *(.sbss*)
+   *(COMMON)
+  } :bss
+
+  . = ALIGN(4);
+  _end = . ;
+  PROVIDE (end = .);
+}
include/configs/CATcenter.h +1 -0
index ac70d15..0b75a4e 100644
@@ -76,6 +76,7 @@
 #define CONFIG_PPCHAMELEONEVB	1	/* ...on a PPChameleonEVB board */
 
 #define	CONFIG_SYS_TEXT_BASE	0xFFFB0000	/* Reserve 320 kB for Monitor */
+#define CONFIG_SYS_LDSCRIPT	"board/dave/PPChameleonEVB/u-boot.lds"
 
 #define CONFIG_BOARD_EARLY_INIT_F 1	/* call board_early_init_f()	*/
 #define CONFIG_MISC_INIT_R	1	/* call misc_init_r()		*/
include/configs/PPChameleonEVB.h +1 -0
index a14bd0e..195925a 100644
@@ -76,6 +76,7 @@
 #define CONFIG_PPCHAMELEONEVB	1	/* ...on a PPChameleonEVB board */
 
 #define	CONFIG_SYS_TEXT_BASE	0xFFFB0000	/* Reserve 320 kB for Monitor */
+#define CONFIG_SYS_LDSCRIPT	"board/dave/PPChameleonEVB/u-boot.lds"
 
 #define CONFIG_BOARD_EARLY_INIT_F 1	/* call board_early_init_f()	*/
 #define CONFIG_MISC_INIT_R	1	/* call misc_init_r()		*/
Signature · 1 line
1.7.3.2
#6 lore raw

PATCH 5/7 ERIC: drop unsupported board configuration

In reply to Wolfgang Denk

The ERIC board appears to be unmaintained for more than 9 years. The environment location has probably never been correct, and has been definitely broken since for at least a year. Drop it.

Cc Stefan Roese <[email protected]>
Cc Swen Anderson <[email protected]>
---
 CREDITS                |    4 -
 MAINTAINERS            |    2 -
 board/eric/Makefile    |   51 ---
 board/eric/eric.c      |  203 ---------
 board/eric/eric.h      |   44 --
 board/eric/flash.c     | 1131 ------------------------------------------------
 board/eric/init.S      |  359 ---------------
 boards.cfg             |    1 -
 doc/README.scrapyard   |    3 +-
 include/configs/ERIC.h |  369 ----------------
 10 files changed, 2 insertions(+), 2165 deletions(-)
 delete mode 100644 board/eric/Makefile
 delete mode 100644 board/eric/eric.c
 delete mode 100644 board/eric/eric.h
 delete mode 100644 board/eric/flash.c
 delete mode 100644 board/eric/init.S
 delete mode 100644 include/configs/ERIC.h
CREDITS +0 -4
index d681018..253abac 100644
@@ -22,10 +22,6 @@ N: Guillaume Alexandre
 E: guillaume.alexandre at gespac.ch
 D: Add PCIPPC6 configuration
 
-N: Swen Anderson
-E: sand at peppercon.de
-D: ERIC Support
-
 N: Pantelis Antoniou
 E: panto at intracom.gr
 D: NETVIA & NETPHONE board support, ARTOS support.
MAINTAINERS +0 -2
index 9258cb1..02a5ee0 100644
@@ -524,8 +524,6 @@ Unknown / orphaned boards:
 	RPXClassic	MPC8xx
 	RPXlite		MPC8xx
 
-	ERIC		PPC4xx
-
 	MOUSSE		MPC824x
 
 	RPXsuper	MPC8260
board/eric/Makefile deleted +0 -51

51 lines not on this page · raw message

board/eric/eric.c deleted +0 -203

203 lines not on this page · raw message

board/eric/eric.h deleted +0 -44

44 lines not on this page · raw message

board/eric/flash.c deleted +0 -1131

1,131 lines not on this page · raw message

board/eric/init.S deleted +0 -359

359 lines not on this page · raw message

boards.cfg +0 -1
index 08e531e..aa630ef 100644
@@ -269,7 +269,6 @@ TTTech		powerpc	mpc8xx		tqm8xx		tqc		-	TQM823L:LCD,SHARP_LQ104V7DS01
 wtk		powerpc	mpc8xx		tqm8xx		tqc		-	TQM823L:LCD,SHARP_LQ065T9DR51U
 csb272		powerpc	ppc4xx
 csb472		powerpc	ppc4xx
-ERIC		powerpc	ppc4xx		eric
 G2000		powerpc	ppc4xx		g2000
 JSE		powerpc	ppc4xx		jse
 korat		powerpc	ppc4xx
doc/README.scrapyard +2 -1
index 4286559..fd2b726 100644
@@ -11,7 +11,8 @@ easily if here is something they might want to dig for...
 
 Board	Arch	CPU	removed	    Commit	last known maintainer/contact
 =============================================================================
-VoVPN-GW_100MHz	powerpc	MPC8260 - 2010-10-24	Juergen Selent <[email protected]>
+ERIC	powerpc	405GP	-	  2010-11-21	Swen Anderson <[email protected]>
+VoVPN-GW_100MHz	powerpc	MPC8260 26fe3d2 2010-10-24	Juergen Selent <[email protected]>
 NC650	powerpc	MPC852	333d86d   2010-10-19	Wolfgang Denk <[email protected]>
 CP850	powerpc	MPC852	333d86d   2010-10-19	Wolfgang Denk <[email protected]>
 logodl	ARM	PXA2xx	059e778   2010-10-18	August Hoeraendl <[email protected]>
include/configs/ERIC.h deleted +0 -369

369 lines not on this page · raw message

Signature · 1 line
1.7.3.2
#7 lore raw

PATCH 6/7 POWERPC: enable --gc-sections and -ffunction-sections -fdata-sections

In reply to Wolfgang Denk

The switch from archive libraries to partial linking has introduced a number of problems, that are non-trivial to solve. For example, it is no longer possible to include individual object files in the linker script as we did before for example in the case of boards with embedded environment to fill up the gap caused by the need to align the environment on flash erase block boundaries.

The best (but unfortunately not easiest) approach to address this problem is to enable -ffunction-sections (and -ffunction-sections) so we can again (and even in much finer granularity) place certain code where we want it. When doing this step, it seems only consequent to also add --gc-sections which has the added benefit of reducing the memory footprint of the U-Boot image (both in flash and in RAM).

Unfortunately, this requires changes to a lot of linker scripts.

---
 arch/powerpc/config.mk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/config.mk +2 -2
index 8cf2279..271409f 100644
@@ -25,9 +25,9 @@ CROSS_COMPILE ?= ppc_8xx-
 
 STANDALONE_LOAD_ADDR = 0x40000
 
-PLATFORM_RELFLAGS += -mrelocatable
+PLATFORM_RELFLAGS += -mrelocatable -ffunction-sections -fdata-sections
 PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__
-PLATFORM_LDFLAGS  += -n
+PLATFORM_LDFLAGS  += -n --gc-sections
 
 ifdef CONFIG_SYS_LDSCRIPT
 # need to strip off double quotes
Signature · 1 line
1.7.3.2
#8 lore raw

PATCH 6/7 POWERPC: enable --gc-sections and -ffunction-sections -fdata-sections

Hi Wolfgang,

Quoted 9 lines · Wolfgang Denk

The switch from archive libraries to partial linking has introduced a number of problems, that are non-trivial to solve. For example, it is no longer possible to include individual object files in the linker script as we did before for example in the case of boards with embedded environment to fill up the gap caused by the need to align the environment on flash erase block boundaries.

The best (but unfortunately not easiest) approach to address this problem is to enable -ffunction-sections (and -ffunction-sections) so

's/function-sections/data-sections/' in the 2nd location above.

<snip>

arch/powerpc/config.mk CROSS_COMPILE ?= ppc_8xx- · line 30

Quoted 11 lines
arch/powerpc/config.mk +2 -2
@@ -25,9 +25,9 @@ CROSS_COMPILE ?= ppc_8xx-
 
 STANDALONE_LOAD_ADDR = 0x40000
 
-PLATFORM_RELFLAGS += -mrelocatable
+PLATFORM_RELFLAGS += -mrelocatable -ffunction-sections -fdata-sections
 PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__
-PLATFORM_LDFLAGS  += -n
+PLATFORM_LDFLAGS  += -n --gc-sections

The above changes already exist in arch/powerpc/cpu/mpc85xx/config.mk and arch/powerpc/cpu/mpc86xx/config.mk. It'd be nice to remove those references in this patch so they aren't duplicated.

Best,
Peter

#9 lore raw

PATCH 6/7 POWERPC: enable --gc-sections and -ffunction-sections -fdata-sections

Dear Peter Tyser,

Quoted 5 lines · In message <1290378684.20072.125.camel@petert> you wrote:
Quoted 3 lines

The best (but unfortunately not easiest) approach to address this problem is to enable -ffunction-sections (and -ffunction-sections) so

's/function-sections/data-sections/' in the 2nd location above.

Oops. Copy & paste ;-)

Quoted 3 lines

The above changes already exist in arch/powerpc/cpu/mpc85xx/config.mk and arch/powerpc/cpu/mpc86xx/config.mk. It'd be nice to remove those references in this patch so they aren't duplicated.

Right. Thanks for pointing out. v2 on the way.

Best regards,

Wolfgang Denk

Signature · 5 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
Syntactic sugar causes cancer of the semicolon.
                - Epigrams in Programming, ACM SIGPLAN Sept. 1982
#10 lore raw

PATCH v2 6/7 POWERPC: enable --gc-sections and -ffunction-sections -fdata-sections

In reply to Wolfgang Denk

The switch from archive libraries to partial linking has introduced a number of problems, that are non-trivial to solve. For example, it is no longer possible to include individual object files in the linker script as we did before for example in the case of boards with embedded environment to fill up the gap caused by the need to align the environment on flash erase block boundaries.

The best (but unfortunately not easiest) approach to address this problem is to enable -ffunction-sections (and -fdata-sections) so we can again (and even in much finer granularity) place certain code where we want it. When doing this step, it seems only consequent to also add --gc-sections which has the added benefit of reducing the memory footprint of the U-Boot image (both in flash and in RAM).

Unfortunately, this requires changes to a lot of linker scripts.

---
v2: - fix copy & p[aste error in commit message
- remove now duplicated options for 85xx and 86xx

 arch/powerpc/config.mk             |    4 ++--
 arch/powerpc/cpu/mpc85xx/config.mk |    4 ----
 arch/powerpc/cpu/mpc86xx/config.mk |    4 ----
 3 files changed, 2 insertions(+), 10 deletions(-)
arch/powerpc/config.mk +2 -2
index 8cf2279..271409f 100644
@@ -25,9 +25,9 @@ CROSS_COMPILE ?= ppc_8xx-
 
 STANDALONE_LOAD_ADDR = 0x40000
 
-PLATFORM_RELFLAGS += -mrelocatable
+PLATFORM_RELFLAGS += -mrelocatable -ffunction-sections -fdata-sections
 PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__
-PLATFORM_LDFLAGS  += -n
+PLATFORM_LDFLAGS  += -n --gc-sections
 
 ifdef CONFIG_SYS_LDSCRIPT
 # need to strip off double quotes
arch/powerpc/cpu/mpc85xx/config.mk +0 -4
index ce4376b..f07d920 100644
@@ -25,10 +25,6 @@ PLATFORM_RELFLAGS += -fPIC -meabi
 
 PLATFORM_CPPFLAGS += -ffixed-r2 -Wa,-me500 -msoft-float -mno-string
 
-# Enable gc-sections to enable generation of smaller images.
-PLATFORM_LDFLAGS += --gc-sections
-PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
-
 # -mspe=yes is needed to have -mno-spe accepted by a buggy GCC;
 # see "[PATCH,rs6000] make -mno-spe work as expected" on
 # http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00311.html
arch/powerpc/cpu/mpc86xx/config.mk +0 -4
index bce0fb3..7fae7e4 100644
@@ -26,9 +26,5 @@ PLATFORM_RELFLAGS += -fPIC -meabi
 PLATFORM_CPPFLAGS += -ffixed-r2 -mstring
 PLATFORM_CPPFLAGS += -maltivec -mabi=altivec -msoft-float
 
-# Enable gc-sections to enable generation of smaller images.
-PLATFORM_LDFLAGS += --gc-sections
-PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
-
 # Use default linker script.  Board port can override in board/*/config.mk
 LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/mpc86xx/u-boot.lds
Signature · 1 line
1.7.3.2
#11 lore raw

PATCH 7/7 4xx: Cleanup for partial linking and --gc-sections

In reply to Wolfgang Denk

This commit adapts 4xx boards for partial linking with --gc-sections.

Cc Stefan Roese <[email protected]>
Cc Tirumala Marri <[email protected]>
Cc David Updegraff <[email protected]>
Cc Matthias Fuchs <[email protected]>
Cc Dirk Eibach <[email protected]>
Cc Larry Johnson <[email protected]>
Cc Peter De Schrijver <[email protected]>
Cc Niklaus Giger <[email protected]>
Cc Daniel Poirot <[email protected]>
---
 arch/powerpc/cpu/ppc4xx/Makefile       |    2 +-
 arch/powerpc/cpu/ppc4xx/u-boot.lds     |   53 +++++--------------------
 board/amcc/bamboo/Makefile             |    6 ++-
 board/amcc/bamboo/u-boot-nand.lds      |   50 +++++------------------
 board/amcc/bluestone/Makefile          |    6 ++-
 board/amcc/canyonlands/Makefile        |    6 ++-
 board/amcc/canyonlands/u-boot-nand.lds |   48 ++++------------------
 board/amcc/sequoia/Makefile            |    6 ++-
 board/amcc/sequoia/u-boot-nand.lds     |   48 ++++------------------
 board/amcc/sequoia/u-boot-ram.lds      |   50 +++++------------------
 board/amirix/ap1000/Makefile           |    4 +-
 board/amirix/ap1000/u-boot.lds         |   67 +++++--------------------------
 board/cray/L1/L1.c                     |    6 ---
 board/esd/dasa_sim/u-boot.lds          |   57 ++++++---------------------
 board/esd/du440/Makefile               |    6 ++-
 board/esd/pmc440/Makefile              |    6 ++-
 board/gdsys/intip/Makefile             |    6 ++-
 board/korat/Makefile                   |    6 ++-
 board/lwmon5/Makefile                  |    6 ++-
 board/ml2/u-boot.lds                   |   69 ++++---------------------------
 board/netstal/hcu5/Makefile            |    4 +-
 board/sbc405/sbc405.c                  |    7 ---
 board/t3corp/Makefile                  |    6 ++-
 include/configs/AP1000.h               |    8 ++++
 include/configs/CANBT.h                |    2 +-
 include/configs/CPCI2DP.h              |    2 +-
 include/configs/DP405.h                |    1 +
 include/configs/ML2.h                  |    9 ++++
 include/configs/sc3.h                  |    2 +-
 29 files changed, 147 insertions(+), 402 deletions(-)
arch/powerpc/cpu/ppc4xx/Makefile +1 -1
index d97ca20..93ebf89 100644
@@ -37,9 +37,9 @@ COBJS	:= 40x_spd_sdram.o
 ifndef CONFIG_NAND_SPL
 ifndef CONFIG_NAND_U_BOOT
 COBJS	+= 44x_spd_ddr.o
+COBJS-$(CONFIG_SDRAM_PPC4xx_IBM_DDR2) += 44x_spd_ddr2.o
 endif
 endif
-COBJS-$(CONFIG_SDRAM_PPC4xx_IBM_DDR2) += 44x_spd_ddr2.o
 COBJS-$(CONFIG_PPC4xx_DDR_AUTOCALIBRATION) += 4xx_ibm_ddr2_autocalib.o
 COBJS	+= 4xx_pci.o
 COBJS	+= 4xx_pcie.o
arch/powerpc/cpu/ppc4xx/u-boot.lds +10 -43

100 lines not on this page · raw message

board/amcc/bamboo/Makefile +4 -2
index 7c0f50f..2e7dc39 100644
@@ -32,8 +32,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $^)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
board/amcc/bamboo/u-boot-nand.lds +10 -40

93 lines not on this page · raw message

board/amcc/bluestone/Makefile +4 -2
index bcc5252..642eda0 100644
@@ -33,8 +33,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $^)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
board/amcc/canyonlands/Makefile +4 -2
index c8ecaf9..4d87ea9 100644
@@ -34,8 +34,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $^)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
board/amcc/canyonlands/u-boot-nand.lds +9 -39

92 lines not on this page · raw message

board/amcc/sequoia/Makefile +4 -2
index 5085138..efe2065 100644
@@ -34,8 +34,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $^)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
board/amcc/sequoia/u-boot-nand.lds +9 -39

92 lines not on this page · raw message

board/amcc/sequoia/u-boot-ram.lds +10 -40

85 lines not on this page · raw message

board/amirix/ap1000/Makefile +3 -1
index fdf6145..fe7a6a2 100644
@@ -32,7 +32,9 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
 	$(call cmd_link_o_target, $^)
 
 clean:
board/amirix/ap1000/u-boot.lds +10 -57

110 lines not on this page · raw message

board/cray/L1/L1.c +0 -6
index 0f5f02c..d87b6ef 100644
@@ -170,12 +170,6 @@ int misc_init_r (void)
 }
 
 /* ------------------------------------------------------------------------- */
-phys_size_t initdram (int board_type)
-{
-	return (L1_MEMSIZE);
-}
-
-/* ------------------------------------------------------------------------- */
 /* stubs so we can print dates w/o any nvram RTC.*/
 int rtc_get (struct rtc_time *tmp)
 {
board/esd/dasa_sim/u-boot.lds +12 -45

103 lines not on this page · raw message

board/esd/du440/Makefile +4 -2
index 7b7b4f7..06824c7 100644
@@ -32,8 +32,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $^)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
board/esd/pmc440/Makefile +4 -2
index b2f4465..f640d1e 100644
@@ -37,8 +37,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $^)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
board/gdsys/intip/Makefile +4 -2
index c8ecaf9..4d87ea9 100644
@@ -34,8 +34,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $^)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
board/korat/Makefile +4 -2
index 83b4d61..6781596 100644
@@ -32,8 +32,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $^)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
board/lwmon5/Makefile +4 -2
index ba9387d..f7fef96 100644
@@ -32,8 +32,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $^)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
board/ml2/u-boot.lds +9 -60

108 lines not on this page · raw message

board/netstal/hcu5/Makefile +3 -1
index 5348765..280c2f6 100644
@@ -34,7 +34,9 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
 	$(call cmd_link_o_target, $^)
 
 clean:
board/sbc405/sbc405.c +0 -7
index 33b4d11..4efc410 100644
@@ -96,13 +96,6 @@ int checkboard (void)
 
 /* ------------------------------------------------------------------------- */
 
-phys_size_t initdram (int board_type)
-{
-	return  spd_sdram ();
-}
-
-/* ------------------------------------------------------------------------- */
-
 int testdram (void)
 {
 	/* TODO: XXX XXX XXX */
board/t3corp/Makefile +4 -2
index 682174f..4211b7b 100644
@@ -34,8 +34,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $^)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
include/configs/AP1000.h +8 -0
index 9e5490d..ffaab79 100644
@@ -94,6 +94,14 @@
 #define CONFIG_SPD_EEPROM	1	/* use SPD EEPROM for setup    */
 
 /*
+ * I2C
+ */
+#define CONFIG_HARD_I2C			/* I2C with hardware support	*/
+#define CONFIG_PPC4XX_I2C		/* use PPC4xx driver		*/
+#define CONFIG_SYS_I2C_SLAVE	0x7F
+#define CONFIG_SYS_I2C_SPEED	400000
+
+/*
  * Miscellaneous configurable options
  */
 #define CONFIG_SYS_LONGHELP			/* undef to save memory	    */
include/configs/CANBT.h +1 -1
index b27ef64..be9238e 100644
@@ -77,7 +77,7 @@
 #define CONFIG_CMD_EEPROM
 
 #undef CONFIG_CMD_NET
-
+#undef CONFIG_CMD_NFS
 
 #undef CONFIG_WATCHDOG			/* watchdog disabled		*/
 
include/configs/CPCI2DP.h +1 -1
index 99ace67..afe8d6e 100644
@@ -78,7 +78,7 @@
 #define CONFIG_CMD_EEPROM
 
 #undef CONFIG_CMD_NET
-
+#undef CONFIG_CMD_NFS
 
 #undef	CONFIG_WATCHDOG			/* watchdog disabled		*/
 
include/configs/DP405.h +1 -0
index ecdf93f..f6e2652 100644
@@ -65,6 +65,7 @@
 #define CONFIG_CMD_EEPROM
 
 #undef CONFIG_CMD_NET
+#undef CONFIG_CMD_NFS
 
 #undef	CONFIG_WATCHDOG			/* watchdog disabled		*/
 
include/configs/ML2.h +9 -0
index ed78387..1e96b9e 100644
@@ -88,6 +88,7 @@
 #define CONFIG_CMD_JFFS2
 
 #undef CONFIG_CMD_NET
+#undef CONFIG_CMD_NFS
 #undef CONFIG_CMD_RTC
 #undef CONFIG_CMD_PCI
 #undef CONFIG_CMD_I2C
@@ -100,6 +101,14 @@
 #define CONFIG_SPD_EEPROM      1       /* use SPD EEPROM for setup    */
 
 /*
+ * I2C
+ */
+#define CONFIG_HARD_I2C			/* I2C with hardware support	*/
+#define CONFIG_PPC4XX_I2C		/* use PPC4xx driver		*/
+#define CONFIG_SYS_I2C_SLAVE	0x7F
+#define CONFIG_SYS_I2C_SPEED	400000
+
+/*
  * Miscellaneous configurable options
  */
 #define CONFIG_SYS_LONGHELP			/* undef to save memory		*/
include/configs/sc3.h +1 -1
index 0451105..873d3b4 100644
@@ -518,7 +518,7 @@
 
 #define CONFIG_SYS_EBC_CFG    0xb84ef000
 
-#define CONFIG_SDRAM_BANK0	/* use the standard SDRAM initialization */
+#undef CONFIG_SDRAM_BANK0	/* use private SDRAM initialization */
 #undef CONFIG_SPD_EEPROM
 
 /*
Signature · 1 line
1.7.3.2
#12 lore raw

PATCH 7/7 4xx: Cleanup for partial linking and --gc-sections

Hi Wolfgang,

Quoted 1 line · On Sunday 21 November 2010 22:03:40 Wolfgang Denk wrote:

This commit adapts 4xx boards for partial linking with --gc-sections.

Thanks. One comment below.

<snip>

arch/powerpc/cpu/ppc4xx/Makefile COBJS := 40x_spd_sdram.o · line 42

Quoted 12 lines
(quoted diff) +0 -0

b/arch/powerpc/cpu/ppc4xx/Makefile index d97ca20..93ebf89 100644

arch/powerpc/cpu/ppc4xx/Makefile +1 -1
@@ -37,9 +37,9 @@ COBJS	:= 40x_spd_sdram.o
 ifndef CONFIG_NAND_SPL
 ifndef CONFIG_NAND_U_BOOT
 COBJS	+= 44x_spd_ddr.o
+COBJS-$(CONFIG_SDRAM_PPC4xx_IBM_DDR2) += 44x_spd_ddr2.o
 endif
 endif
-COBJS-$(CONFIG_SDRAM_PPC4xx_IBM_DDR2) += 44x_spd_ddr2.o

This change introduces the problem with the kilauea/haleakala NAND booting images. Yes, I am aware that without this change, canyonlands_nand fails to build. I noticed this too right now. I'll send another patch to fix this canyonlands_nand build problem shortly.

Cheers,
Stefan

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

#13 lore raw

PATCH 7/7 4xx: Cleanup for partial linking and --gc-sections

Dear Stefan Roese,

Quoted 16 lines · In message <[email protected]> you wrote:

arch/powerpc/cpu/ppc4xx/Makefile COBJS := 40x_spd_sdram.o · line 42

Quoted 11 lines
arch/powerpc/cpu/ppc4xx/Makefile +1 -1
@@ -37,9 +37,9 @@ COBJS	:= 40x_spd_sdram.o
 ifndef CONFIG_NAND_SPL
 ifndef CONFIG_NAND_U_BOOT
 COBJS	+= 44x_spd_ddr.o
+COBJS-$(CONFIG_SDRAM_PPC4xx_IBM_DDR2) += 44x_spd_ddr2.o
 endif
 endif
-COBJS-$(CONFIG_SDRAM_PPC4xx_IBM_DDR2) += 44x_spd_ddr2.o

This change introduces the problem with the kilauea/haleakala NAND booting images. Yes, I am aware that without this change, canyonlands_nand fails to build. I noticed this too right now. I'll send another patch to fix this canyonlands_nand build problem shortly.

Without this, kilauea/haleakala NAND boot configurations load the 44x_spd_ddr2 init code, which you said was not the correct thing.

So which is correct?

Best regards,

Wolfgang Denk

Signature · 5 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
Inside every old person is a young person wondering what happened.
                              - Terry Pratchett, _Moving Pictures_
#14 lore raw

PATCH 7/7 4xx: Cleanup for partial linking and --gc-sections

Hi Wolfgang,

Quoted 20 lines · On Tuesday 23 November 2010 20:55:03 Wolfgang Denk wrote:
Quoted 13 lines
Quoted 13 lines
arch/powerpc/cpu/ppc4xx/Makefile +1 -0
@@ -37,9 +37,9 @@ COBJS	:= 40x_spd_sdram.o
 
 ifndef CONFIG_NAND_SPL
 ifndef CONFIG_NAND_U_BOOT
 COBJS	+= 44x_spd_ddr.o
 
+COBJS-$(CONFIG_SDRAM_PPC4xx_IBM_DDR2) += 44x_spd_ddr2.o
 
 endif
 endif
Quoted 6 lines

arch/powerpc/cpu/ppc4xx/Makefile COBJS := 40x_spd_sdram.o · line 42

Quoted 1 line
arch/powerpc/cpu/ppc4xx/Makefile +0 -1
-COBJS-$(CONFIG_SDRAM_PPC4xx_IBM_DDR2) += 44x_spd_ddr2.o

This change introduces the problem with the kilauea/haleakala NAND booting images. Yes, I am aware that without this change, canyonlands_nand fails to build. I noticed this too right now. I'll send another patch to fix this canyonlands_nand build problem shortly.

Quoted 4 lines

Without this, kilauea/haleakala NAND boot configurations load the 44x_spd_ddr2 init code, which you said was not the correct thing.

So which is correct?

I said that denali_spd_ddr2.c was incorrect. Note that that 44x_spd_ddr2.c not only has code for SPD type DDR2 inititalization but also fixed init code for this DDR2 controller. So its a bit of a misnomer. I can rename this file but I suggest to do this at a later time.

Please also note, that I sent a patch that fixes those problems "ppc4xx: Fix build problems of IBM DDR2 NAND booting targets". Its a add-on patch to your patchset and you can squash it into your patches if you prefer (I mentioned this in the patch comments of this patch).

Cheers,
Stefan

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

#15 lore raw

PATCH 1/1 86xx: Cleanup for partial linking and --gc-sections

In reply to Wolfgang Denk
---
 arch/powerpc/cpu/mpc86xx/Makefile   |    6 ++--
 arch/powerpc/cpu/mpc86xx/u-boot.lds |   36 ++--------------------------------
 2 files changed, 6 insertions(+), 36 deletions(-)
arch/powerpc/cpu/mpc86xx/Makefile +3 -3
index 9b2db1b..5b7d80a 100644
@@ -28,7 +28,8 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(CPU).o
 
-START	= start.o
+SSTART	= start.o
+CSTART	= traps.o
 
 SOBJS-y += cache.o
 SOBJS-$(CONFIG_MP) += release.o
@@ -42,11 +43,10 @@ COBJS-$(CONFIG_OF_LIBFDT) += fdt.o
 COBJS-y	+= interrupts.o
 COBJS-$(CONFIG_MP) += mp.o
 COBJS-y	+= speed.o
-COBJS-y	+= traps.o
 
 SRCS	:= $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
 OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
-START	:= $(addprefix $(obj),$(START))
+START	:= $(addprefix $(obj),$(SSTART) $(CSTART))
 
 all:	$(obj).depend $(START) $(LIB)
 
arch/powerpc/cpu/mpc86xx/u-boot.lds +3 -33
index 4bfcb90..49a4c78 100644
@@ -26,40 +26,10 @@ SECTIONS
 {
 
   /* Read-only sections, merged into text segment: */
-  .interp : { *(.interp) }
-  .hash          : { *(.hash)		}
-  .dynsym        : { *(.dynsym)		}
-  .dynstr        : { *(.dynstr)		}
-  .rel.text      : { *(.rel.text)		}
-  .rela.text     : { *(.rela.text)	}
-  .rel.data      : { *(.rel.data)		}
-  .rela.data     : { *(.rela.data)	}
-  .rel.rodata    : { *(.rel.rodata)	}
-  .rela.rodata   : { *(.rela.rodata)	}
-  .rel.got       : { *(.rel.got)		}
-  .rela.got      : { *(.rela.got)		}
-  .rel.ctors     : { *(.rel.ctors)	}
-  .rela.ctors    : { *(.rela.ctors)	}
-  .rel.dtors     : { *(.rel.dtors)	}
-  .rela.dtors    : { *(.rela.dtors)	}
-  .rel.bss       : { *(.rel.bss)		}
-  .rela.bss      : { *(.rela.bss)		}
-  .rel.plt       : { *(.rel.plt)		}
-  .rela.plt      : { *(.rela.plt)		}
-  .init          : { *(.init)	}
-  .plt : { *(.plt) }
   .text      :
   {
-    arch/powerpc/cpu/mpc86xx/start.o	(.text)
-    arch/powerpc/cpu/mpc86xx/traps.o (.text)
-    arch/powerpc/cpu/mpc86xx/interrupts.o (.text)
-    arch/powerpc/cpu/mpc86xx/cpu_init.o (.text)
-    arch/powerpc/cpu/mpc86xx/cpu.o (.text)
-    arch/powerpc/cpu/mpc86xx/speed.o (.text)
-    common/dlmalloc.o (.text)
-    lib/crc32.o (.text)
-    arch/powerpc/lib/extable.o (.text)
-    lib/zlib.o (.text)
+    arch/powerpc/cpu/mpc86xx/start.o	(.text*)
+    arch/powerpc/cpu/mpc86xx/traps.o	(.text*)
     *(.text*)
    }
     _etext = .;
@@ -112,8 +82,8 @@ SECTIONS
   __bss_start = .;
   .bss (NOLOAD)       :
   {
-   *(.sbss*)
    *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
   }
Signature · 1 line
1.7.3.2
#16 lore raw

PATCH 1/1 8xx: Cleanup for partial linking and --gc-sections

In reply to Wolfgang Denk
---
 arch/powerpc/cpu/mpc8xx/Makefile       |   12 ++--
 board/LEOX/elpt860/u-boot.lds          |   71 ++++-------------
 board/RPXClassic/u-boot.lds            |   68 +++-------------
 board/RPXlite/u-boot.lds               |   68 +++-------------
 board/RPXlite_dw/u-boot.lds            |   68 +++-------------
 board/RRvision/u-boot.lds              |   65 +++------------
 board/adder/u-boot.lds                 |   51 +++----------
 board/c2mon/u-boot.lds                 |   65 ++++------------
 board/cogent/u-boot.lds                |   57 +++----------
 board/eltec/mhpc/u-boot.lds            |   57 +++-----------
 board/emk/top860/u-boot.lds            |   56 +++----------
 board/ep88x/u-boot.lds                 |   52 +++----------
 board/esteem192e/u-boot.lds            |   66 ++++------------
 board/etx094/u-boot.lds                |   70 ++++------------
 board/fads/u-boot.lds                  |   53 +++----------
 board/fads/u-boot.lds.debug            |  136 --------------------------------
 board/flagadm/u-boot.lds               |   56 +++----------
 board/gen860t/u-boot-flashenv.lds      |   53 +++----------
 board/gen860t/u-boot.lds               |   54 +++----------
 board/genietv/u-boot.lds               |   72 +++++------------
 board/hermes/u-boot.lds                |   65 +++------------
 board/icu862/u-boot.lds                |   70 +++--------------
 board/ip860/u-boot.lds                 |   67 +++-------------
 board/ivm/u-boot.lds                   |   58 +++-----------
 board/keymile/km8xx/u-boot.lds         |   70 +++--------------
 board/kup/kup4k/u-boot.lds             |   70 +++--------------
 board/kup/kup4x/u-boot.lds             |   70 +++--------------
 board/lantec/u-boot.lds                |   66 ++++------------
 board/lwmon/u-boot.lds                 |   58 +++-----------
 board/manroland/uc100/u-boot.lds       |   64 +++------------
 board/manroland/uc100/u-boot.lds.debug |  134 -------------------------------
 board/mbx8xx/u-boot.lds                |   56 +++----------
 board/netphone/u-boot.lds              |   67 +++-------------
 board/netta/u-boot.lds                 |   67 +++-------------
 board/netta2/u-boot.lds                |   67 +++-------------
 board/netvia/u-boot.lds                |   67 +++-------------
 board/nx823/u-boot.lds                 |   57 +++-----------
 board/quantum/u-boot.lds               |   68 +++-------------
 board/r360mpi/u-boot.lds               |   63 +++------------
 board/rbc823/u-boot.lds                |   68 ++++------------
 board/rmu/u-boot.lds                   |   68 +++-------------
 board/siemens/IAD210/u-boot.lds        |   66 ++++------------
 board/sixnet/u-boot.lds                |   58 +++-----------
 board/snmc/qs850/u-boot.lds            |   67 +++-------------
 board/snmc/qs860t/u-boot.lds           |   70 +++--------------
 board/spc1920/u-boot.lds               |   70 +++--------------
 board/spd8xx/u-boot.lds                |   68 ++++++-----------
 board/stx/stxxtc/u-boot.lds            |   67 +++-------------
 board/svm_sc8xx/u-boot.lds             |   78 ++++++-------------
 board/tqc/tqm8xx/u-boot.lds            |   73 +++++------------
 board/v37/u-boot.lds                   |   72 +++--------------
 board/westel/amx860/u-boot.lds         |   64 ++++------------
 drivers/net/e1000.c                    |    3 +-
 include/configs/NETPHONE.h             |    4 +-
 include/configs/NETTA.h                |    4 +-
 include/configs/NETVIA.h               |    4 +-
 include/configs/cogent_mpc8xx.h        |    4 +-
 include/configs/quantum.h              |    4 +-
 58 files changed, 682 insertions(+), 2784 deletions(-)
 delete mode 100644 board/fads/u-boot.lds.debug
 delete mode 100644 board/manroland/uc100/u-boot.lds.debug
arch/powerpc/cpu/mpc8xx/Makefile +6 -6
index 527771e..0d1a12c 100644
@@ -27,8 +27,8 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(CPU).o
 
-START-y	+= start.o
-START-y	+= kgdb.o
+SSTART-y += start.o
+CSTART-y += traps.o
 COBJS-y	+= bedbug_860.o
 COBJS-y	+= commproc.o
 COBJS-y	+= cpu.o
@@ -42,19 +42,19 @@ COBJS-y	+= scc.o
 COBJS-y	+= serial.o
 COBJS-y	+= speed.o
 COBJS-y	+= spi.o
-COBJS-y	+= traps.o
 COBJS-y	+= upatch.o
 COBJS-y	+= video.o
+SOBJS-y	+= kgdb.o
 SOBJS-y	+= plprcr_write.o
 
-SRCS	:= $(START-y:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+SRCS	:= $(SSTART-y:.o=.S) $(CSTART-y:.o=.c) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
 OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
-START	:= $(addprefix $(obj),$(START-y))
+START	:= $(addprefix $(obj),$(SSTART-y) $(CSTART-y))
 
 all:	$(obj).depend $(START) $(LIB)
 
 $(LIB):	$(OBJS)
-	$(call cmd_link_o_target, $(OBJS) $(obj)kgdb.o)
+	$(call cmd_link_o_target, $(OBJS))
 
 #########################################################################
 
board/LEOX/elpt860/u-boot.lds +17 -54

116 lines not on this page · raw message

board/RPXClassic/u-boot.lds +12 -56

112 lines not on this page · raw message

board/RPXlite/u-boot.lds +12 -56

112 lines not on this page · raw message

board/RPXlite_dw/u-boot.lds +12 -56

112 lines not on this page · raw message

board/RRvision/u-boot.lds +12 -53

114 lines not on this page · raw message

board/adder/u-boot.lds +10 -41

82 lines not on this page · raw message

board/c2mon/u-boot.lds +15 -50

114 lines not on this page · raw message

board/cogent/u-boot.lds +13 -44

100 lines not on this page · raw message

board/eltec/mhpc/u-boot.lds +12 -45

101 lines not on this page · raw message

board/emk/top860/u-boot.lds +12 -44

100 lines not on this page · raw message

board/ep88x/u-boot.lds +11 -41

87 lines not on this page · raw message

board/esteem192e/u-boot.lds +16 -50

115 lines not on this page · raw message

board/etx094/u-boot.lds +17 -53

118 lines not on this page · raw message

board/fads/u-boot.lds +11 -42

91 lines not on this page · raw message

board/fads/u-boot.lds.debug deleted +0 -136

136 lines not on this page · raw message

board/flagadm/u-boot.lds +12 -44

100 lines not on this page · raw message

board/gen860t/u-boot-flashenv.lds +12 -41

93 lines not on this page · raw message

board/gen860t/u-boot.lds +12 -42

95 lines not on this page · raw message

board/genietv/u-boot.lds +22 -50

120 lines not on this page · raw message

board/hermes/u-boot.lds +14 -51

113 lines not on this page · raw message

board/icu862/u-boot.lds +12 -58

114 lines not on this page · raw message

board/ip860/u-boot.lds +12 -55

111 lines not on this page · raw message

board/ivm/u-boot.lds +13 -45

101 lines not on this page · raw message

board/keymile/km8xx/u-boot.lds +12 -58

114 lines not on this page · raw message

board/kup/kup4k/u-boot.lds +12 -58

114 lines not on this page · raw message

board/kup/kup4x/u-boot.lds +12 -58

114 lines not on this page · raw message

board/lantec/u-boot.lds +16 -50

115 lines not on this page · raw message

board/lwmon/u-boot.lds +13 -45

53 lines not on this page · raw message

board/manroland/uc100/u-boot.lds +11 -53

64 lines not on this page · raw message

board/manroland/uc100/u-boot.lds.debug deleted +0 -134

134 lines not on this page · raw message

board/mbx8xx/u-boot.lds +12 -44

56 lines not on this page · raw message

board/netphone/u-boot.lds +12 -55

67 lines not on this page · raw message

board/netta/u-boot.lds +12 -55

67 lines not on this page · raw message

board/netta2/u-boot.lds +12 -55

67 lines not on this page · raw message

board/netvia/u-boot.lds +12 -55

67 lines not on this page · raw message

board/nx823/u-boot.lds +12 -45

57 lines not on this page · raw message

board/quantum/u-boot.lds +12 -56

68 lines not on this page · raw message

board/r360mpi/u-boot.lds +12 -51

63 lines not on this page · raw message

board/rbc823/u-boot.lds +18 -50

68 lines not on this page · raw message

board/rmu/u-boot.lds +12 -56

68 lines not on this page · raw message

board/siemens/IAD210/u-boot.lds +17 -49

66 lines not on this page · raw message

board/sixnet/u-boot.lds +13 -45

58 lines not on this page · raw message

board/snmc/qs850/u-boot.lds +12 -55

67 lines not on this page · raw message

board/snmc/qs860t/u-boot.lds +12 -58

70 lines not on this page · raw message

board/spc1920/u-boot.lds +12 -58

70 lines not on this page · raw message

board/spd8xx/u-boot.lds +23 -45

68 lines not on this page · raw message

board/stx/stxxtc/u-boot.lds +12 -55

67 lines not on this page · raw message

board/svm_sc8xx/u-boot.lds +24 -54

78 lines not on this page · raw message

board/tqc/tqm8xx/u-boot.lds +22 -51

73 lines not on this page · raw message

board/v37/u-boot.lds +12 -60

72 lines not on this page · raw message

board/westel/amx860/u-boot.lds +15 -49

64 lines not on this page · raw message

drivers/net/e1000.c +2 -1
index 60b04c2..5f390bd 100644

Lines of this file are not shown. View the raw message.

include/configs/NETPHONE.h +1 -3
index 04f0f0b..88339ac 100644

Lines of this file are not shown. View the raw message.

include/configs/NETTA.h +1 -3
index 795c0f6..bdc93b6 100644

Lines of this file are not shown. View the raw message.

include/configs/NETVIA.h +1 -3
index a92e3a6..3494b7a 100644

Lines of this file are not shown. View the raw message.

include/configs/cogent_mpc8xx.h +2 -2
index 3ee4a40..58aa88b 100644

Lines of this file are not shown. View the raw message.

include/configs/quantum.h +2 -2
index 0ebb094..3ff80d2 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.3.2

Part of the diff is not shown here. View the raw message.

#17 lore raw

PATCH 1/1 5xx: Cleanup for partial linking and --gc-sections

In reply to Wolfgang Denk
---
 arch/powerpc/cpu/mpc5xx/u-boot.lds |   67 ++++++++----------------------------
 include/configs/cmi_mpc5xx.h       |    1 +
 2 files changed, 16 insertions(+), 52 deletions(-)
arch/powerpc/cpu/mpc5xx/u-boot.lds +15 -52
index d5e5dc1..51a61b7 100644
@@ -22,54 +22,23 @@
  */
 
 OUTPUT_ARCH(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
+
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */
   . = + SIZEOF_HEADERS;
-  .interp : { *(.interp) }
-  .hash          : { *(.hash)		}
-  .dynsym        : { *(.dynsym)		}
-  .dynstr        : { *(.dynstr)		}
-  .rel.text      : { *(.rel.text)		}
-  .rela.text     : { *(.rela.text)	}
-  .rel.data      : { *(.rel.data)		}
-  .rela.data     : { *(.rela.data)	}
-  .rel.rodata    : { *(.rel.rodata)	}
-  .rela.rodata   : { *(.rela.rodata)	}
-  .rel.got       : { *(.rel.got)		}
-  .rela.got      : { *(.rela.got)		}
-  .rel.ctors     : { *(.rel.ctors)	}
-  .rela.ctors    : { *(.rela.ctors)	}
-  .rel.dtors     : { *(.rel.dtors)	}
-  .rela.dtors    : { *(.rela.dtors)	}
-  .rel.bss       : { *(.rel.bss)		}
-  .rela.bss      : { *(.rela.bss)		}
-  .rel.plt       : { *(.rel.plt)		}
-  .rela.plt      : { *(.rela.plt)		}
-  .init          : { *(.init)	}
-  .plt : { *(.plt) }
   .text      :
   {
-    /* WARNING - the following is hand-optimized to fit within	*/
-    /* the sector layout of our flash chips!	XXX FIXME XXX	*/
-
-    arch/powerpc/cpu/mpc5xx/start.o	(.text)
+    arch/powerpc/cpu/mpc5xx/start.o	(.text*)
 
-    *(.text)
-    *(.got1)
+    *(.text*)
   }
   _etext = .;
   PROVIDE (etext = .);
   .rodata    :
   {
-    *(.eh_frame)
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x00FF) & 0xFFFFFF00;
@@ -77,23 +46,19 @@ SECTIONS
   PROVIDE (erotext = .);
   .reloc   :
   {
-    *(.got)
+    KEEP(*(.got))
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
   __fixup_entries = (. - _FIXUP_TABLE_)>>2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -119,19 +84,17 @@ SECTIONS
   __bss_start = .;
   .bss (NOLOAD)       :
   {
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
   }
 
   _end = . ;
   PROVIDE (end = .);
-/*   . = env_start;
-	.ppcenv	:
-	{
-		common/env_embedded.o (.ppcenv)
-	}
-*/
+  . = env_start;
+  .ppcenv :
+  {
+    common/env_embedded.o (.ppcenv)
+  }
 }
include/configs/cmi_mpc5xx.h +1 -0
index 198f342..329e4e3 100644
@@ -62,6 +62,7 @@
 #include <config_cmd_default.h>
 
 #undef	CONFIG_CMD_NET		/* disabeled - causes compile errors */
+#undef	CONFIG_CMD_NFS
 
 #define CONFIG_CMD_MEMORY
 #define CONFIG_CMD_LOADB
Signature · 1 line
1.7.3.2
#18 lore raw

PATCH 1/1 512x: Cleanup for partial linking and --gc-sections

In reply to Wolfgang Denk
Cc Anatolij Gustschin <[email protected]>
Cc Timur Tabi <[email protected]>

---

Hello Anatolij & Timur,

I'm not happy about the CONFIG_FSL_DIU_FB hacking I had to do in Makefile and arch/powerpc/cpu/mpc512x/Makefile to make the fsl_diu_fb driver usable for boards where VENDOR is not set or != 'freescale'.

Can we not move the fsl_diu_fb driver to a place with better global visibility, like drivers/video/ ?

 Makefile                            |    5 +++-
 arch/powerpc/cpu/mpc512x/Makefile   |    1 -
 arch/powerpc/cpu/mpc512x/u-boot.lds |   51 ++++++----------------------------
 board/freescale/common/Makefile     |    4 +-
 4 files changed, 15 insertions(+), 46 deletions(-)
Makefile +4 -1
index b4aae89..28028dc 100644
@@ -185,6 +185,9 @@ LIBS += lib/lzma/liblzma.o
 LIBS += lib/lzo/liblzo.o
 LIBS += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \
 	"board/$(VENDOR)/common/lib$(VENDOR).o"; fi)
+ifdef CONFIG_FSL_DIU_FB
+LIBS += board/freescale/common/libfreescale.o
+endif
 LIBS += $(CPUDIR)/lib$(CPU).o
 ifdef SOC
 LIBS += $(CPUDIR)/$(SOC)/lib$(SOC).o
@@ -260,7 +263,7 @@ ifeq ($(SOC),s5pc2xx)
 LIBS += $(CPUDIR)/s5p-common/libs5p-common.o
 endif
 
-LIBS := $(addprefix $(obj),$(LIBS))
+LIBS := $(addprefix $(obj),$(sort $(LIBS)))
 .PHONY : $(LIBS) $(TIMESTAMP_FILE) $(VERSION_FILE)
 
 LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).o
arch/powerpc/cpu/mpc512x/Makefile +0 -1
index cb1263a..4a4bc0d 100644
@@ -37,7 +37,6 @@ COBJS-y += iopin.o
 COBJS-y += serial.o
 COBJS-y += speed.o
 COBJS-$(CONFIG_FSL_DIU_FB) += diu.o
-COBJS-$(CONFIG_FSL_DIU_FB) += ../../../../board/freescale/common/fsl_diu_fb.o
 COBJS-$(CONFIG_CMD_IDE) += ide.o
 COBJS-$(CONFIG_IIM) += iim.o
 COBJS-$(CONFIG_PCI) += pci.o
arch/powerpc/cpu/mpc512x/u-boot.lds +9 -42

82 lines not on this page · raw message

board/freescale/common/Makefile +2 -2
index 703a347..905dd7a 100644
@@ -24,10 +24,10 @@
 include $(TOPDIR)/config.mk
 
 ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)board/$(VENDOR)/common)
+$(shell mkdir -p $(obj)board/freescale/common)
 endif
 
-LIB	= $(obj)lib$(VENDOR).o
+LIB	= $(obj)libfreescale.o
 
 COBJS-$(CONFIG_FSL_CADMUS)	+= cadmus.o
 COBJS-$(CONFIG_FSL_VIA)		+= cds_via.o
Signature · 1 line
1.7.3.2
#19 lore raw

PATCH 1/1 512x: Cleanup for partial linking and --gc-sections

Quoted 6 lines · Wolfgang Denk

I'm not happy about the CONFIG_FSL_DIU_FB hacking I had to do in Makefile and arch/powerpc/cpu/mpc512x/Makefile to make the fsl_diu_fb driver usable for boards where VENDOR is not set or != 'freescale'.

Can we not move the fsl_diu_fb driver to a place with better global visibility, like drivers/video/ ?

I'm okay with that.

Signature · 2 lines
Timur Tabi
Linux kernel developer at Freescale
#20 lore raw

PATCH 1/1 512x: Cleanup for partial linking and --gc-sections

In reply to Wolfgang Denk

Hello Wolfgang,

Quoted 5 lines · On Mon, 22 Nov 2010 23:40:14 +0100 Wolfgang Denk <[email protected]> wrote:
Cc Anatolij Gustschin <[email protected]>
Cc Timur Tabi <[email protected]>

---

Quoted 8 lines

Hello Anatolij & Timur,

I'm not happy about the CONFIG_FSL_DIU_FB hacking I had to do in Makefile and arch/powerpc/cpu/mpc512x/Makefile to make the fsl_diu_fb driver usable for boards where VENDOR is not set or != 'freescale'.

Can we not move the fsl_diu_fb driver to a place with better global visibility, like drivers/video/ ?

Sorry for the late reply. Yes, we can do this. A patch follows.

Best regards,
Anatolij

#21 lore raw

PATCH 1/1 video: move fsl_diu_fb driver to drivers/video

In reply to Wolfgang Denk

Since the driver is used not only on Freescale boards, we move it to a common place for video drivers as suggested by Wolfgang. The patch also cleans up the top level Makefile.

---
 Makefile                                           |    3 ---
 board/freescale/common/Makefile                    |    1 -
 drivers/video/Makefile                             |    1 +
 .../common => drivers/video}/fsl_diu_fb.c          |    0
 4 files changed, 1 insertions(+), 4 deletions(-)
 rename {board/freescale/common => drivers/video}/fsl_diu_fb.c (100%)
Makefile +0 -3
index 87a383d..0685ef9 100644
@@ -185,9 +185,6 @@ LIBS += lib/lzma/liblzma.o
 LIBS += lib/lzo/liblzo.o
 LIBS += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \
 	"board/$(VENDOR)/common/lib$(VENDOR).o"; fi)
-ifdef CONFIG_FSL_DIU_FB
-LIBS += board/freescale/common/libfreescale.o
-endif
 LIBS += $(CPUDIR)/lib$(CPU).o
 ifdef SOC
 LIBS += $(CPUDIR)/$(SOC)/lib$(SOC).o
board/freescale/common/Makefile +0 -1
index 905dd7a..1abd3e5 100644
@@ -31,7 +31,6 @@ LIB	= $(obj)libfreescale.o
 
 COBJS-$(CONFIG_FSL_CADMUS)	+= cadmus.o
 COBJS-$(CONFIG_FSL_VIA)		+= cds_via.o
-COBJS-$(CONFIG_FSL_DIU_FB)	+= fsl_diu_fb.o
 COBJS-$(CONFIG_FSL_PIXIS)	+= pixis.o
 COBJS-$(CONFIG_FSL_NGPIXIS)	+= ngpixis.o
 COBJS-$(CONFIG_PQ_MDS_PIB)	+= pq-mds-pib.o
drivers/video/Makefile +1 -0
index 83274c3..2c53a6f 100644
@@ -28,6 +28,7 @@ LIB	:= $(obj)libvideo.o
 COBJS-$(CONFIG_ATI_RADEON_FB) += ati_radeon_fb.o videomodes.o
 COBJS-$(CONFIG_ATMEL_LCD) += atmel_lcdfb.o
 COBJS-$(CONFIG_CFB_CONSOLE) += cfb_console.o
+COBJS-$(CONFIG_FSL_DIU_FB) += fsl_diu_fb.o
 COBJS-$(CONFIG_S6E63D6) += s6e63d6.o
 COBJS-$(CONFIG_VIDEO_AMBA) += amba.o
 COBJS-$(CONFIG_VIDEO_CT69000) += ct69000.o videomodes.o
drivers/video/fsl_diu_fb.c renamed from board/freescale/common/fsl_diu_fb.c +0 -0
similarity index 100%
rename from board/freescale/common/fsl_diu_fb.c
rename to drivers/video/fsl_diu_fb.c
Signature · 1 line
1.7.1
#22 lore raw

PATCH 1/1 video: move fsl_diu_fb driver to drivers/video

Quoted 5 lines · On Mon, 29 Nov 2010 22:28:02 +0100 Anatolij Gustschin <[email protected]> wrote:

Since the driver is used not only on Freescale boards, we move it to a common place for video drivers as suggested by Wolfgang. The patch also cleans up the top level Makefile.

Quoted 8 lines
---
 Makefile                                           |    3 ---
 board/freescale/common/Makefile                    |    1 -
 drivers/video/Makefile                             |    1 +
 .../common => drivers/video}/fsl_diu_fb.c          |    0
 4 files changed, 1 insertions(+), 4 deletions(-)
 rename {board/freescale/common => drivers/video}/fsl_diu_fb.c (100%)

applied to u-boot-video/master.

Anatolij

#23 lore raw

cover Address partial linking issues

In reply to Wolfgang Denk

Hi Wolfgang,

Quoted 6 lines · On Sunday 21 November 2010 22:03:33 Wolfgang Denk wrote:

The following patch series prepares the groung a bit, then enables --gc-sections, -ffunction-sections and -ffunction-sections for the Power Archtiecture, and then starts to make all PowerPC boards build again, beginning with 4xx. As it turns out, this process uncovers a number of (so far undetected) bugs that have creapt in, which I try to fix as well.

Thanks. I'll take a look at it today.

Quoted 5 lines

To Stefan Roese: Stefan, I need your help fixing the kilauea_nand and haleakala_nand board configurations; currently these fail with a "undefined reference to `initdram'" error. It appears that in the past these included the code from cpu/ppc4xx/denali_spd_ddr2.c, but I doubt that was correct?

denali_spd_ddr2.c would definitely be wrong. I'll check this today as well.

Cheers,
Stefan

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

#24 lore raw

PATCH 1/24 0000-Address-partial-linking-issues

In reply to Wolfgang Denk

The switch from archive libraries to partial linking has introduced a number of problems, that are non-trivial to solve. For example, it is no longer possible to include individual object files in the linker script as we did before for example in the case of boards with embedded environment to fill up the gap caused by the need to align the environment on flash erase block boundaries.

The best (but unfortunately not easiest) approach to address this problem is probably to enable -ffunction-sections (and -ffunction-sections) so we can again (and even in much finer granularity) place certain code where we want it. When doing this step, it seems only consequent to also add --gc-sections which has the added benefit of reducing the memory footprint of the U-Boot image (both in flash and in RAM).

Unfortunately, this requires changes to a lot of linker scripts.

The following patch series prepares the groung a bit, then enables --gc-sections, -ffunction-sections and -ffunction-sections for the Power Architecture, and then starts to make all PowerPC boards build again, beginning with 4xx. As it turns out, this process uncovers a number of (so far undetected) bugs that have crept in over time, which I try to fix as well.

Some of the patches have been posted before [1]; I try mark repostings in the Subject, but essentially it's a pretty complete rework.
[1] - http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/89401

At the moment there is still an issue with some (all?) NAND booting 83xx boards, which generate 4 GB NAND images which is most likely not correct ;-) -- Kim, can you please have a look what's happening? Thanks.

Note: these patches are also available in the "gc-sections" branch of the u-boot-testing repository.

Overview:
=========

Subject: [PATCH 01/24] ERIC: drop unsupported board configuration

 CREDITS                |    4 -
 MAINTAINERS            |    2 -
 board/eric/Makefile    |   51 ---
 board/eric/eric.c      |  203 ---------
 board/eric/eric.h      |   44 --
 board/eric/flash.c     | 1131 ------------------------------------------------
 board/eric/init.S      |  359 ---------------
 boards.cfg             |    1 -
 doc/README.scrapyard   |    3 +-
 include/configs/ERIC.h |  369 ----------------
 10 files changed, 2 insertions(+), 2165 deletions(-)
 delete mode 100644 board/eric/Makefile
 delete mode 100644 board/eric/eric.c
 delete mode 100644 board/eric/eric.h
 delete mode 100644 board/eric/flash.c
 delete mode 100644 board/eric/init.S
 delete mode 100644 include/configs/ERIC.h

Subject: [PATCH 02/24] barco: drop unsupported board configuration

 CREDITS                  |    5 -
 board/barco/Makefile     |   44 ----
 board/barco/README       |   11 -
 board/barco/barco.c      |  344 --------------------------
 board/barco/barco_svc.h  |   68 -----
 board/barco/early_init.S |  153 ------------
 board/barco/flash.c      |  611 ----------------------------------------------
 board/barco/speed.h      |   78 ------
 boards.cfg               |    1 -
 doc/README.scrapyard     |    3 +-
 include/configs/barco.h  |  364 ---------------------------
 11 files changed, 2 insertions(+), 1680 deletions(-)
 delete mode 100644 board/barco/Makefile
 delete mode 100644 board/barco/README
 delete mode 100644 board/barco/barco.c
 delete mode 100644 board/barco/barco_svc.h
 delete mode 100644 board/barco/early_init.S
 delete mode 100644 board/barco/flash.c
 delete mode 100644 board/barco/speed.h
 delete mode 100644 include/configs/barco.h

Subject: [PATCH 03/24] e1000: fix compile warning

 drivers/net/e1000.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Subject: [PATCH 04/24] IDS8247: remove redundant flash.c file

 board/ids8247/Makefile |    2 +-
 board/ids8247/flash.c  |  484 ------------------------------------------------
 2 files changed, 1 insertions(+), 485 deletions(-)
 delete mode 100644 board/ids8247/flash.c

Subject: [PATCH 05/24] WINBOND_83C553: enable only on boards that actually use it.

 arch/powerpc/lib/board.c        |    2 +-
 include/configs/HIDDEN_DRAGON.h |    2 +-
 include/configs/Sandpoint8240.h |    2 +-
 include/configs/Sandpoint8245.h |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

Subject: [PATCH 06/24] cam5200_niosflash: fix build warnings

 board/tqc/tqm5200/cam5200_flash.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

Subject: [PATCH 07/24 V2] common/Makefile: don't include env_embedded.o into libcommon

 common/Makefile |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

Subject: [PATCH 08/24 V2] cpu/ppc4xx/Makefile: build only needed object files

 arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c           |    4 --- 
 arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c |    3 --
 arch/powerpc/cpu/ppc4xx/Makefile                 |   25 ++++++++-------------
 3 files changed, 10 insertions(+), 22 deletions(-)

Subject: [PATCH 09/24 V2] arch/powerpc/*/config.mk: make CONFIG_SYS_LDSCRIPT settings work

 arch/powerpc/config.mk             |   13 ++++++++++++-
 arch/powerpc/cpu/mpc512x/config.mk |    7 ++-----
 arch/powerpc/cpu/mpc5xx/config.mk  |   10 ----------
 arch/powerpc/cpu/mpc5xxx/config.mk |    5 +----
 arch/powerpc/cpu/mpc8220/config.mk |    5 +----
 arch/powerpc/cpu/mpc824x/config.mk |    5 +----
 arch/powerpc/cpu/mpc8260/config.mk |    5 +----
 arch/powerpc/cpu/mpc83xx/config.mk |    3 ---
 arch/powerpc/cpu/mpc85xx/config.mk |    3 ---
 arch/powerpc/cpu/mpc86xx/config.mk |    7 -------
 arch/powerpc/cpu/mpc8xx/config.mk  |    2 +-
 arch/powerpc/cpu/ppc4xx/config.mk  |    5 +----
 12 files changed, 20 insertions(+), 50 deletions(-)

Subject: [PATCH 10/24 V2] PPChameleonEVB and CATcenter need a custom linker script

 board/dave/PPChameleonEVB/u-boot.lds |  128 ++++++++++++++++++++++++++++++++++
 include/configs/CATcenter.h          |    1 + 
 include/configs/PPChameleonEVB.h     |    1 + 
 3 files changed, 130 insertions(+), 0 deletions(-)
 create mode 100644 board/dave/PPChameleonEVB/u-boot.lds

Subject: [PATCH 11/24 V2] ppc4xx: Fix build problems of IBM DDR2 NAND booting targets

 board/amcc/canyonlands/canyonlands.c |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)

Subject: [PATCH 12/24 V3] POWERPC: enable --gc-sections and -ffunction-sections -fdata-sections

 arch/powerpc/config.mk             |    4 ++--
 arch/powerpc/cpu/mpc85xx/config.mk |    4 ----
 2 files changed, 2 insertions(+), 6 deletions(-)

Subject: [PATCH 13/24 V2] ppc4xx: Cleanup for partial linking and --gc-sections

 arch/powerpc/cpu/ppc4xx/u-boot.lds         |   53 ++++-----------------
 board/amcc/bamboo/Makefile                 |    6 ++-
 board/amcc/bamboo/u-boot-nand.lds          |   50 ++++----------------
 board/amcc/bluestone/Makefile              |    6 ++-
 board/amcc/canyonlands/Makefile            |    6 ++-
 board/amcc/canyonlands/u-boot-nand.lds     |   48 ++++----------------
 board/amcc/sequoia/Makefile                |    6 ++-
 board/amcc/sequoia/u-boot-nand.lds         |   48 ++++----------------
 board/amcc/sequoia/u-boot-ram.lds          |   50 ++++----------------
 board/amirix/ap1000/Makefile               |    4 +-
 board/amirix/ap1000/u-boot.lds             |   67 ++++-----------------------
 board/cray/L1/L1.c                         |    6 --
 board/esd/dasa_sim/u-boot.lds              |   57 +++++------------------
 board/esd/du440/Makefile                   |    6 ++-
 board/esd/pmc440/Makefile                  |    6 ++-
 board/gdsys/intip/Makefile                 |    6 ++-
 board/korat/Makefile                       |    6 ++-
 board/lwmon5/Makefile                      |    6 ++-
 board/ml2/u-boot.lds                       |   69 ++++------------------------
 board/netstal/hcu5/Makefile                |    4 +-
 board/sbc405/sbc405.c                      |    7 ---
 board/t3corp/Makefile                      |    6 ++-
 include/configs/AP1000.h                   |    8 +++
 include/configs/CANBT.h                    |    2 +-
 include/configs/CPCI2DP.h                  |    2 +-
 include/configs/DP405.h                    |    1 +
 include/configs/ML2.h                      |    9 ++++
 include/configs/sc3.h                      |    2 +-
 nand_spl/board/amcc/acadia/u-boot.lds      |    2 +-
 nand_spl/board/amcc/bamboo/u-boot.lds      |    2 +-
 nand_spl/board/amcc/canyonlands/u-boot.lds |    2 +-
 nand_spl/board/amcc/kilauea/u-boot.lds     |    2 +-
 nand_spl/board/amcc/sequoia/u-boot.lds     |    4 +-
 33 files changed, 152 insertions(+), 407 deletions(-)

Subject: [PATCH 14/24 V2] ppc4xx/NAND: Reduce size of NAND SPL image

 drivers/mtd/nand/ndfc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Subject: [PATCH 15/24 V2] 83xx: Cleanup for partial linking and --gc-sections

 arch/powerpc/cpu/mpc83xx/u-boot.lds |   53 ++++++----------------------------
 1 files changed, 10 insertions(+), 43 deletions(-)

Subject: [PATCH 16/24 V2] 86xx: Cleanup for partial linking and --gc-sections

 arch/powerpc/cpu/mpc86xx/Makefile   |    6 ++--
 arch/powerpc/cpu/mpc86xx/u-boot.lds |   36 ++--------------------------------
 2 files changed, 6 insertions(+), 36 deletions(-)

Subject: [PATCH 17/24 V2] 8xx: Cleanup for partial linking and --gc-sections

 arch/powerpc/cpu/mpc8xx/Makefile       |   12 ++--
 board/LEOX/elpt860/u-boot.lds          |   71 ++++-------------
 board/RPXClassic/u-boot.lds            |   68 +++-------------
 board/RPXlite/u-boot.lds               |   68 +++-------------
 board/RPXlite_dw/u-boot.lds            |   68 +++-------------
 board/RRvision/u-boot.lds              |   65 +++------------
 board/adder/u-boot.lds                 |   51 +++----------
 board/c2mon/u-boot.lds                 |   65 ++++------------
 board/cogent/u-boot.lds                |   57 +++----------
 board/eltec/mhpc/u-boot.lds            |   57 +++-----------
 board/emk/top860/u-boot.lds            |   56 +++----------
 board/ep88x/u-boot.lds                 |   52 +++----------
 board/esteem192e/u-boot.lds            |   66 ++++------------
 board/etx094/u-boot.lds                |   70 ++++------------
 board/fads/u-boot.lds                  |   53 +++----------
 board/fads/u-boot.lds.debug            |  136 --------------------------------
 board/flagadm/u-boot.lds               |   56 +++----------
 board/gen860t/u-boot-flashenv.lds      |   53 +++----------
 board/gen860t/u-boot.lds               |   54 +++----------
 board/genietv/u-boot.lds               |   72 +++++------------
 board/hermes/u-boot.lds                |   65 +++------------
 board/icu862/u-boot.lds                |   70 +++--------------
 board/ip860/u-boot.lds                 |   67 +++-------------
 board/ivm/u-boot.lds                   |   58 +++-----------
 board/keymile/km8xx/u-boot.lds         |   70 +++--------------
 board/kup/kup4k/u-boot.lds             |   70 +++--------------
 board/kup/kup4x/u-boot.lds             |   70 +++--------------
 board/lantec/u-boot.lds                |   66 ++++------------
 board/lwmon/u-boot.lds                 |   58 +++-----------
 board/manroland/uc100/u-boot.lds       |   64 +++------------
 board/manroland/uc100/u-boot.lds.debug |  134 -------------------------------
 board/mbx8xx/u-boot.lds                |   56 +++----------
 board/netphone/u-boot.lds              |   67 +++-------------
 board/netta/u-boot.lds                 |   67 +++-------------
 board/netta2/u-boot.lds                |   67 +++-------------
 board/netvia/u-boot.lds                |   67 +++-------------
 board/nx823/u-boot.lds                 |   57 +++-----------
 board/quantum/u-boot.lds               |   68 +++-------------
 board/r360mpi/u-boot.lds               |   63 +++------------
 board/rbc823/u-boot.lds                |   68 ++++------------
 board/rmu/u-boot.lds                   |   68 +++-------------
 board/siemens/IAD210/u-boot.lds        |   66 ++++------------
 board/sixnet/u-boot.lds                |   58 +++-----------
 board/snmc/qs850/u-boot.lds            |   67 +++-------------
 board/snmc/qs860t/u-boot.lds           |   70 +++--------------
 board/spc1920/u-boot.lds               |   70 +++--------------
 board/spd8xx/u-boot.lds                |   68 ++++++-----------
 board/stx/stxxtc/u-boot.lds            |   67 +++-------------
 board/svm_sc8xx/u-boot.lds             |   78 ++++++-------------
 board/tqc/tqm8xx/u-boot.lds            |   73 +++++------------
 board/v37/u-boot.lds                   |   72 +++--------------
 board/westel/amx860/u-boot.lds         |   64 ++++------------
 include/configs/NETPHONE.h             |    4 +-
 include/configs/NETTA.h                |    4 +-
 include/configs/NETVIA.h               |    4 +-
 include/configs/cogent_mpc8xx.h        |    4 +-
 include/configs/quantum.h              |    4 +-
 57 files changed, 680 insertions(+), 2783 deletions(-)
 delete mode 100644 board/fads/u-boot.lds.debug
 delete mode 100644 board/manroland/uc100/u-boot.lds.debug

Subject: [PATCH 18/24 V2] 5xx: Cleanup for partial linking and --gc-sections

 arch/powerpc/cpu/mpc5xx/u-boot.lds |   69 ++++++++---------------------------
 include/configs/cmi_mpc5xx.h       |    1 +
 2 files changed, 17 insertions(+), 53 deletions(-)

Subject: [PATCH 19/24 V2] 512x: Cleanup for partial linking and --gc-sections

 Makefile                            |    5 ++-
 arch/powerpc/cpu/mpc512x/Makefile   |    1 -
 arch/powerpc/cpu/mpc512x/u-boot.lds |   53 ++++++----------------------------
 board/freescale/common/Makefile     |    4 +-
 4 files changed, 16 insertions(+), 47 deletions(-)

Subject: [PATCH 20/24 V2] 5xxx: Cleanup for partial linking and --gc-sections

 arch/powerpc/cpu/mpc5xxx/Makefile                |   27 +++++++---
 arch/powerpc/cpu/mpc5xxx/u-boot-customlayout.lds |   61 ++++-----------------
 arch/powerpc/cpu/mpc5xxx/u-boot.lds              |   57 ++++----------------
 board/manroland/hmi1001/config.mk                |   24 ---------
 board/matrix_vision/mvsmr/u-boot.lds             |   58 ++++-----------------
 include/configs/TQM5200.h                        |    2 +-
 include/configs/mcc200.h                         |    2 +-
 7 files changed, 56 insertions(+), 175 deletions(-)
 delete mode 100644 board/manroland/hmi1001/config.mk

Subject: [PATCH 21/24 V2] 8220: Cleanup for partial linking and --gc-sections

 arch/powerpc/cpu/mpc8220/u-boot.lds |   56 +++++++----------------------------
 1 files changed, 11 insertions(+), 45 deletions(-)

Subject: [PATCH 22/24 V2] 824x: Cleanup for partial linking and --gc-sections

 arch/powerpc/cpu/mpc824x/u-boot.lds |   53 ++++---------------
 board/cpc45/pd67290.c               |    4 +-
 board/mousse/u-boot.lds             |   56 +++----------------
 board/mvblue/u-boot.lds             |   99 +++++++++++++++++++++++++++++++++++
 board/sandpoint/u-boot.lds          |   97 ++++++++++++++++++++++++++++++++++
 drivers/net/Makefile                |   10 +++-
 include/configs/MVBLUE.h            |    1 +
 include/configs/Sandpoint8240.h     |    1 +
 include/configs/Sandpoint8245.h     |    1 +
 9 files changed, 227 insertions(+), 95 deletions(-)
 create mode 100644 board/mvblue/u-boot.lds
 create mode 100644 board/sandpoint/u-boot.lds

Subject: [PATCH 23/24 V2] 8260: Cleanup for partial linking and --gc-sections

 arch/powerpc/cpu/mpc8260/u-boot.lds |   56 +++++++----------------------------
 board/atc/ti113x.c                  |    4 +-
 board/cogent/u-boot.lds             |    6 +++-
 include/configs/cogent_mpc8260.h    |    2 +-
 4 files changed, 19 insertions(+), 49 deletions(-)

Subject: [PATCH 24/24 V2] 74xx_7xx: Cleanup for partial linking and --gc-sections

 arch/powerpc/cpu/74xx_7xx/u-boot.lds   |   91 +++++++++++++++++++++
 board/Marvell/db64360/u-boot.lds       |  135 -------------------------------
 board/Marvell/db64460/u-boot.lds       |  135 -------------------------------
 board/eltec/bab7xx/u-boot.lds          |  135 -------------------------------
 board/eltec/elppc/u-boot.lds           |  135 -------------------------------
 board/esd/cpci750/u-boot.lds           |  135 -------------------------------
 board/evb64260/u-boot.lds              |   60 +++-----------
 board/freescale/mpc7448hpc2/u-boot.lds |  133 ------------------------------
 board/pcippc2/u-boot.lds               |  138 --------------------------------
 board/ppmc7xx/u-boot.lds               |  132 ------------------------------
 board/prodrive/p3mx/u-boot.lds         |  135 -------------------------------
 drivers/pci/tsi108_pci.c               |    3 +-
 include/configs/EVB64260.h             |    1 +
 13 files changed, 106 insertions(+), 1262 deletions(-)
 create mode 100644 arch/powerpc/cpu/74xx_7xx/u-boot.lds
 delete mode 100644 board/Marvell/db64360/u-boot.lds
 delete mode 100644 board/Marvell/db64460/u-boot.lds
 delete mode 100644 board/eltec/bab7xx/u-boot.lds
 delete mode 100644 board/eltec/elppc/u-boot.lds
 delete mode 100644 board/esd/cpci750/u-boot.lds
 delete mode 100644 board/freescale/mpc7448hpc2/u-boot.lds
 delete mode 100644 board/pcippc2/u-boot.lds
 delete mode 100644 board/ppmc7xx/u-boot.lds
 delete mode 100644 board/prodrive/p3mx/u-boot.lds
#25 lore raw

PATCH 1/24 0000-Address-partial-linking-issues

Quoted 15 lines · In message <[email protected]> you wrote:

The switch from archive libraries to partial linking has introduced a number of problems, that are non-trivial to solve. For example, it is no longer possible to include individual object files in the linker script as we did before for example in the case of boards with embedded environment to fill up the gap caused by the need to align the environment on flash erase block boundaries.

The best (but unfortunately not easiest) approach to address this problem is probably to enable -ffunction-sections (and -ffunction-sections) so we can again (and even in much finer granularity) place certain code where we want it. When doing this step, it seems only consequent to also add --gc-sections which has the added benefit of reducing the memory footprint of the U-Boot image (both in flash and in RAM).

Quoted 1 line

Unfortunately, this requires changes to a lot of linker scripts.

...

Whole series (latest versions of the patches) applied.

Best regards,

Wolfgang Denk

Signature · 5 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 am not now, nor have I ever been, a member of the demigodic party.
                                                   -- Dennis Ritchie
#26 lore raw

PATCH 1/24 ERIC: drop unsupported board configuration

In reply to Wolfgang Denk

The ERIC board appears to be unmaintained for more than 9 years. The environment location has probably never been correct, and has been definitely broken since for at least a year. Drop it.

Cc Stefan Roese <[email protected]>
Cc Swen Anderson <[email protected]>
---
 CREDITS                |    4 -
 MAINTAINERS            |    2 -
 board/eric/Makefile    |   51 ---
 board/eric/eric.c      |  203 ---------
 board/eric/eric.h      |   44 --
 board/eric/flash.c     | 1131 ------------------------------------------------
 board/eric/init.S      |  359 ---------------
 boards.cfg             |    1 -
 doc/README.scrapyard   |    3 +-
 include/configs/ERIC.h |  369 ----------------
 10 files changed, 2 insertions(+), 2165 deletions(-)
 delete mode 100644 board/eric/Makefile
 delete mode 100644 board/eric/eric.c
 delete mode 100644 board/eric/eric.h
 delete mode 100644 board/eric/flash.c
 delete mode 100644 board/eric/init.S
 delete mode 100644 include/configs/ERIC.h
CREDITS +0 -4
index d681018..253abac 100644
@@ -22,10 +22,6 @@ N: Guillaume Alexandre
 E: guillaume.alexandre at gespac.ch
 D: Add PCIPPC6 configuration
 
-N: Swen Anderson
-E: sand at peppercon.de
-D: ERIC Support
-
 N: Pantelis Antoniou
 E: panto at intracom.gr
 D: NETVIA & NETPHONE board support, ARTOS support.
MAINTAINERS +0 -2
index 9258cb1..02a5ee0 100644
@@ -524,8 +524,6 @@ Unknown / orphaned boards:
 	RPXClassic	MPC8xx
 	RPXlite		MPC8xx
 
-	ERIC		PPC4xx
-
 	MOUSSE		MPC824x
 
 	RPXsuper	MPC8260
board/eric/Makefile deleted +0 -51

51 lines not on this page · raw message

board/eric/eric.c deleted +0 -203

203 lines not on this page · raw message

board/eric/eric.h deleted +0 -44

44 lines not on this page · raw message

board/eric/flash.c deleted +0 -1131

1,131 lines not on this page · raw message

board/eric/init.S deleted +0 -359

359 lines not on this page · raw message

boards.cfg +0 -1
index a37ccc5..a4825f7 100644
@@ -269,7 +269,6 @@ TTTech		powerpc	mpc8xx		tqm8xx		tqc		-	TQM823L:LCD,SHARP_LQ104V7DS01
 wtk		powerpc	mpc8xx		tqm8xx		tqc		-	TQM823L:LCD,SHARP_LQ065T9DR51U
 csb272		powerpc	ppc4xx
 csb472		powerpc	ppc4xx
-ERIC		powerpc	ppc4xx		eric
 G2000		powerpc	ppc4xx		g2000
 JSE		powerpc	ppc4xx		jse
 korat		powerpc	ppc4xx
doc/README.scrapyard +2 -1
index 4286559..fd2b726 100644
@@ -11,7 +11,8 @@ easily if here is something they might want to dig for...
 
 Board	Arch	CPU	removed	    Commit	last known maintainer/contact
 =============================================================================
-VoVPN-GW_100MHz	powerpc	MPC8260 - 2010-10-24	Juergen Selent <[email protected]>
+ERIC	powerpc	405GP	-	  2010-11-21	Swen Anderson <[email protected]>
+VoVPN-GW_100MHz	powerpc	MPC8260 26fe3d2 2010-10-24	Juergen Selent <[email protected]>
 NC650	powerpc	MPC852	333d86d   2010-10-19	Wolfgang Denk <[email protected]>
 CP850	powerpc	MPC852	333d86d   2010-10-19	Wolfgang Denk <[email protected]>
 logodl	ARM	PXA2xx	059e778   2010-10-18	August Hoeraendl <[email protected]>
include/configs/ERIC.h deleted +0 -369

369 lines not on this page · raw message

Signature · 1 line
1.7.3.2
#27 lore raw

PATCH 2/24 barco: drop unsupported board configuration

In reply to Wolfgang Denk

The barco board appears to be unmaintained since it was added about 5 years ago. The environment location has probably never been correct. Drop it.

---
 CREDITS                  |    5 -
 board/barco/Makefile     |   44 ----
 board/barco/README       |   11 -
 board/barco/barco.c      |  344 --------------------------
 board/barco/barco_svc.h  |   68 -----
 board/barco/early_init.S |  153 ------------
 board/barco/flash.c      |  611 ----------------------------------------------
 board/barco/speed.h      |   78 ------
 boards.cfg               |    1 -
 doc/README.scrapyard     |    3 +-
 include/configs/barco.h  |  364 ---------------------------
 11 files changed, 2 insertions(+), 1680 deletions(-)
 delete mode 100644 board/barco/Makefile
 delete mode 100644 board/barco/README
 delete mode 100644 board/barco/barco.c
 delete mode 100644 board/barco/barco_svc.h
 delete mode 100644 board/barco/early_init.S
 delete mode 100644 board/barco/flash.c
 delete mode 100644 board/barco/speed.h
 delete mode 100644 include/configs/barco.h
CREDITS +0 -5
index 253abac..dacc5b4 100644
@@ -278,11 +278,6 @@ N: Thomas Lange
 E: thomas at corelatus.se
 D: Support for GTH, GTH2 and dbau1x00 boards; lots of PCMCIA fixes
 
-N: Marc Leeman
-E: marc.leeman at barco.com
-D: Support for Barco Streaming Video Card (SVC) and Sample Compress Network (SCN)
-W: www.barco.com
-
 N: The LEOX team
 E: team at leox.org
 D: Support for LEOX boards, DS164x RTC
board/barco/Makefile deleted +0 -44

44 lines not on this page · raw message

board/barco/README deleted +0 -11
deleted file mode 100644
index d255a3d..0000000
@@ -1,11 +0,0 @@
-This port of U-Boot is tuned to run on a range of Barco Control Rooms
-Streaming Video Solutions, including:
-
-   - Streaming Video Card (SVC)
-   - Sample Compress Network (SCN)
-
-For more information, see http://www.barcocontrolrooms.com/
-
-Code and configuration are originally based on the Sandpoint board
-
-Marc Leeman <[email protected]>
board/barco/barco.c deleted +0 -344

344 lines not on this page · raw message

board/barco/barco_svc.h deleted +0 -68

68 lines not on this page · raw message

board/barco/early_init.S deleted +0 -153

153 lines not on this page · raw message

board/barco/flash.c deleted +0 -611

611 lines not on this page · raw message

board/barco/speed.h deleted +0 -78

78 lines not on this page · raw message

boards.cfg +0 -1
index a4825f7..4a002f6 100644
@@ -146,7 +146,6 @@ TQM5200		powerpc	mpc5xxx		tqm5200		tqc		-	TQM5200:
 MVBC_P		powerpc	mpc5xxx		mvbc_p		matrix_vision	-	MVBC_P:MVBC_P
 sorcery		powerpc	mpc8220
 A3000		powerpc	mpc824x		a3000
-barco		powerpc	mpc824x
 BMW		powerpc	mpc824x		bmw
 CU824		powerpc	mpc824x		cu824
 eXalion		powerpc	mpc824x		eXalion
doc/README.scrapyard +2 -1
index fd2b726..8f98b60 100644
@@ -11,7 +11,8 @@ easily if here is something they might want to dig for...
 
 Board	Arch	CPU	removed	    Commit	last known maintainer/contact
 =============================================================================
-ERIC	powerpc	405GP	-	  2010-11-21	Swen Anderson <[email protected]>
+barco	powerpc	MPC8245	-	  2010-11-23	Marc Leeman <[email protected]>
+ERIC	powerpc	405GP	d9ba451	  2010-11-21	Swen Anderson <[email protected]>
 VoVPN-GW_100MHz	powerpc	MPC8260 26fe3d2 2010-10-24	Juergen Selent <[email protected]>
 NC650	powerpc	MPC852	333d86d   2010-10-19	Wolfgang Denk <[email protected]>
 CP850	powerpc	MPC852	333d86d   2010-10-19	Wolfgang Denk <[email protected]>
include/configs/barco.h deleted +0 -364

364 lines not on this page · raw message

Signature · 1 line
1.7.3.2
#28 lore raw

PATCH 3/24 e1000: fix compile warning

In reply to Wolfgang Denk

Get rid of compiler warning:
e1000.c: In function 'e1000_transmit':
e1000.c:5028: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type

---
 drivers/net/e1000.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/net/e1000.c +2 -1
index 60b04c2..5f390bd 100644
@@ -5018,6 +5018,7 @@ TRANSMIT - Transmit a frame
 static int
 e1000_transmit(struct eth_device *nic, volatile void *packet, int length)
 {
+	void * nv_packet = (void *)packet;
 	struct e1000_hw *hw = nic->priv;
 	struct e1000_tx_desc *txp;
 	int i = 0;
@@ -5025,7 +5026,7 @@ e1000_transmit(struct eth_device *nic, volatile void *packet, int length)
 	txp = tx_base + tx_tail;
 	tx_tail = (tx_tail + 1) % 8;
 
-	txp->buffer_addr = cpu_to_le64(virt_to_bus(hw->pdev, packet));
+	txp->buffer_addr = cpu_to_le64(virt_to_bus(hw->pdev, nv_packet));
 	txp->lower.data = cpu_to_le32(hw->txd_cmd | length);
 	txp->upper.data = 0;
 	E1000_WRITE_REG(hw, TDT, tx_tail);
Signature · 1 line
1.7.3.2
#29 lore raw

PATCH 3/24 e1000: fix compile warning

Hello.

Quoted 5 lines · Wolfgang Denk

Get rid of compiler warning:
e1000.c: In function 'e1000_transmit':
e1000.c:5028: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type

[...]

drivers/net/e1000.c TRANSMIT - Transmit a frame · line 5021

Quoted 9 lines
drivers/net/e1000.c +1 -0
index 60b04c2..5f390bd 100644
@@ -5018,6 +5018,7 @@ TRANSMIT - Transmit a frame
  static int
  e1000_transmit(struct eth_device *nic, volatile void *packet, int length)
  {
+	void * nv_packet = (void *)packet;

I suspect checkpatch.pl would complain about the space following *...

WBR, Sergei

#30 lore raw

PATCH 4/24 IDS8247: remove redundant flash.c file

In reply to Wolfgang Denk

The IDS8247 board is configured to use the CFI flash driver, so drop the now redundant custom flash.c file.

---
 board/ids8247/Makefile |    2 +-
 board/ids8247/flash.c  |  484 ------------------------------------------------
 2 files changed, 1 insertions(+), 485 deletions(-)
 delete mode 100644 board/ids8247/flash.c
board/ids8247/Makefile +1 -1
index 032e0a7..2b702ce 100644
@@ -28,7 +28,7 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(BOARD).o
 
-COBJS	= $(BOARD).o flash.o
+COBJS	= $(BOARD).o
 
 SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
board/ids8247/flash.c deleted +0 -484

484 lines not on this page · raw message

Signature · 1 line
1.7.3.2
#31 lore raw

PATCH 5/24 WINBOND_83C553: enable only on boards that actually use it.

In reply to Wolfgang Denk

So far, only the BAB7xx board would call the initialise_w83c553f() function for the WINBOND 83C553 chip, even though some other boards (HIDDEN_DRAGON, Sandpoint8240, Sandpoint8245) enabled it in their board configuration. These boards were also missing other config settings needed for that, which resulted in build errors like this:

drivers/pci/libpci.o:(.got2+0x84): undefined reference to `ide_bus_offset'

Switch arch/powerpc/lib/board.c to call initialise_w83c553f() not on a per-board base, but when a WINBOND_83C553 in enabled in a configuration (like BAB7xx), and disable it in the boards that had this set so far.

Cc Yusdi Santoso <[email protected]>
Cc Jim Thompson <[email protected]>
---
 arch/powerpc/lib/board.c        |    2 +-
 include/configs/HIDDEN_DRAGON.h |    2 +-
 include/configs/Sandpoint8240.h |    2 +-
 include/configs/Sandpoint8245.h |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
arch/powerpc/lib/board.c +1 -1
index 2e0749d..b21c1d6 100644
@@ -694,7 +694,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
 	 */
 	pci_init ();
 #endif
-#if defined(CONFIG_BAB7xx)
+#if defined(CONFIG_WINBOND_83C553)
 	/*
 	 * Initialise the ISA bridge
 	 */
include/configs/HIDDEN_DRAGON.h +1 -1
index c684cb8..44ae48d 100644
@@ -199,7 +199,7 @@
  */
 
 
-#define CONFIG_WINBOND_83C553	1	/*has a winbond bridge			*/
+/* #define CONFIG_WINBOND_83C553	1	/ *has a winbond bridge			*/
 #define CONFIG_SYS_USE_WINBOND_IDE	0	/*use winbond 83c553 internal IDE ctrlr */
 #define CONFIG_SYS_WINBOND_ISA_CFG_ADDR    0x80005800	/*pci-isa bridge config addr	*/
 #define CONFIG_SYS_WINBOND_IDE_CFG_ADDR    0x80005900	/*ide config addr		*/
include/configs/Sandpoint8240.h +1 -1
index f984141..74c9ed1 100644
@@ -234,7 +234,7 @@
  */
 
 
-#define CONFIG_WINBOND_83C553	1	/*has a winbond bridge			*/
+/* #define CONFIG_WINBOND_83C553	1	/ *has a winbond bridge			*/
 #define CONFIG_SYS_USE_WINBOND_IDE	0	/*use winbond 83c553 internal IDE ctrlr */
 #define CONFIG_SYS_WINBOND_ISA_CFG_ADDR    0x80005800	/*pci-isa bridge config addr	*/
 #define CONFIG_SYS_WINBOND_IDE_CFG_ADDR    0x80005900	/*ide config addr		*/
include/configs/Sandpoint8245.h +1 -1
index b47adcc..92b1256 100644
@@ -202,7 +202,7 @@
  */
 
 
-#define CONFIG_WINBOND_83C553	1	/*has a winbond bridge			*/
+/* #define CONFIG_WINBOND_83C553	1	/ *has a winbond bridge			*/
 #define CONFIG_SYS_USE_WINBOND_IDE	0	/*use winbond 83c553 internal IDE ctrlr */
 #define CONFIG_SYS_WINBOND_ISA_CFG_ADDR    0x80005800	/*pci-isa bridge config addr	*/
 #define CONFIG_SYS_WINBOND_IDE_CFG_ADDR    0x80005900	/*ide config addr		*/
Signature · 1 line
1.7.3.2
#32 lore raw

PATCH 6/24 cam5200_niosflash: fix build warnings

In reply to Wolfgang Denk

Fix warnings:

cam5200_flash.c: In function 'write_word_32':
cam5200_flash.c:443: warning: dereferencing type-punned pointer will break strict-aliasing rules cam5200_flash.c: In function 'write_word_16':
cam5200_flash.c:684: warning: dereferencing type-punned pointer will break strict-aliasing rules

---
 board/tqc/tqm5200/cam5200_flash.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
board/tqc/tqm5200/cam5200_flash.c +6 -2
index 124b47d..4c8922f 100644
@@ -440,7 +440,9 @@ static int write_word(flash_info_t * info, ulong dest, ulong data)
 {
 	volatile CONFIG_SYS_FLASH_WORD_SIZE *addr2 = (CONFIG_SYS_FLASH_WORD_SIZE *) (info->start[0]);
 	volatile CONFIG_SYS_FLASH_WORD_SIZE *dest2 = (CONFIG_SYS_FLASH_WORD_SIZE *) dest;
-	volatile CONFIG_SYS_FLASH_WORD_SIZE *data2 = (CONFIG_SYS_FLASH_WORD_SIZE *) & data;
+	ulong *datap = &data;
+	volatile CONFIG_SYS_FLASH_WORD_SIZE *data2 =
+			(volatile CONFIG_SYS_FLASH_WORD_SIZE *)datap;
 	ulong start;
 	int i, flag;
 
@@ -681,7 +683,9 @@ static int write_word_16(flash_info_t * info, ulong dest, ulong data)
 {
 	volatile CONFIG_SYS_FLASH_WORD_SIZE *addr2 = (CONFIG_SYS_FLASH_WORD_SIZE *) (info->start[0]);
 	volatile CONFIG_SYS_FLASH_WORD_SIZE *dest2 = (CONFIG_SYS_FLASH_WORD_SIZE *) dest;
-	volatile CONFIG_SYS_FLASH_WORD_SIZE *data2 = (CONFIG_SYS_FLASH_WORD_SIZE *) & data;
+	ulong *datap = &data;
+	volatile CONFIG_SYS_FLASH_WORD_SIZE *data2 =
+			(volatile CONFIG_SYS_FLASH_WORD_SIZE *)datap;
 	ulong start;
 	int i;
 
Signature · 1 line
1.7.3.2
#33 lore raw

PATCH v2 7/24 common/Makefile: don't include env_embedded.o into libcommon

In reply to Wolfgang Denk

Some boards use an embedded environment, where env_embedded.o has to be linked at a special position in the U-Boot image; to make this possible, we do not include it into libcommon.o for such boards.

---
 common/Makefile |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
common/Makefile +7 -7
index e0db382..abea91c 100644
@@ -25,8 +25,6 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)libcommon.o
 
-AOBJS	=
-
 # core
 COBJS-y += main.o
 COBJS-y += console.o
@@ -52,9 +50,9 @@ COBJS-y += cmd_version.o
 COBJS-y += env_common.o
 COBJS-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o
 COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o
-COBJS-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o
+XCOBJS-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o
 COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_embedded.o
-COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_embedded.o
+XCOBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_embedded.o
 COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_embedded.o
 COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
 COBJS-$(CONFIG_ENV_IS_IN_MG_DISK) += env_mgdisk.o
@@ -169,12 +167,14 @@ COBJS-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
 
 
 COBJS	:= $(sort $(COBJS-y))
-SRCS	:= $(AOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS	:= $(addprefix $(obj),$(AOBJS) $(COBJS))
+XCOBJS	:= $(sort $(XCOBJS-y))
+SRCS	:= $(COBJS:.o=.c) $(XCOBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS))
+XOBJS	:= $(addprefix $(obj),$(XCOBJS))
 
 CPPFLAGS += -I..
 
-all:	$(LIB) $(AOBJS)
+all:	$(LIB) $(XOBJS)
 
 $(LIB): $(obj).depend $(OBJS)
 	$(call cmd_link_o_target, $(OBJS))
Signature · 1 line
1.7.3.2
#34 lore raw

PATCH v2 8/24 cpu/ppc4xx/Makefile: build only needed object files

In reply to Wolfgang Denk

---
Stefan, if it's OK with you I will pull this directly.

 arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c           |    4 ---
 arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c |    3 --
 arch/powerpc/cpu/ppc4xx/Makefile                 |   25 ++++++++-------------
 3 files changed, 10 insertions(+), 22 deletions(-)
arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c +0 -4
index cf9d66d..9634deb 100644
@@ -50,8 +50,6 @@
 
 #include "ecc.h"
 
-#if defined(CONFIG_SDRAM_PPC4xx_IBM_DDR2)
-
 #define PPC4xx_IBM_DDR2_DUMP_REGISTER(mnemonic)				\
 	do {								\
 		u32 data;						\
@@ -3194,5 +3192,3 @@ inline void ppc4xx_ibm_ddr2_register_dump(void)
 	PPC4xx_IBM_DDR2_DUMP_REGISTER(RTSR);
 #endif /* defined(DEBUG) */
 }
-
-#endif /* CONFIG_SDRAM_PPC4xx_IBM_DDR2 */
arch/powerpc/cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c +0 -3
index e90c93e..b909fca 100644
@@ -44,8 +44,6 @@
 
 #include "ecc.h"
 
-#if defined(CONFIG_PPC4xx_DDR_AUTOCALIBRATION)
-
 /*
  * Only compile the DDR auto-calibration code for NOR boot and
  * not for NAND boot (NAND SPL and NAND U-Boot - NUB)
@@ -1253,4 +1251,3 @@ u32 DQS_autocalibration(void)
 	return 0;
 }
 #endif /* !defined(CONFIG_NAND_U_BOOT) && !defined(CONFIG_NAND_SPL) */
-#endif /* defined(CONFIG_PPC4xx_DDR_AUTOCALIBRATION) */
arch/powerpc/cpu/ppc4xx/Makefile +10 -15
index 129a61e..d97ca20 100644
@@ -34,31 +34,27 @@ SOBJS	+= kgdb.o
 
 COBJS	:= 40x_spd_sdram.o
 
+ifndef CONFIG_NAND_SPL
+ifndef CONFIG_NAND_U_BOOT
 COBJS	+= 44x_spd_ddr.o
-COBJS	+= 44x_spd_ddr2.o
-ifdef CONFIG_PPC4xx_DDR_AUTOCALIBRATION
-COBJS	+= 4xx_ibm_ddr2_autocalib.o
 endif
+endif
+COBJS-$(CONFIG_SDRAM_PPC4xx_IBM_DDR2) += 44x_spd_ddr2.o
+COBJS-$(CONFIG_PPC4xx_DDR_AUTOCALIBRATION) += 4xx_ibm_ddr2_autocalib.o
 COBJS	+= 4xx_pci.o
 COBJS	+= 4xx_pcie.o
 COBJS	+= bedbug_405.o
-ifdef CONFIG_CMD_CHIP_CONFIG
-COBJS	+= cmd_chip_config.o
-endif
+COBJS-$(CONFIG_CMD_CHIP_CONFIG)	+= cmd_chip_config.o
 COBJS	+= cpu.o
 COBJS	+= cpu_init.o
 COBJS	+= denali_data_eye.o
 COBJS	+= denali_spd_ddr2.o
 COBJS	+= ecc.o
-ifdef CONFIG_CMD_ECCTEST
-COBJS	+= cmd_ecctest.o
-endif
+COBJS-$(CONFIG_CMD_ECCTEST) += cmd_ecctest.o
 COBJS	+= fdt.o
 COBJS	+= interrupts.o
 COBJS	+= iop480_uart.o
-ifdef CONFIG_CMD_REGINFO
-COBJS	+= reginfo.o
-endif
+COBJS-$(CONFIG_CMD_REGINFO) += reginfo.o
 COBJS	+= sdram.o
 COBJS	+= speed.o
 COBJS	+= tlb.o
@@ -66,17 +62,16 @@ COBJS	+= traps.o
 COBJS	+= usb.o
 COBJS	+= usb_ohci.o
 COBJS	+= usbdev.o
+COBJS-$(CONFIG_XILINX_440) += xilinx_irq.o
 ifndef CONFIG_XILINX_440
 COBJS	+= 4xx_uart.o
 COBJS	+= gpio.o
 COBJS	+= miiphy.o
 COBJS	+= uic.o
-else
-COBJS	+= xilinx_irq.o
 endif
 
 SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
+OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS) $(COBJS-y))
 START	:= $(addprefix $(obj),$(START))
 
 all:	$(obj).depend $(START) $(LIB)
Signature · 1 line
1.7.3.2
#35 lore raw

PATCH v2 8/24 cpu/ppc4xx/Makefile: build only needed object files

Hi Wolfgang,

Quoted 4 lines · On Thursday 25 November 2010 17:00:28 Wolfgang Denk wrote:

---
Stefan, if it's OK with you I will pull this directly.

Yes, please do:

Cheers,
Stefan

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

#36 lore raw

PATCH v2 9/24 arch/powerpc/*/config.mk: make CONFIG_SYS_LDSCRIPT settings work

In reply to Wolfgang Denk

As we try to get rid of board specific config.mk files we must provide a way for board specific settings of the LDSCRIPT variable (path to the linker script) where needed.

We now implement the following hierarchy:

- Highest priority has a "#define CONFIG_SYS_LDCONFIG" in the board config file.
- If CONFIG_SYS_LDCONFIG is not set, and the system is booting from NAND (CONFIG_NAND_U_BOOT is set), then a board specific linker script board/$(BOARDDIR)/u-boot-nand.lds gets use.
- If we are not booting from NAND, we test if a processor specific linker script arch/powerpc/cpu/$(CPU)/u-boot.lds exists; if so we use that.
- As default, arch/powerpc/config.mk gets used.

Cc Stefan Roese <[email protected]>
Cc Kim Phillips <[email protected]>
Cc Kumar Gala <[email protected]>
Cc Andy Fleming <[email protected]>
---
 arch/powerpc/config.mk             |   13 ++++++++++++-
 arch/powerpc/cpu/mpc512x/config.mk |    7 ++-----
 arch/powerpc/cpu/mpc5xx/config.mk  |   10 ----------
 arch/powerpc/cpu/mpc5xxx/config.mk |    5 +----
 arch/powerpc/cpu/mpc8220/config.mk |    5 +----
 arch/powerpc/cpu/mpc824x/config.mk |    5 +----
 arch/powerpc/cpu/mpc8260/config.mk |    5 +----
 arch/powerpc/cpu/mpc83xx/config.mk |    3 ---
 arch/powerpc/cpu/mpc85xx/config.mk |    3 ---
 arch/powerpc/cpu/mpc86xx/config.mk |    7 -------
 arch/powerpc/cpu/mpc8xx/config.mk  |    2 +-
 arch/powerpc/cpu/ppc4xx/config.mk  |    5 +----
 12 files changed, 20 insertions(+), 50 deletions(-)
arch/powerpc/config.mk +12 -1
index 06a3b10..5bc849c 100644
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2000-2002
+# (C) Copyright 2000-2010
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 #
 # See file CREDITS for list of people who contributed to this
@@ -29,6 +29,17 @@ PLATFORM_RELFLAGS += -mrelocatable
 PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__
 PLATFORM_LDFLAGS  += -n
 
+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
+ifneq ($(wildcard $(SRCTREE)/arch/powerpc/cpu/$(CPU)/u-boot.lds),)
+LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/$(CPU)/u-boot.lds
+endif
+endif
+
 #
 # When cross-compiling on NetBSD, we have to define __PPC__ or else we
 # will pick up a va_list declaration that is incompatible with the
arch/powerpc/cpu/mpc512x/config.mk +2 -5
index b29edb1..baf55cc 100644
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2007-2009 DENX Software Engineering
+# (C) Copyright 2007-2010 DENX Software Engineering
 #
 # See file CREDITS for list of people who contributed to this
 # project.
@@ -19,11 +19,8 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 # MA 02111-1307 USA
 #
+
 PLATFORM_RELFLAGS += -fPIC -meabi
 
 PLATFORM_CPPFLAGS += -DCONFIG_MPC512X -DCONFIG_E300 \
 			-ffixed-r2 -msoft-float -mcpu=603e
-
-# Use default linker script.
-# A board port can override this setting in board/*/config.mk
-LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/mpc512x/u-boot.lds
arch/powerpc/cpu/mpc5xx/config.mk +0 -10
index 5f9285d..1c7df00 100644
@@ -21,16 +21,6 @@
 # MA 02111-1307 USA
 #
 
-#
-# File:			config.mk
-#
-# Discription:		compiler flags and make definitions
-#
-
-
 PLATFORM_RELFLAGS +=	-fPIC -meabi
 
 PLATFORM_CPPFLAGS +=	-DCONFIG_5xx -ffixed-r2 -mpowerpc -msoft-float
-
-# Use default linker script.  Board port can override in board/*/config.mk
-LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/mpc5xx/u-boot.lds
arch/powerpc/cpu/mpc5xxx/config.mk +1 -4
index 7ef8a47..832909f 100644
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2003
+# (C) Copyright 2003-2010
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 #
 # See file CREDITS for list of people who contributed to this
@@ -25,6 +25,3 @@ PLATFORM_RELFLAGS += -fPIC -meabi
 
 PLATFORM_CPPFLAGS += -DCONFIG_MPC5xxx -ffixed-r2 \
 		     -mstring -mcpu=603e -mmultiple
-
-# Use default linker script.  Board port can override in board/*/config.mk
-LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/mpc5xxx/u-boot.lds
arch/powerpc/cpu/mpc8220/config.mk +1 -4
index e706883..9142b91 100644
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2003
+# (C) Copyright 2003-2010
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 #
 # See file CREDITS for list of people who contributed to this
@@ -25,6 +25,3 @@ PLATFORM_RELFLAGS += -fPIC -meabi
 
 PLATFORM_CPPFLAGS += -DCONFIG_MPC8220 -ffixed-r2 \
 		     -mstring -mcpu=603e -mmultiple
-
-# Use default linker script.  Board port can override in board/*/config.mk
-LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/mpc8220/u-boot.lds
arch/powerpc/cpu/mpc824x/config.mk +1 -4
index 27c2873..65a1771 100644
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2000
+# (C) Copyright 2000-2010
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 #
 # See file CREDITS for list of people who contributed to this
@@ -24,6 +24,3 @@
 PLATFORM_RELFLAGS += -fPIC -meabi
 
 PLATFORM_CPPFLAGS += -DCONFIG_MPC824X -ffixed-r2 -mstring -mcpu=603e -msoft-float
-
-# Use default linker script.  Board port can override in board/*/config.mk
-LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/mpc824x/u-boot.lds
arch/powerpc/cpu/mpc8260/config.mk +1 -4
index a9bb688..5e4645a 100644
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2000
+# (C) Copyright 2000-2010
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 #
 # See file CREDITS for list of people who contributed to this
@@ -25,6 +25,3 @@ PLATFORM_RELFLAGS += -fPIC -meabi
 
 PLATFORM_CPPFLAGS += -DCONFIG_8260 -DCONFIG_CPM2 -ffixed-r2 \
 		     -mstring -mcpu=603e -mmultiple
-
-# Use default linker script.  Board port can override in board/*/config.mk
-LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/mpc8260/u-boot.lds
arch/powerpc/cpu/mpc83xx/config.mk +0 -3
index 8a3a8c1..0dced88 100644
@@ -24,6 +24,3 @@ PLATFORM_RELFLAGS += -fPIC -meabi
 
 PLATFORM_CPPFLAGS += -DCONFIG_MPC83xx -DCONFIG_E300 \
 			-ffixed-r2 -msoft-float
-
-# Use default linker script.  Board port can override in board/*/config.mk
-LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/mpc83xx/u-boot.lds
arch/powerpc/cpu/mpc85xx/config.mk +0 -3
index ce4376b..3f3d096 100644
@@ -34,6 +34,3 @@ PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
 # http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00311.html
 PLATFORM_CPPFLAGS +=$(call cc-option,-mspe=yes)
 PLATFORM_CPPFLAGS +=$(call cc-option,-mno-spe)
-
-# Use default linker script.  Board port can override in board/*/config.mk
-LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/mpc85xx/u-boot.lds
arch/powerpc/cpu/mpc86xx/config.mk +0 -7
index bce0fb3..ca2f837 100644
@@ -25,10 +25,3 @@ PLATFORM_RELFLAGS += -fPIC -meabi
 
 PLATFORM_CPPFLAGS += -ffixed-r2 -mstring
 PLATFORM_CPPFLAGS += -maltivec -mabi=altivec -msoft-float
-
-# Enable gc-sections to enable generation of smaller images.
-PLATFORM_LDFLAGS += --gc-sections
-PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
-
-# Use default linker script.  Board port can override in board/*/config.mk
-LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/mpc86xx/u-boot.lds
arch/powerpc/cpu/mpc8xx/config.mk +1 -1
index 5540d65..f5e08a5 100644
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2000
+# (C) Copyright 2000-2010
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 #
 # See file CREDITS for list of people who contributed to this
arch/powerpc/cpu/ppc4xx/config.mk +1 -4
index 5bda710..d862bb4 100644
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2000
+# (C) Copyright 2000-2010
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 #
 # See file CREDITS for list of people who contributed to this
@@ -32,6 +32,3 @@ PLATFORM_CPPFLAGS += -Wa,-m440 -mcpu=440
 else
 PLATFORM_CPPFLAGS += -Wa,-m405 -mcpu=405
 endif
-
-# Use default linker script.  Board port can override in board/*/config.mk
-LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/ppc4xx/u-boot.lds
Signature · 1 line
1.7.3.2
#37 lore raw

PATCH v2 9/24 arch/powerpc/*/config.mk: makeCONFIG_SYS_LDSCRIPT settings work

Quoted 11 lines · Wolfgang Denk

As we try to get rid of board specific config.mk files we must provide a way for board specific settings of the LDSCRIPT variable (path to the linker script) where needed.

We now implement the following hierarchy:

- Highest priority has a "#define CONFIG_SYS_LDCONFIG" in the board config file.
- If CONFIG_SYS_LDCONFIG is not set, and the system is booting from NAND (CONFIG_NAND_U_BOOT is set), then a board specific linker script board/$(BOARDDIR)/u-boot-nand.lds gets use.

u-boot-nand.lds is not in board/$(BOARDDIR) for 85xx at least, it is in $(SRCTREE)/$(CPUDIR)/

Quoted 3 lines

- If we are not booting from NAND, we test if a processor specific linker script arch/powerpc/cpu/$(CPU)/u-boot.lds exists; if so we use that.

should we use $(CPUDIR) instead of arch/powerpc/cpu/$(CPU)?

Haiying

#38 lore raw

PATCH v2 9/24 arch/powerpc/*/config.mk: makeCONFIG_SYS_LDSCRIPT settings work

Dear Haiying Wang,

Quoted 7 lines · In message <1290702018.2007.4.camel@haiying-laptop> you wrote:
Quoted 4 lines

- If CONFIG_SYS_LDCONFIG is not set, and the system is booting from NAND (CONFIG_NAND_U_BOOT is set), then a board specific linker script board/$(BOARDDIR)/u-boot-nand.lds gets use.

u-boot-nand.lds is not in board/$(BOARDDIR) for 85xx at least, it is in $(SRCTREE)/$(CPUDIR)/

This is not correct - situation before applying my patches:

-> find * -name u-boot-nand.lds
arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
board/amcc/acadia/u-boot-nand.lds
board/amcc/bamboo/u-boot-nand.lds
board/amcc/canyonlands/u-boot-nand.lds
board/amcc/kilauea/u-boot-nand.lds
board/amcc/sequoia/u-boot-nand.lds
board/esd/pmc440/u-boot-nand.lds
board/samsung/smdk6400/u-boot-nand.lds

Quoted 4 lines
Quoted 3 lines

- If we are not booting from NAND, we test if a processor specific linker script arch/powerpc/cpu/$(CPU)/u-boot.lds exists; if so we use that.

should we use $(CPUDIR) instead of arch/powerpc/cpu/$(CPU)?

I'm not sure if CPUDIR is defined at that time. Did you try it out?

Best regards,

Wolfgang Denk

Signature · 4 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
The world is no nursery.                              - Sigmund Freud
#39 lore raw

PATCH v2 9/24 arch/powerpc/*/config.mk:makeCONFIG_SYS_LDSCRIPT settings work

Quoted 9 lines · Wolfgang Denk

Dear Haiying Wang,

Quoted 2 lines · In message <1290702018.2007.4.camel@haiying-laptop> you wrote:
Quoted 2 lines

- If CONFIG_SYS_LDCONFIG is not set, and the system is booting

from

Quoted 3 lines
Quoted 2 lines

NAND (CONFIG_NAND_U_BOOT is set), then a board specific linker script board/$(BOARDDIR)/u-boot-nand.lds gets use.

Quoted 8 lines
Quoted 1 line

u-boot-nand.lds is not in board/$(BOARDDIR) for 85xx at least, it is

in

Quoted 1 line

$(SRCTREE)/$(CPUDIR)/

This is not correct - situation before applying my patches:

-> find * -name u-boot-nand.lds
arch/powerpc/cpu/mpc85xx/u-boot-nand.lds

so your patch for arch/powerpc/config.mk will not get u-boot-nand.lds for mpc85xx boards, only for the boards below. Then 85xx boards still need to get the lds from board/$(BOARDIR)/config.mk. Is that what you want?

Quoted 8 lines

board/amcc/acadia/u-boot-nand.lds
board/amcc/bamboo/u-boot-nand.lds
board/amcc/canyonlands/u-boot-nand.lds
board/amcc/kilauea/u-boot-nand.lds
board/amcc/sequoia/u-boot-nand.lds
board/esd/pmc440/u-boot-nand.lds
board/samsung/smdk6400/u-boot-nand.lds

Quoted 7 lines
Quoted 2 lines
Quoted 2 lines

- If we are not booting from NAND, we test if a processor specific linker script arch/powerpc/cpu/$(CPU)/u-boot.lds exists; if so

we

Quoted 2 lines
Quoted 1 line

use that.

should we use $(CPUDIR) instead of arch/powerpc/cpu/$(CPU)?

I'm not sure if CPUDIR is defined at that time. Did you try it out?

CPUDIR is defined in config.mk, I tried it for 85xx/p1 boards and it worked.

Haiying

#40 lore raw

PATCH v2 9/24 arch/powerpc/*/config.mk:makeCONFIG_SYS_LDSCRIPT settings work

Dear Haiying Wang,

Quoted 9 lines · In message <1290708988.2007.13.camel@haiying-laptop> you wrote:
Quoted 9 lines
Quoted 2 lines

u-boot-nand.lds is not in board/$(BOARDDIR) for 85xx at least, it is

in

Quoted 1 line

$(SRCTREE)/$(CPUDIR)/

This is not correct - situation before applying my patches:

-> find * -name u-boot-nand.lds
arch/powerpc/cpu/mpc85xx/u-boot-nand.lds

Oops, sorry. I missed that one, even though I was looking for it :-(

Quoted 4 lines

so your patch for arch/powerpc/config.mk will not get u-boot-nand.lds for mpc85xx boards, only for the boards below. Then 85xx boards still need to get the lds from board/$(BOARDIR)/config.mk. Is that what you want?

No, not really. But actually I was just cleaning up probems where ran into them, not trying to perform a more general cleanup [*].

The situation is that the relevant 85xx boards appeare to have their own config.mk files which explicitly set LDSCRIPT to the value they need (which is indeed different from the default that gets set up ib arch/powerpc/config.mk:

arch/powerpc/config.mk: LDSCRIPT := $(SRCTREE)/$(CONFIG_BOARDDIR)/u-boot-nand.lds

board/freescale/mpc8536ds/config.mk:   LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds
board/freescale/mpc8569mds/config.mk:  LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds
board/freescale/p1_p2_rdb/config.mk:   LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds

So it seems my patches do not have any impact on the building of 85xx systems. Or am I missing something?

Quoted 2 lines

CPUDIR is defined in config.mk, I tried it for 85xx/p1 boards and it worked.

OK, I'll remember this for the next optimization.

[*] There is more that can be done for ontimization: actually many of
the PPC u-boot.lds files are (except for white space, indentation and tiny irrelevant details) identical. I intend to use a single, common linker script for all these cases, which will allow to remove dozens of more or less identical files.

But I want to have a stable code base first.

Best regards,

Wolfgang Denk

Signature · 4 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
"Go to Heaven for the climate, Hell for the company."    - Mark Twain
#41 lore raw

PATCH v2 9/24 arch/powerpc/*/config.mk:makeCONFIG_SYS_LDSCRIPT settings work

Quoted 42 lines · Wolfgang Denk

Dear Haiying Wang,

Quoted 2 lines · In message <1290708988.2007.13.camel@haiying-laptop> you wrote:
Quoted 2 lines
Quoted 2 lines

u-boot-nand.lds is not in board/$(BOARDDIR) for 85xx at least,

it is

Quoted 7 lines
Quoted 7 lines

in

Quoted 1 line

$(SRCTREE)/$(CPUDIR)/

This is not correct - situation before applying my patches:

-> find * -name u-boot-nand.lds
arch/powerpc/cpu/mpc85xx/u-boot-nand.lds

Oops, sorry. I missed that one, even though I was looking for it :-(

Quoted 1 line

so your patch for arch/powerpc/config.mk will not get

u-boot-nand.lds

Quoted 1 line

for mpc85xx boards, only for the boards below. Then 85xx boards

still

Quoted 1 line

need to get the lds from board/$(BOARDIR)/config.mk. Is that what

you

Quoted 1 line

want?

No, not really. But actually I was just cleaning up probems where ran into them, not trying to perform a more general cleanup [*].

The situation is that the relevant 85xx boards appeare to have their own config.mk files which explicitly set LDSCRIPT to the value they need (which is indeed different from the default that gets set up ib arch/powerpc/config.mk:

arch/powerpc/config.mk: LDSCRIPT :=
$(SRCTREE)/$(CONFIG_BOARDDIR)/u-boot-nand.lds

board/freescale/mpc8536ds/config.mk: LDSCRIPT :=
$(TOPDIR)/$(CPUDIR)/u-boot-nand.lds board/freescale/mpc8569mds/config.mk: LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds
board/freescale/p1_p2_rdb/config.mk: LDSCRIPT :=
$(TOPDIR)/$(CPUDIR)/u-boot-nand.lds

Quoted 3 lines

So it seems my patches do not have any impact on the building of 85xx systems. Or am I missing something?

No, your patch doesn't have impact on them. I just wonder if you wanted to apply your patch for 85xx board.:)

Haiying

#42 lore raw

PATCH v2 9/24 arch/powerpc/*/config.mk: makeCONFIG_SYS_LDSCRIPT settings work

In reply to Haiying Wang

Dear Haiying Wang,

Quoted 7 lines · In message <1290702018.2007.4.camel@haiying-laptop> you wrote:
Quoted 6 lines · Wolfgang Denk

As we try to get rid of board specific config.mk files we must provide a way for board specific settings of the LDSCRIPT variable (path to the linker script) where needed.

We now implement the following hierarchy:

Quoted 8 lines
Quoted 5 lines

- Highest priority has a "#define CONFIG_SYS_LDCONFIG" in the board config file.
- If CONFIG_SYS_LDCONFIG is not set, and the system is booting from NAND (CONFIG_NAND_U_BOOT is set), then a board specific linker script board/$(BOARDDIR)/u-boot-nand.lds gets use.

u-boot-nand.lds is not in board/$(BOARDDIR) for 85xx at least, it is in $(SRCTREE)/$(CPUDIR)/

What is incorrect is the description - it does not match the latest
code: we don't test CONFIG_NAND_U_BOOT but CONFIG_NAND_SPL.

I will fix this when applying.

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
Good morning. This is the telephone company. Due  to  repairs,  we're
giving  you  advance notice that your service will be cut off indefi-
nitely at ten o'clock. That's two minutes from now.
#43 lore raw

PATCH v2 10/24 PPChameleonEVB and CATcenter need a custom linker script

In reply to Wolfgang Denk

These boards use an embedded environment, which is not supported by the generic arch/powerpc/cpu/ppc4xx/u-boot.lds script.

The breakage was introduced by commit 2cd95a2 "ppc4xx: Remove board specific linker scripts from most PPC4xx boards"

Cc Stefan Roese <[email protected]>
Cc Andrea Marson <[email protected]>

---
Stefan, if it's OK with you I will pull this directly.

 board/dave/PPChameleonEVB/u-boot.lds |  128 ++++++++++++++++++++++++++++++++++
 include/configs/CATcenter.h          |    1 +
 include/configs/PPChameleonEVB.h     |    1 +
 3 files changed, 130 insertions(+), 0 deletions(-)
 create mode 100644 board/dave/PPChameleonEVB/u-boot.lds
board/dave/PPChameleonEVB/u-boot.lds new file +128 -0
new file mode 100644
index 0000000..17f5919
@@ -0,0 +1,128 @@
+/*
+ * Copyright 2007-2009 Freescale Semiconductor, Inc.
+ *
+ * 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
+ */
+
+#include "config.h"	/* CONFIG_BOARDDIR */
+
+#ifndef RESET_VECTOR_ADDRESS
+#define RESET_VECTOR_ADDRESS	0xfffffffc
+#endif
+
+OUTPUT_ARCH(powerpc)
+
+PHDRS
+{
+  text PT_LOAD;
+  bss PT_LOAD;
+}
+
+SECTIONS
+{
+  /* Read-only sections, merged into text segment: */
+  . = + SIZEOF_HEADERS;
+  .text      :
+  {
+    *(.text*)
+   } :text
+    _etext = .;
+    PROVIDE (etext = .);
+    .rodata    :
+   {
+    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
+  } :text
+
+  /* Read-write section, merged into data segment: */
+  . = (. + 0x00FF) & 0xFFFFFF00;
+  _erotext = .;
+  PROVIDE (erotext = .);
+  .reloc   :
+  {
+    KEEP(*(.got))
+    _GOT2_TABLE_ = .;
+    KEEP(*(.got2))
+    _FIXUP_TABLE_ = .;
+    KEEP(*(.fixup))
+  }
+  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
+  __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
+
+  .data    :
+  {
+    *(.data*)
+    *(.sdata*)
+  }
+  _edata  =  .;
+  PROVIDE (edata = .);
+
+  . = .;
+  __u_boot_cmd_start = .;
+  .u_boot_cmd : { *(.u_boot_cmd) }
+  __u_boot_cmd_end = .;
+
+  . = .;
+  __start___ex_table = .;
+  __ex_table : { *(__ex_table) }
+  __stop___ex_table = .;
+
+  . = ALIGN(256);
+  __init_begin = .;
+  .text.init : { *(.text.init) }
+  .data.init : { *(.data.init) }
+  . = ALIGN(256);
+  __init_end = .;
+
+  ppcenv_assert = ASSERT(. < 0xFFFF8000, ".bss section too big, overlaps .ppcenv section. Please update your confguration: CONFIG_SYS_MONITOR_BASE, CONFIG_SYS_MONITOR_LEN and CONFIG_SYS_TEXT_BASE may need to be modified.");
+  . = 0xFFFF8000;
+  .ppcenv :
+  {
+    common/env_embedded.o(.ppcenv);
+  }
+
+  .resetvec RESET_VECTOR_ADDRESS :
+  {
+    KEEP(*(.resetvec))
+  } :text = 0xffff
+
+  . = RESET_VECTOR_ADDRESS + 0x4;
+
+  /*
+   * Make sure that the bss segment isn't linked@0x0, otherwise its
+   * address won't be updated during relocation fixups.  Note that
+   * this is a temporary fix.  Code to dynamically the fixup the bss
+   * location will be added in the future.  When the bss relocation
+   * fixup code is present this workaround should be removed.
+   */
+#if (RESET_VECTOR_ADDRESS == 0xfffffffc)
+  . |= 0x10;
+#endif
+
+  __bss_start = .;
+  .bss (NOLOAD)       :
+  {
+   *(.bss*)
+   *(.sbss*)
+   *(COMMON)
+  } :bss
+
+  . = ALIGN(4);
+  _end = . ;
+  PROVIDE (end = .);
+}
include/configs/CATcenter.h +1 -0
index ac70d15..0b75a4e 100644
@@ -76,6 +76,7 @@
 #define CONFIG_PPCHAMELEONEVB	1	/* ...on a PPChameleonEVB board */
 
 #define	CONFIG_SYS_TEXT_BASE	0xFFFB0000	/* Reserve 320 kB for Monitor */
+#define CONFIG_SYS_LDSCRIPT	"board/dave/PPChameleonEVB/u-boot.lds"
 
 #define CONFIG_BOARD_EARLY_INIT_F 1	/* call board_early_init_f()	*/
 #define CONFIG_MISC_INIT_R	1	/* call misc_init_r()		*/
include/configs/PPChameleonEVB.h +1 -0
index a14bd0e..195925a 100644
@@ -76,6 +76,7 @@
 #define CONFIG_PPCHAMELEONEVB	1	/* ...on a PPChameleonEVB board */
 
 #define	CONFIG_SYS_TEXT_BASE	0xFFFB0000	/* Reserve 320 kB for Monitor */
+#define CONFIG_SYS_LDSCRIPT	"board/dave/PPChameleonEVB/u-boot.lds"
 
 #define CONFIG_BOARD_EARLY_INIT_F 1	/* call board_early_init_f()	*/
 #define CONFIG_MISC_INIT_R	1	/* call misc_init_r()		*/
Signature · 1 line
1.7.3.2
#44 lore raw

PATCH v2 10/24 PPChameleonEVB and CATcenter need a custom linker script

Hi Wolfgang,

Quoted 11 lines · On Thursday 25 November 2010 17:00:30 Wolfgang Denk wrote:

These boards use an embedded environment, which is not supported by the generic arch/powerpc/cpu/ppc4xx/u-boot.lds script.

The breakage was introduced by commit 2cd95a2 "ppc4xx: Remove board specific linker scripts from most PPC4xx boards"

Cc Stefan Roese <[email protected]>
Cc Andrea Marson <[email protected]>

---
Stefan, if it's OK with you I will pull this directly.

Yes, please do:

Cheers,
Stefan

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

#45 lore raw

PATCH v2 11/24 ppc4xx: Fix build problems of IBM DDR2 NAND booting targets

In reply to Wolfgang Denk

From: Stefan Roese <[email protected]>

This change is needed to compile the PPC4xx NAND booting targets equipped with the IBM DDR2 SDRAM controller.

---
Stefan, if it's OK with you I will pull this directly.

 board/amcc/canyonlands/canyonlands.c |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)
board/amcc/canyonlands/canyonlands.c +0 -12
index faa3720..80e2739 100644
@@ -363,18 +363,6 @@ int checkboard(void)
 }
 #endif	/* !defined(CONFIG_ARCHES) */
 
-#if defined(CONFIG_NAND_U_BOOT)
-/*
- * NAND booting U-Boot version uses a fixed initialization, since the whole
- * I2C SPD DIMM autodetection/calibration doesn't fit into the 4k of boot
- * code.
- */
-phys_size_t initdram(int board_type)
-{
-	return CONFIG_SYS_MBYTES_SDRAM << 20;
-}
-#endif
-
 #if defined(CONFIG_PCI)
 int board_pcie_first(void)
 {
Signature · 1 line
1.7.3.2
#46 lore raw

PATCH v2 11/24 ppc4xx: Fix build problems of IBM DDR2 NAND booting targets

Hi Wolfgang,

Quoted 9 lines · On Thursday 25 November 2010 17:00:31 Wolfgang Denk wrote:

From: Stefan Roese <[email protected]>

This change is needed to compile the PPC4xx NAND booting targets equipped with the IBM DDR2 SDRAM controller.

---
Stefan, if it's OK with you I will pull this directly.

Yes, please do. And for the other ppc4xx specific ones too.

For all patches in this series:

Thanks.

Cheers,
Stefan

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

#47 lore raw

PATCH v3 12/24 POWERPC: enable --gc-sections and -ffunction-sections -fdata-sections

In reply to Wolfgang Denk

The switch from archive libraries to partial linking has introduced a number of problems, that are non-trivial to solve. For example, it is no longer possible to include individual object files in the linker script as we did before for example in the case of boards with embedded environment to fill up the gap caused by the need to align the environment on flash erase block boundaries.

The best (but unfortunately not easiest) approach to address this problem is to enable -ffunction-sections (and -fdata-sections) so we can again (and even in much finer granularity) place certain code where we want it. When doing this step, it seems only consequent to also add --gc-sections which has the added benefit of reducing the memory footprint of the U-Boot image (both in flash and in RAM).

Unfortunately, this requires changes to a lot of linker scripts.

Cc Stefan Roese <[email protected]>
Cc Kim Phillips <[email protected]>
Cc Andy Fleming <[email protected]>
Cc Kumar Gala <[email protected]>
---
 arch/powerpc/config.mk             |    4 ++--
 arch/powerpc/cpu/mpc85xx/config.mk |    4 ----
 2 files changed, 2 insertions(+), 6 deletions(-)
arch/powerpc/config.mk +2 -2
index 5bc849c..2912604 100644
@@ -25,9 +25,9 @@ CROSS_COMPILE ?= ppc_8xx-
 
 STANDALONE_LOAD_ADDR = 0x40000
 
-PLATFORM_RELFLAGS += -mrelocatable
+PLATFORM_RELFLAGS += -mrelocatable -ffunction-sections -fdata-sections
 PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__
-PLATFORM_LDFLAGS  += -n
+PLATFORM_LDFLAGS  += -n --gc-sections
 
 ifdef CONFIG_SYS_LDSCRIPT
 # need to strip off double quotes
arch/powerpc/cpu/mpc85xx/config.mk +0 -4
index 3f3d096..66d1741 100644
@@ -25,10 +25,6 @@ PLATFORM_RELFLAGS += -fPIC -meabi
 
 PLATFORM_CPPFLAGS += -ffixed-r2 -Wa,-me500 -msoft-float -mno-string
 
-# Enable gc-sections to enable generation of smaller images.
-PLATFORM_LDFLAGS += --gc-sections
-PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
-
 # -mspe=yes is needed to have -mno-spe accepted by a buggy GCC;
 # see "[PATCH,rs6000] make -mno-spe work as expected" on
 # http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00311.html
Signature · 1 line
1.7.3.2
#48 lore raw

PATCH v2 13/24 ppc4xx: Cleanup for partial linking and --gc-sections

In reply to Wolfgang Denk

This commit adapts 4xx boards for partial linking with --gc-sections.

Cc Stefan Roese <[email protected]>
Cc Tirumala Marri <[email protected]>
Cc David Updegraff <[email protected]>
Cc Matthias Fuchs <[email protected]>
Cc Dirk Eibach <[email protected]>
Cc Larry Johnson <[email protected]>
Cc Peter De Schrijver <[email protected]>
Cc Niklaus Giger <[email protected]>
Cc Daniel Poirot <[email protected]>

---
Stefan, if it's OK with you I will pull this directly.

 arch/powerpc/cpu/ppc4xx/u-boot.lds         |   53 ++++-----------------
 board/amcc/bamboo/Makefile                 |    6 ++-
 board/amcc/bamboo/u-boot-nand.lds          |   50 ++++----------------
 board/amcc/bluestone/Makefile              |    6 ++-
 board/amcc/canyonlands/Makefile            |    6 ++-
 board/amcc/canyonlands/u-boot-nand.lds     |   48 ++++----------------
 board/amcc/sequoia/Makefile                |    6 ++-
 board/amcc/sequoia/u-boot-nand.lds         |   48 ++++----------------
 board/amcc/sequoia/u-boot-ram.lds          |   50 ++++----------------
 board/amirix/ap1000/Makefile               |    4 +-
 board/amirix/ap1000/u-boot.lds             |   67 ++++-----------------------
 board/cray/L1/L1.c                         |    6 --
 board/esd/dasa_sim/u-boot.lds              |   57 +++++------------------
 board/esd/du440/Makefile                   |    6 ++-
 board/esd/pmc440/Makefile                  |    6 ++-
 board/gdsys/intip/Makefile                 |    6 ++-
 board/korat/Makefile                       |    6 ++-
 board/lwmon5/Makefile                      |    6 ++-
 board/ml2/u-boot.lds                       |   69 ++++------------------------
 board/netstal/hcu5/Makefile                |    4 +-
 board/sbc405/sbc405.c                      |    7 ---
 board/t3corp/Makefile                      |    6 ++-
 include/configs/AP1000.h                   |    8 +++
 include/configs/CANBT.h                    |    2 +-
 include/configs/CPCI2DP.h                  |    2 +-
 include/configs/DP405.h                    |    1 +
 include/configs/ML2.h                      |    9 ++++
 include/configs/sc3.h                      |    2 +-
 nand_spl/board/amcc/acadia/u-boot.lds      |    2 +-
 nand_spl/board/amcc/bamboo/u-boot.lds      |    2 +-
 nand_spl/board/amcc/canyonlands/u-boot.lds |    2 +-
 nand_spl/board/amcc/kilauea/u-boot.lds     |    2 +-
 nand_spl/board/amcc/sequoia/u-boot.lds     |    4 +-
 33 files changed, 152 insertions(+), 407 deletions(-)
arch/powerpc/cpu/ppc4xx/u-boot.lds +10 -43
index eca1f9d..dac0e5b 100644
@@ -27,8 +27,7 @@
 #endif
 
 OUTPUT_ARCH(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
+
 PHDRS
 {
   text PT_LOAD;
@@ -39,43 +38,16 @@ SECTIONS
 {
   /* Read-only sections, merged into text segment: */
   . = + SIZEOF_HEADERS;
-  .interp : { *(.interp) }
-  .hash          : { *(.hash)		}
-  .dynsym        : { *(.dynsym)		}
-  .dynstr        : { *(.dynstr)		}
-  .rel.text      : { *(.rel.text)		}
-  .rela.text     : { *(.rela.text)	}
-  .rel.data      : { *(.rel.data)		}
-  .rela.data     : { *(.rela.data)	}
-  .rel.rodata    : { *(.rel.rodata)	}
-  .rela.rodata   : { *(.rela.rodata)	}
-  .rel.got       : { *(.rel.got)		}
-  .rela.got      : { *(.rela.got)		}
-  .rel.ctors     : { *(.rel.ctors)	}
-  .rela.ctors    : { *(.rela.ctors)	}
-  .rel.dtors     : { *(.rel.dtors)	}
-  .rela.dtors    : { *(.rela.dtors)	}
-  .rel.bss       : { *(.rel.bss)		}
-  .rela.bss      : { *(.rela.bss)		}
-  .rel.plt       : { *(.rel.plt)		}
-  .rela.plt      : { *(.rela.plt)		}
-  .init          : { *(.init)	}
-  .plt : { *(.plt) }
   .text      :
   {
-    *(.text)
-    *(.got1)
+    *(.text*)
    } :text
     _etext = .;
     PROVIDE (etext = .);
     .rodata    :
    {
-    *(.eh_frame)
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   } :text
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x00FF) & 0xFFFFFF00;
@@ -83,23 +55,19 @@ SECTIONS
   PROVIDE (erotext = .);
   .reloc   :
   {
-    *(.got)
+    KEEP(*(.got))
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
   __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -138,7 +106,7 @@ SECTIONS
 
   .resetvec RESET_VECTOR_ADDRESS :
   {
-    *(.resetvec)
+    KEEP(*(.resetvec))
   } :text = 0xffff
 
   . = RESET_VECTOR_ADDRESS + 0x4;
@@ -157,9 +125,8 @@ SECTIONS
   __bss_start = .;
   .bss (NOLOAD)       :
   {
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.bss*)
+   *(.sbss*)
    *(COMMON)
   } :bss
 
board/amcc/bamboo/Makefile +4 -2
index 7c0f50f..2e7dc39 100644
@@ -32,8 +32,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $^)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
board/amcc/bamboo/u-boot-nand.lds +10 -40

93 lines not on this page · raw message

board/amcc/bluestone/Makefile +4 -2
index bcc5252..642eda0 100644
@@ -33,8 +33,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $^)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
board/amcc/canyonlands/Makefile +4 -2
index c8ecaf9..4d87ea9 100644
@@ -34,8 +34,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $^)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
board/amcc/canyonlands/u-boot-nand.lds +9 -39

92 lines not on this page · raw message

board/amcc/sequoia/Makefile +4 -2
index 5085138..efe2065 100644
@@ -34,8 +34,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $^)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
board/amcc/sequoia/u-boot-nand.lds +9 -39

92 lines not on this page · raw message

board/amcc/sequoia/u-boot-ram.lds +10 -40

85 lines not on this page · raw message

board/amirix/ap1000/Makefile +3 -1
index fdf6145..fe7a6a2 100644
@@ -32,7 +32,9 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
 	$(call cmd_link_o_target, $^)
 
 clean:
board/amirix/ap1000/u-boot.lds +10 -57

110 lines not on this page · raw message

board/cray/L1/L1.c +0 -6
index 0f5f02c..d87b6ef 100644
@@ -170,12 +170,6 @@ int misc_init_r (void)
 }
 
 /* ------------------------------------------------------------------------- */
-phys_size_t initdram (int board_type)
-{
-	return (L1_MEMSIZE);
-}
-
-/* ------------------------------------------------------------------------- */
 /* stubs so we can print dates w/o any nvram RTC.*/
 int rtc_get (struct rtc_time *tmp)
 {
board/esd/dasa_sim/u-boot.lds +12 -45

103 lines not on this page · raw message

board/esd/du440/Makefile +4 -2
index 7b7b4f7..06824c7 100644
@@ -32,8 +32,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $^)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
board/esd/pmc440/Makefile +4 -2
index b2f4465..f640d1e 100644
@@ -37,8 +37,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $^)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
board/gdsys/intip/Makefile +4 -2
index c8ecaf9..4d87ea9 100644
@@ -34,8 +34,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $^)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
board/korat/Makefile +4 -2
index 83b4d61..6781596 100644
@@ -32,8 +32,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $^)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
board/lwmon5/Makefile +4 -2
index ba9387d..f7fef96 100644
@@ -32,8 +32,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $^)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
board/ml2/u-boot.lds +9 -60

108 lines not on this page · raw message

board/netstal/hcu5/Makefile +3 -1
index 5348765..280c2f6 100644
@@ -34,7 +34,9 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
 	$(call cmd_link_o_target, $^)
 
 clean:
board/sbc405/sbc405.c +0 -7
index 33b4d11..4efc410 100644
@@ -96,13 +96,6 @@ int checkboard (void)
 
 /* ------------------------------------------------------------------------- */
 
-phys_size_t initdram (int board_type)
-{
-	return  spd_sdram ();
-}
-
-/* ------------------------------------------------------------------------- */
-
 int testdram (void)
 {
 	/* TODO: XXX XXX XXX */
board/t3corp/Makefile +4 -2
index 682174f..4211b7b 100644
@@ -34,8 +34,10 @@ SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
 
-$(LIB):	$(OBJS) $(SOBJS)
-	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+all:	$(LIB) $(SOBJS)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $^)
 
 clean:
 	rm -f $(SOBJS) $(OBJS)
include/configs/AP1000.h +8 -0
index 9e5490d..ffaab79 100644
@@ -94,6 +94,14 @@
 #define CONFIG_SPD_EEPROM	1	/* use SPD EEPROM for setup    */
 
 /*
+ * I2C
+ */
+#define CONFIG_HARD_I2C			/* I2C with hardware support	*/
+#define CONFIG_PPC4XX_I2C		/* use PPC4xx driver		*/
+#define CONFIG_SYS_I2C_SLAVE	0x7F
+#define CONFIG_SYS_I2C_SPEED	400000
+
+/*
  * Miscellaneous configurable options
  */
 #define CONFIG_SYS_LONGHELP			/* undef to save memory	    */
include/configs/CANBT.h +1 -1
index b27ef64..be9238e 100644
@@ -77,7 +77,7 @@
 #define CONFIG_CMD_EEPROM
 
 #undef CONFIG_CMD_NET
-
+#undef CONFIG_CMD_NFS
 
 #undef CONFIG_WATCHDOG			/* watchdog disabled		*/
 
include/configs/CPCI2DP.h +1 -1
index 99ace67..afe8d6e 100644
@@ -78,7 +78,7 @@
 #define CONFIG_CMD_EEPROM
 
 #undef CONFIG_CMD_NET
-
+#undef CONFIG_CMD_NFS
 
 #undef	CONFIG_WATCHDOG			/* watchdog disabled		*/
 
include/configs/DP405.h +1 -0
index ecdf93f..f6e2652 100644
@@ -65,6 +65,7 @@
 #define CONFIG_CMD_EEPROM
 
 #undef CONFIG_CMD_NET
+#undef CONFIG_CMD_NFS
 
 #undef	CONFIG_WATCHDOG			/* watchdog disabled		*/
 
include/configs/ML2.h +9 -0
index ed78387..1e96b9e 100644
@@ -88,6 +88,7 @@
 #define CONFIG_CMD_JFFS2
 
 #undef CONFIG_CMD_NET
+#undef CONFIG_CMD_NFS
 #undef CONFIG_CMD_RTC
 #undef CONFIG_CMD_PCI
 #undef CONFIG_CMD_I2C
@@ -100,6 +101,14 @@
 #define CONFIG_SPD_EEPROM      1       /* use SPD EEPROM for setup    */
 
 /*
+ * I2C
+ */
+#define CONFIG_HARD_I2C			/* I2C with hardware support	*/
+#define CONFIG_PPC4XX_I2C		/* use PPC4xx driver		*/
+#define CONFIG_SYS_I2C_SLAVE	0x7F
+#define CONFIG_SYS_I2C_SPEED	400000
+
+/*
  * Miscellaneous configurable options
  */
 #define CONFIG_SYS_LONGHELP			/* undef to save memory		*/
include/configs/sc3.h +1 -1
index 0451105..873d3b4 100644
@@ -518,7 +518,7 @@
 
 #define CONFIG_SYS_EBC_CFG    0xb84ef000
 
-#define CONFIG_SDRAM_BANK0	/* use the standard SDRAM initialization */
+#undef CONFIG_SDRAM_BANK0	/* use private SDRAM initialization */
 #undef CONFIG_SPD_EEPROM
 
 /*
nand_spl/board/amcc/acadia/u-boot.lds +1 -1
index b89cd80..5695465 100644
@@ -26,7 +26,7 @@ SECTIONS
 {
   .resetvec 0xf8004ffc :
   {
-    *(.resetvec)
+    KEEP(*(.resetvec))
   } = 0xffff
 
   .text      :
nand_spl/board/amcc/bamboo/u-boot.lds +1 -1
index d171269..8a9e6e9 100644
@@ -26,7 +26,7 @@ SECTIONS
 {
   .resetvec 0x00800FFC :
   {
-    *(.resetvec)
+    KEEP(*(.resetvec))
   } = 0xffff
 
   .text      :
nand_spl/board/amcc/canyonlands/u-boot.lds +1 -1
index e676e0c..73190cd 100644
@@ -26,7 +26,7 @@ SECTIONS
 {
   .resetvec 0xE3003FFC :
   {
-    *(.resetvec)
+    KEEP(*(.resetvec))
   } = 0xffff
 
   .text      :
nand_spl/board/amcc/kilauea/u-boot.lds +1 -1
index 5a586fc..9894a10 100644
@@ -26,7 +26,7 @@ SECTIONS
 {
   .resetvec 0x00800FFC :
   {
-    *(.resetvec)
+    KEEP(*(.resetvec))
   } = 0xffff
 
   .text      :
nand_spl/board/amcc/sequoia/u-boot.lds +2 -2
index 1601c36..c81ce68 100644
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2006
+ * (C) Copyright 2006-2010
  * Stefan Roese, DENX Software Engineering, sr at denx.de.
  *
  * See file CREDITS for list of people who contributed to this
@@ -26,7 +26,7 @@ SECTIONS
 {
   .resetvec 0xE0013FFC :
   {
-    *(.resetvec)
+    KEEP(*(.resetvec))
   } = 0xffff
 
   .text      :
Signature · 1 line
1.7.3.2
#49 lore raw

PATCH v2 14/24 ppc4xx/NAND: Reduce size of NAND SPL image

In reply to Wolfgang Denk

From: Stefan Roese <[email protected]>

This is needed for the canyonlands_nand build target. Without it the resulting image won't fit into 4k.

---
Stefan, if it's OK with you I will pull this directly.

 drivers/mtd/nand/ndfc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/nand/ndfc.c +2 -2
index 3ca13a9..0729e0c 100644
@@ -201,6 +201,8 @@ int board_nand_init(struct nand_chip *nand)
 #ifndef CONFIG_NAND_SPL
 	nand->write_buf  = ndfc_write_buf;
 	nand->verify_buf = ndfc_verify_buf;
+
+	chip++;
 #else
 	/*
 	 * Setup EBC (CS0 only right now)
@@ -211,7 +213,5 @@ int board_nand_init(struct nand_chip *nand)
 	mtebc(PB0AP, CONFIG_SYS_EBC_PB0AP);
 #endif
 
-	chip++;
-
 	return 0;
 }
Signature · 1 line
1.7.3.2
#50 lore raw

PATCH v2 15/24 83xx: Cleanup for partial linking and --gc-sections

In reply to Wolfgang Denk

---
Kim, allthough the 83xx boards appear to build fine at first glance, some (or all?) of the NAND boot images are 4 GB in size. Could you
please have a look what's going wrong there? Thanks.

Kim, if it's OK with you I will pull this directly.

 arch/powerpc/cpu/mpc83xx/u-boot.lds |   53 ++++++----------------------------
 1 files changed, 10 insertions(+), 43 deletions(-)
arch/powerpc/cpu/mpc83xx/u-boot.lds +10 -43
index 0b74a13..81a7ace 100644
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2006
+ * (C) Copyright 2006-2010
  * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
  *
  * See file CREDITS for list of people who contributed to this
@@ -25,41 +25,13 @@ OUTPUT_ARCH(powerpc)
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .interp : { *(.interp) }
-  .hash          : { *(.hash)		}
-  .dynsym        : { *(.dynsym)		}
-  .dynstr        : { *(.dynstr)		}
-  .rel.text      : { *(.rel.text)		}
-  .rela.text     : { *(.rela.text)	}
-  .rel.data      : { *(.rel.data)		}
-  .rela.data     : { *(.rela.data)	}
-  .rel.rodata    : { *(.rel.rodata)	}
-  .rela.rodata   : { *(.rela.rodata)	}
-  .rel.got       : { *(.rel.got)		}
-  .rela.got      : { *(.rela.got)		}
-  .rel.ctors     : { *(.rel.ctors)	}
-  .rela.ctors    : { *(.rela.ctors)	}
-  .rel.dtors     : { *(.rel.dtors)	}
-  .rela.dtors    : { *(.rela.dtors)	}
-  .rel.bss       : { *(.rel.bss)		}
-  .rela.bss      : { *(.rela.bss)		}
-  .rel.plt       : { *(.rel.plt)		}
-  .rela.plt      : { *(.rela.plt)		}
-  .init          : { *(.init)	}
-  .plt : { *(.plt) }
   .text      :
   {
-    arch/powerpc/cpu/mpc83xx/start.o	(.text)
-    *(.text)
-    *(.got1)
+    arch/powerpc/cpu/mpc83xx/start.o	(.text*)
+    *(.text*)
     . = ALIGN(16);
-    *(.eh_frame)
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x0FFF) & 0xFFFFF000;
@@ -67,23 +39,19 @@ SECTIONS
   PROVIDE (erotext = .);
   .reloc   :
   {
-    *(.got)
+    KEEP(*(.got))
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
   __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -109,9 +77,8 @@ SECTIONS
   __bss_start = .;
   .bss (NOLOAD)       :
   {
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
   }
Signature · 1 line
1.7.3.2
#51 lore raw

PATCH v2 15/24 83xx: Cleanup for partial linking and --gc-sections

Dear Kim,

Quoted 6 lines · In message <[email protected]> I wrote:

---
Kim, allthough the 83xx boards appear to build fine at first glance, some (or all?) of the NAND boot images are 4 GB in size. Could you
please have a look what's going wrong there? Thanks.

I just noticed Scott's patch that addresses this issue:

http://patchwork.ozlabs.org/patch/72962/

This fixes the issue. How shall we handle this? Will you send a pull request any time soon, or shall I pull directly?

Best regards,

Wolfgang Denk

Signature · 4 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
"It is easier to port a shell than a shell script."      - Larry Wall
#52 lore raw

PATCH v2 15/24 83xx: Cleanup for partial linking and--gc-sections

In reply to Wolfgang Denk
Quoted 7 lines · Wolfgang Denk

---
Kim, allthough the 83xx boards appear to build fine at first glance, some (or all?) of the NAND boot images are 4 GB in size. Could you
please have a look what's going wrong there? Thanks.

Quoted 6 lines

Kim, if it's OK with you I will pull this directly.

 arch/powerpc/cpu/mpc83xx/u-boot.lds |   53
++++++----------------------------
 1 files changed, 10 insertions(+), 43 deletions(-)

I think the u-boot.lds in nand_spl/board/freescale/mpc83xx/ needs to have the fix as well.

Haiying

#53 lore raw

PATCH v2 15/24 83xx: Cleanup for partial linking and--gc-sections

Dear Haiying Wang,

Quoted 3 lines · In message <1290709405.2007.16.camel@haiying-laptop> you wrote:

I think the u-boot.lds in nand_spl/board/freescale/mpc83xx/ needs to have the fix as well.

Which fix do you mean?

I see two such files:

nand_spl/board/freescale/mpc8313erdb/u-boot.lds nand_spl/board/freescale/mpc8315erdb/u-boot.lds

They are identical and look sane to me.

OK, we can drop the "*(.eh_frame)" line, but it doesn't hurt either.

Which exact fix do you have in mind?

Best regards,

Wolfgang Denk

Signature · 4 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
"Open the pod bay doors, HAL."                    - Dave Bowman, 2001
#54 lore raw

PATCH v2 15/24 83xx: Cleanup for partial linking and--gc-sections

Quoted 11 lines · Wolfgang Denk

Dear Haiying Wang,

Quoted 3 lines · In message <1290709405.2007.16.camel@haiying-laptop> you wrote:

I think the u-boot.lds in nand_spl/board/freescale/mpc83xx/ needs to have the fix as well.

Which fix do you mean?

I see two such files:

Quoted 8 lines

nand_spl/board/freescale/mpc8313erdb/u-boot.lds nand_spl/board/freescale/mpc8315erdb/u-boot.lds

They are identical and look sane to me.

OK, we can drop the "*(.eh_frame)" line, but it doesn't hurt either.

Which exact fix do you have in mind?

I mean:
"
- *(.got2)
+ KEEP(*(.got2))
"

#55 lore raw

PATCH v2 15/24 83xx: Cleanup for partial linking and--gc-sections

Dear Haiying Wang,

arch/powerpc/cpu/mpc83xx/u-boot.lds SECTIONS · line 44

Quoted 5 lines · In message <1290711414.2007.18.camel@haiying-laptop> you wrote:

I mean:
"

arch/powerpc/cpu/mpc83xx/u-boot.lds +1 -1
-               *(.got2)
+               KEEP(*(.got2))

I see. Of course you are right. Thanks for pointing out. I will post an updated patch.

Best regards,

Wolfgang Denk

Signature · 5 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
The game of life is a game of boomerangs.  Our  thoughts,  deeds  and
words return to us sooner or later with astounding accuracy.
#56 lore raw

PATCH v3 15/25 83xx: Cleanup for partial linking and --gc-sections

In reply to Wolfgang Denk
Cc Kim Phillips <[email protected]>
Cc Haiying Wang <[email protected]>

---
Changes since V2:
- fixed nand_spl/*/u-boot.lds as pointed out by Haiying

 arch/powerpc/cpu/mpc83xx/u-boot.lds             |   53 ++++------------------
 nand_spl/board/freescale/mpc8313erdb/u-boot.lds |    7 ++-
 nand_spl/board/freescale/mpc8315erdb/u-boot.lds |    7 ++-
 3 files changed, 18 insertions(+), 49 deletions(-)
arch/powerpc/cpu/mpc83xx/u-boot.lds +10 -43
index 0b74a13..81a7ace 100644
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2006
+ * (C) Copyright 2006-2010
  * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
  *
  * See file CREDITS for list of people who contributed to this
@@ -25,41 +25,13 @@ OUTPUT_ARCH(powerpc)
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .interp : { *(.interp) }
-  .hash          : { *(.hash)		}
-  .dynsym        : { *(.dynsym)		}
-  .dynstr        : { *(.dynstr)		}
-  .rel.text      : { *(.rel.text)		}
-  .rela.text     : { *(.rela.text)	}
-  .rel.data      : { *(.rel.data)		}
-  .rela.data     : { *(.rela.data)	}
-  .rel.rodata    : { *(.rel.rodata)	}
-  .rela.rodata   : { *(.rela.rodata)	}
-  .rel.got       : { *(.rel.got)		}
-  .rela.got      : { *(.rela.got)		}
-  .rel.ctors     : { *(.rel.ctors)	}
-  .rela.ctors    : { *(.rela.ctors)	}
-  .rel.dtors     : { *(.rel.dtors)	}
-  .rela.dtors    : { *(.rela.dtors)	}
-  .rel.bss       : { *(.rel.bss)		}
-  .rela.bss      : { *(.rela.bss)		}
-  .rel.plt       : { *(.rel.plt)		}
-  .rela.plt      : { *(.rela.plt)		}
-  .init          : { *(.init)	}
-  .plt : { *(.plt) }
   .text      :
   {
-    arch/powerpc/cpu/mpc83xx/start.o	(.text)
-    *(.text)
-    *(.got1)
+    arch/powerpc/cpu/mpc83xx/start.o	(.text*)
+    *(.text*)
     . = ALIGN(16);
-    *(.eh_frame)
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x0FFF) & 0xFFFFF000;
@@ -67,23 +39,19 @@ SECTIONS
   PROVIDE (erotext = .);
   .reloc   :
   {
-    *(.got)
+    KEEP(*(.got))
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
   __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -109,9 +77,8 @@ SECTIONS
   __bss_start = .;
   .bss (NOLOAD)       :
   {
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
   }
nand_spl/board/freescale/mpc8313erdb/u-boot.lds +4 -3
index ad82589..138e427 100644
@@ -30,7 +30,6 @@ SECTIONS
 	.text : {
 		*(.text*)
 		. = ALIGN(16);
-		*(.eh_frame)
 		*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
 	}
 
@@ -39,13 +38,15 @@ SECTIONS
 		*(.data*)
 		*(.sdata*)
 		_GOT2_TABLE_ = .;
-		*(.got2)
+		KEEP(*(.got2))
 		__got2_entries = (. - _GOT2_TABLE_) >> 2;
 	}
 
 	. = ALIGN(8);
 	__bss_start = .;
-	.bss (NOLOAD) : { *(.*bss) }
+	.bss (NOLOAD) : {
+		*(.*bss)
+	}
 	_end = .;
 }
 ENTRY(_start)
nand_spl/board/freescale/mpc8315erdb/u-boot.lds +4 -3
index ad82589..138e427 100644
@@ -30,7 +30,6 @@ SECTIONS
 	.text : {
 		*(.text*)
 		. = ALIGN(16);
-		*(.eh_frame)
 		*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
 	}
 
@@ -39,13 +38,15 @@ SECTIONS
 		*(.data*)
 		*(.sdata*)
 		_GOT2_TABLE_ = .;
-		*(.got2)
+		KEEP(*(.got2))
 		__got2_entries = (. - _GOT2_TABLE_) >> 2;
 	}
 
 	. = ALIGN(8);
 	__bss_start = .;
-	.bss (NOLOAD) : { *(.*bss) }
+	.bss (NOLOAD) : {
+		*(.*bss)
+	}
 	_end = .;
 }
 ENTRY(_start)
Signature · 1 line
1.7.3.2
#57 lore raw

PATCH v4 15/25 83xx: Cleanup for partial linking and --gc-sections

From: Wolfgang Denk <[email protected]>

---
Changes since V2:
- fixed nand_spl/*/u-boot.lds as pointed out by Haiying

Changes since V3:
- included the simpc8313 board

 arch/powerpc/cpu/mpc83xx/u-boot.lds             |   53 ++++------------------
 nand_spl/board/freescale/mpc8313erdb/u-boot.lds |    7 ++-
 nand_spl/board/freescale/mpc8315erdb/u-boot.lds |    7 ++-
 nand_spl/board/sheldon/simpc8313/u-boot.lds     |    9 ++--
 4 files changed, 23 insertions(+), 53 deletions(-)
arch/powerpc/cpu/mpc83xx/u-boot.lds +10 -43
index 0b74a13..81a7ace 100644
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2006
+ * (C) Copyright 2006-2010
  * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
  *
  * See file CREDITS for list of people who contributed to this
@@ -25,41 +25,13 @@ OUTPUT_ARCH(powerpc)
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .interp : { *(.interp) }
-  .hash          : { *(.hash)		}
-  .dynsym        : { *(.dynsym)		}
-  .dynstr        : { *(.dynstr)		}
-  .rel.text      : { *(.rel.text)		}
-  .rela.text     : { *(.rela.text)	}
-  .rel.data      : { *(.rel.data)		}
-  .rela.data     : { *(.rela.data)	}
-  .rel.rodata    : { *(.rel.rodata)	}
-  .rela.rodata   : { *(.rela.rodata)	}
-  .rel.got       : { *(.rel.got)		}
-  .rela.got      : { *(.rela.got)		}
-  .rel.ctors     : { *(.rel.ctors)	}
-  .rela.ctors    : { *(.rela.ctors)	}
-  .rel.dtors     : { *(.rel.dtors)	}
-  .rela.dtors    : { *(.rela.dtors)	}
-  .rel.bss       : { *(.rel.bss)		}
-  .rela.bss      : { *(.rela.bss)		}
-  .rel.plt       : { *(.rel.plt)		}
-  .rela.plt      : { *(.rela.plt)		}
-  .init          : { *(.init)	}
-  .plt : { *(.plt) }
   .text      :
   {
-    arch/powerpc/cpu/mpc83xx/start.o	(.text)
-    *(.text)
-    *(.got1)
+    arch/powerpc/cpu/mpc83xx/start.o	(.text*)
+    *(.text*)
     . = ALIGN(16);
-    *(.eh_frame)
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x0FFF) & 0xFFFFF000;
@@ -67,23 +39,19 @@ SECTIONS
   PROVIDE (erotext = .);
   .reloc   :
   {
-    *(.got)
+    KEEP(*(.got))
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
   __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -109,9 +77,8 @@ SECTIONS
   __bss_start = .;
   .bss (NOLOAD)       :
   {
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
   }
nand_spl/board/freescale/mpc8313erdb/u-boot.lds +4 -3
index ad82589..138e427 100644
@@ -30,7 +30,6 @@ SECTIONS
 	.text : {
 		*(.text*)
 		. = ALIGN(16);
-		*(.eh_frame)
 		*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
 	}
 
@@ -39,13 +38,15 @@ SECTIONS
 		*(.data*)
 		*(.sdata*)
 		_GOT2_TABLE_ = .;
-		*(.got2)
+		KEEP(*(.got2))
 		__got2_entries = (. - _GOT2_TABLE_) >> 2;
 	}
 
 	. = ALIGN(8);
 	__bss_start = .;
-	.bss (NOLOAD) : { *(.*bss) }
+	.bss (NOLOAD) : {
+		*(.*bss)
+	}
 	_end = .;
 }
 ENTRY(_start)
nand_spl/board/freescale/mpc8315erdb/u-boot.lds +4 -3
index ad82589..138e427 100644
@@ -30,7 +30,6 @@ SECTIONS
 	.text : {
 		*(.text*)
 		. = ALIGN(16);
-		*(.eh_frame)
 		*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
 	}
 
@@ -39,13 +38,15 @@ SECTIONS
 		*(.data*)
 		*(.sdata*)
 		_GOT2_TABLE_ = .;
-		*(.got2)
+		KEEP(*(.got2))
 		__got2_entries = (. - _GOT2_TABLE_) >> 2;
 	}
 
 	. = ALIGN(8);
 	__bss_start = .;
-	.bss (NOLOAD) : { *(.*bss) }
+	.bss (NOLOAD) : {
+		*(.*bss)
+	}
 	_end = .;
 }
 ENTRY(_start)
nand_spl/board/sheldon/simpc8313/u-boot.lds +5 -4
index ad82589..f80fe16 100644
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2006
+ * (C) Copyright 2006-2010
  * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
  *
  * Copyright 2008 Freescale Semiconductor, Inc.
@@ -30,7 +30,6 @@ SECTIONS
 	.text : {
 		*(.text*)
 		. = ALIGN(16);
-		*(.eh_frame)
 		*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
 	}
 
@@ -39,13 +38,15 @@ SECTIONS
 		*(.data*)
 		*(.sdata*)
 		_GOT2_TABLE_ = .;
-		*(.got2)
+		KEEP(*(.got2))
 		__got2_entries = (. - _GOT2_TABLE_) >> 2;
 	}
 
 	. = ALIGN(8);
 	__bss_start = .;
-	.bss (NOLOAD) : { *(.*bss) }
+	.bss (NOLOAD) : {
+		*(.*bss)
+	}
 	_end = .;
 }
 ENTRY(_start)
Signature · 1 line
1.7.3.2
#58 lore raw

PATCH v4 15/25 83xx: Cleanup for partial linking and --gc-sections

Dear Kim Phillips,

Quoted 11 lines · In message <[email protected]> you wrote:

From: Wolfgang Denk <[email protected]>

---
Changes since V2:
- fixed nand_spl/*/u-boot.lds as pointed out by Haiying

Changes since V3:
- included the simpc8313 board

Sorry, too late. I want to get out -rc2 this night, so I pulled that stuff already. Please submit as incremental patch.

Best regards,

Wolfgang Denk

Signature · 4 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
The light at the end of the tunnel is usually a "No Exit" sign.
#59 lore raw

PATCH v2 16/24 86xx: Cleanup for partial linking and --gc-sections

In reply to Wolfgang Denk

---
Kumar, if it's OK with you I will pull this directly.

 arch/powerpc/cpu/mpc86xx/Makefile   |    6 ++--
 arch/powerpc/cpu/mpc86xx/u-boot.lds |   36 ++--------------------------------
 2 files changed, 6 insertions(+), 36 deletions(-)
arch/powerpc/cpu/mpc86xx/Makefile +3 -3
index 9b2db1b..5b7d80a 100644
@@ -28,7 +28,8 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(CPU).o
 
-START	= start.o
+SSTART	= start.o
+CSTART	= traps.o
 
 SOBJS-y += cache.o
 SOBJS-$(CONFIG_MP) += release.o
@@ -42,11 +43,10 @@ COBJS-$(CONFIG_OF_LIBFDT) += fdt.o
 COBJS-y	+= interrupts.o
 COBJS-$(CONFIG_MP) += mp.o
 COBJS-y	+= speed.o
-COBJS-y	+= traps.o
 
 SRCS	:= $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
 OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
-START	:= $(addprefix $(obj),$(START))
+START	:= $(addprefix $(obj),$(SSTART) $(CSTART))
 
 all:	$(obj).depend $(START) $(LIB)
 
arch/powerpc/cpu/mpc86xx/u-boot.lds +3 -33
index 4bfcb90..49a4c78 100644
@@ -26,40 +26,10 @@ SECTIONS
 {
 
   /* Read-only sections, merged into text segment: */
-  .interp : { *(.interp) }
-  .hash          : { *(.hash)		}
-  .dynsym        : { *(.dynsym)		}
-  .dynstr        : { *(.dynstr)		}
-  .rel.text      : { *(.rel.text)		}
-  .rela.text     : { *(.rela.text)	}
-  .rel.data      : { *(.rel.data)		}
-  .rela.data     : { *(.rela.data)	}
-  .rel.rodata    : { *(.rel.rodata)	}
-  .rela.rodata   : { *(.rela.rodata)	}
-  .rel.got       : { *(.rel.got)		}
-  .rela.got      : { *(.rela.got)		}
-  .rel.ctors     : { *(.rel.ctors)	}
-  .rela.ctors    : { *(.rela.ctors)	}
-  .rel.dtors     : { *(.rel.dtors)	}
-  .rela.dtors    : { *(.rela.dtors)	}
-  .rel.bss       : { *(.rel.bss)		}
-  .rela.bss      : { *(.rela.bss)		}
-  .rel.plt       : { *(.rel.plt)		}
-  .rela.plt      : { *(.rela.plt)		}
-  .init          : { *(.init)	}
-  .plt : { *(.plt) }
   .text      :
   {
-    arch/powerpc/cpu/mpc86xx/start.o	(.text)
-    arch/powerpc/cpu/mpc86xx/traps.o (.text)
-    arch/powerpc/cpu/mpc86xx/interrupts.o (.text)
-    arch/powerpc/cpu/mpc86xx/cpu_init.o (.text)
-    arch/powerpc/cpu/mpc86xx/cpu.o (.text)
-    arch/powerpc/cpu/mpc86xx/speed.o (.text)
-    common/dlmalloc.o (.text)
-    lib/crc32.o (.text)
-    arch/powerpc/lib/extable.o (.text)
-    lib/zlib.o (.text)
+    arch/powerpc/cpu/mpc86xx/start.o	(.text*)
+    arch/powerpc/cpu/mpc86xx/traps.o	(.text*)
     *(.text*)
    }
     _etext = .;
@@ -112,8 +82,8 @@ SECTIONS
   __bss_start = .;
   .bss (NOLOAD)       :
   {
-   *(.sbss*)
    *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
   }
Signature · 1 line
1.7.3.2
#60 lore raw

PATCH v2 17/24 8xx: Cleanup for partial linking and --gc-sections

In reply to Wolfgang Denk
---
 arch/powerpc/cpu/mpc8xx/Makefile       |   12 ++--
 board/LEOX/elpt860/u-boot.lds          |   71 ++++-------------
 board/RPXClassic/u-boot.lds            |   68 +++-------------
 board/RPXlite/u-boot.lds               |   68 +++-------------
 board/RPXlite_dw/u-boot.lds            |   68 +++-------------
 board/RRvision/u-boot.lds              |   65 +++------------
 board/adder/u-boot.lds                 |   51 +++----------
 board/c2mon/u-boot.lds                 |   65 ++++------------
 board/cogent/u-boot.lds                |   57 +++----------
 board/eltec/mhpc/u-boot.lds            |   57 +++-----------
 board/emk/top860/u-boot.lds            |   56 +++----------
 board/ep88x/u-boot.lds                 |   52 +++----------
 board/esteem192e/u-boot.lds            |   66 ++++------------
 board/etx094/u-boot.lds                |   70 ++++------------
 board/fads/u-boot.lds                  |   53 +++----------
 board/fads/u-boot.lds.debug            |  136 --------------------------------
 board/flagadm/u-boot.lds               |   56 +++----------
 board/gen860t/u-boot-flashenv.lds      |   53 +++----------
 board/gen860t/u-boot.lds               |   54 +++----------
 board/genietv/u-boot.lds               |   72 +++++------------
 board/hermes/u-boot.lds                |   65 +++------------
 board/icu862/u-boot.lds                |   70 +++--------------
 board/ip860/u-boot.lds                 |   67 +++-------------
 board/ivm/u-boot.lds                   |   58 +++-----------
 board/keymile/km8xx/u-boot.lds         |   70 +++--------------
 board/kup/kup4k/u-boot.lds             |   70 +++--------------
 board/kup/kup4x/u-boot.lds             |   70 +++--------------
 board/lantec/u-boot.lds                |   66 ++++------------
 board/lwmon/u-boot.lds                 |   58 +++-----------
 board/manroland/uc100/u-boot.lds       |   64 +++------------
 board/manroland/uc100/u-boot.lds.debug |  134 -------------------------------
 board/mbx8xx/u-boot.lds                |   56 +++----------
 board/netphone/u-boot.lds              |   67 +++-------------
 board/netta/u-boot.lds                 |   67 +++-------------
 board/netta2/u-boot.lds                |   67 +++-------------
 board/netvia/u-boot.lds                |   67 +++-------------
 board/nx823/u-boot.lds                 |   57 +++-----------
 board/quantum/u-boot.lds               |   68 +++-------------
 board/r360mpi/u-boot.lds               |   63 +++------------
 board/rbc823/u-boot.lds                |   68 ++++------------
 board/rmu/u-boot.lds                   |   68 +++-------------
 board/siemens/IAD210/u-boot.lds        |   66 ++++------------
 board/sixnet/u-boot.lds                |   58 +++-----------
 board/snmc/qs850/u-boot.lds            |   67 +++-------------
 board/snmc/qs860t/u-boot.lds           |   70 +++--------------
 board/spc1920/u-boot.lds               |   70 +++--------------
 board/spd8xx/u-boot.lds                |   68 ++++++-----------
 board/stx/stxxtc/u-boot.lds            |   67 +++-------------
 board/svm_sc8xx/u-boot.lds             |   78 ++++++-------------
 board/tqc/tqm8xx/u-boot.lds            |   73 +++++------------
 board/v37/u-boot.lds                   |   72 +++--------------
 board/westel/amx860/u-boot.lds         |   64 ++++------------
 include/configs/NETPHONE.h             |    4 +-
 include/configs/NETTA.h                |    4 +-
 include/configs/NETVIA.h               |    4 +-
 include/configs/cogent_mpc8xx.h        |    4 +-
 include/configs/quantum.h              |    4 +-
 57 files changed, 680 insertions(+), 2783 deletions(-)
 delete mode 100644 board/fads/u-boot.lds.debug
 delete mode 100644 board/manroland/uc100/u-boot.lds.debug
arch/powerpc/cpu/mpc8xx/Makefile +6 -6
index 527771e..0d1a12c 100644
@@ -27,8 +27,8 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(CPU).o
 
-START-y	+= start.o
-START-y	+= kgdb.o
+SSTART-y += start.o
+CSTART-y += traps.o
 COBJS-y	+= bedbug_860.o
 COBJS-y	+= commproc.o
 COBJS-y	+= cpu.o
@@ -42,19 +42,19 @@ COBJS-y	+= scc.o
 COBJS-y	+= serial.o
 COBJS-y	+= speed.o
 COBJS-y	+= spi.o
-COBJS-y	+= traps.o
 COBJS-y	+= upatch.o
 COBJS-y	+= video.o
+SOBJS-y	+= kgdb.o
 SOBJS-y	+= plprcr_write.o
 
-SRCS	:= $(START-y:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+SRCS	:= $(SSTART-y:.o=.S) $(CSTART-y:.o=.c) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
 OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
-START	:= $(addprefix $(obj),$(START-y))
+START	:= $(addprefix $(obj),$(SSTART-y) $(CSTART-y))
 
 all:	$(obj).depend $(START) $(LIB)
 
 $(LIB):	$(OBJS)
-	$(call cmd_link_o_target, $(OBJS) $(obj)kgdb.o)
+	$(call cmd_link_o_target, $(OBJS))
 
 #########################################################################
 
board/LEOX/elpt860/u-boot.lds +17 -54

116 lines not on this page · raw message

board/RPXClassic/u-boot.lds +12 -56

112 lines not on this page · raw message

board/RPXlite/u-boot.lds +12 -56

112 lines not on this page · raw message

board/RPXlite_dw/u-boot.lds +12 -56

112 lines not on this page · raw message

board/RRvision/u-boot.lds +12 -53

114 lines not on this page · raw message

board/adder/u-boot.lds +10 -41

82 lines not on this page · raw message

board/c2mon/u-boot.lds +15 -50

114 lines not on this page · raw message

board/cogent/u-boot.lds +13 -44

100 lines not on this page · raw message

board/eltec/mhpc/u-boot.lds +12 -45

101 lines not on this page · raw message

board/emk/top860/u-boot.lds +12 -44

100 lines not on this page · raw message

board/ep88x/u-boot.lds +11 -41

87 lines not on this page · raw message

board/esteem192e/u-boot.lds +16 -50

115 lines not on this page · raw message

board/etx094/u-boot.lds +17 -53

118 lines not on this page · raw message

board/fads/u-boot.lds +11 -42

91 lines not on this page · raw message

board/fads/u-boot.lds.debug deleted +0 -136

136 lines not on this page · raw message

board/flagadm/u-boot.lds +12 -44

100 lines not on this page · raw message

board/gen860t/u-boot-flashenv.lds +12 -41

93 lines not on this page · raw message

board/gen860t/u-boot.lds +12 -42

95 lines not on this page · raw message

board/genietv/u-boot.lds +22 -50

120 lines not on this page · raw message

board/hermes/u-boot.lds +14 -51

113 lines not on this page · raw message

board/icu862/u-boot.lds +12 -58

114 lines not on this page · raw message

board/ip860/u-boot.lds +12 -55

111 lines not on this page · raw message

board/ivm/u-boot.lds +13 -45

101 lines not on this page · raw message

board/keymile/km8xx/u-boot.lds +12 -58

114 lines not on this page · raw message

board/kup/kup4k/u-boot.lds +12 -58

114 lines not on this page · raw message

board/kup/kup4x/u-boot.lds +12 -58

114 lines not on this page · raw message

board/lantec/u-boot.lds +16 -50

115 lines not on this page · raw message

board/lwmon/u-boot.lds +13 -45

53 lines not on this page · raw message

board/manroland/uc100/u-boot.lds +11 -53

64 lines not on this page · raw message

board/manroland/uc100/u-boot.lds.debug deleted +0 -134

134 lines not on this page · raw message

board/mbx8xx/u-boot.lds +12 -44

56 lines not on this page · raw message

board/netphone/u-boot.lds +12 -55

67 lines not on this page · raw message

board/netta/u-boot.lds +12 -55

67 lines not on this page · raw message

board/netta2/u-boot.lds +12 -55

67 lines not on this page · raw message

board/netvia/u-boot.lds +12 -55

67 lines not on this page · raw message

board/nx823/u-boot.lds +12 -45

57 lines not on this page · raw message

board/quantum/u-boot.lds +12 -56

68 lines not on this page · raw message

board/r360mpi/u-boot.lds +12 -51

63 lines not on this page · raw message

board/rbc823/u-boot.lds +18 -50

68 lines not on this page · raw message

board/rmu/u-boot.lds +12 -56

68 lines not on this page · raw message

board/siemens/IAD210/u-boot.lds +17 -49

66 lines not on this page · raw message

board/sixnet/u-boot.lds +13 -45

58 lines not on this page · raw message

board/snmc/qs850/u-boot.lds +12 -55

67 lines not on this page · raw message

board/snmc/qs860t/u-boot.lds +12 -58

70 lines not on this page · raw message

board/spc1920/u-boot.lds +12 -58

70 lines not on this page · raw message

board/spd8xx/u-boot.lds +23 -45

68 lines not on this page · raw message

board/stx/stxxtc/u-boot.lds +12 -55

67 lines not on this page · raw message

board/svm_sc8xx/u-boot.lds +24 -54

78 lines not on this page · raw message

board/tqc/tqm8xx/u-boot.lds +22 -51

73 lines not on this page · raw message

board/v37/u-boot.lds +12 -60

72 lines not on this page · raw message

board/westel/amx860/u-boot.lds +15 -49

64 lines not on this page · raw message

include/configs/NETPHONE.h +1 -3
index 04f0f0b..88339ac 100644

Lines of this file are not shown. View the raw message.

include/configs/NETTA.h +1 -3
index 795c0f6..bdc93b6 100644

Lines of this file are not shown. View the raw message.

include/configs/NETVIA.h +1 -3
index a92e3a6..3494b7a 100644

Lines of this file are not shown. View the raw message.

include/configs/cogent_mpc8xx.h +2 -2
index 3ee4a40..58aa88b 100644

Lines of this file are not shown. View the raw message.

include/configs/quantum.h +2 -2
index 0ebb094..3ff80d2 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.3.2

Part of the diff is not shown here. View the raw message.

#61 lore raw

PATCH v2 18/24 5xx: Cleanup for partial linking and --gc-sections

In reply to Wolfgang Denk
---
 arch/powerpc/cpu/mpc5xx/u-boot.lds |   69 ++++++++---------------------------
 include/configs/cmi_mpc5xx.h       |    1 +
 2 files changed, 17 insertions(+), 53 deletions(-)
arch/powerpc/cpu/mpc5xx/u-boot.lds +16 -53
index d5e5dc1..b7fd4bc 100644
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2001	Wolfgang Denk, DENX Software Engineering, wd at denx.de
+ * (C) Copyright 2001-2010 Wolfgang Denk, DENX Software Engineering, wd at denx.de
  * (C) Copyright 2003	Martin Winistoerfer, martinwinistoerfer at gmx.ch
  *
  * See file CREDITS for list of people who contributed to this
@@ -22,54 +22,23 @@
  */
 
 OUTPUT_ARCH(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
+
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */
   . = + SIZEOF_HEADERS;
-  .interp : { *(.interp) }
-  .hash          : { *(.hash)		}
-  .dynsym        : { *(.dynsym)		}
-  .dynstr        : { *(.dynstr)		}
-  .rel.text      : { *(.rel.text)		}
-  .rela.text     : { *(.rela.text)	}
-  .rel.data      : { *(.rel.data)		}
-  .rela.data     : { *(.rela.data)	}
-  .rel.rodata    : { *(.rel.rodata)	}
-  .rela.rodata   : { *(.rela.rodata)	}
-  .rel.got       : { *(.rel.got)		}
-  .rela.got      : { *(.rela.got)		}
-  .rel.ctors     : { *(.rel.ctors)	}
-  .rela.ctors    : { *(.rela.ctors)	}
-  .rel.dtors     : { *(.rel.dtors)	}
-  .rela.dtors    : { *(.rela.dtors)	}
-  .rel.bss       : { *(.rel.bss)		}
-  .rela.bss      : { *(.rela.bss)		}
-  .rel.plt       : { *(.rel.plt)		}
-  .rela.plt      : { *(.rela.plt)		}
-  .init          : { *(.init)	}
-  .plt : { *(.plt) }
   .text      :
   {
-    /* WARNING - the following is hand-optimized to fit within	*/
-    /* the sector layout of our flash chips!	XXX FIXME XXX	*/
-
-    arch/powerpc/cpu/mpc5xx/start.o	(.text)
+    arch/powerpc/cpu/mpc5xx/start.o	(.text*)
 
-    *(.text)
-    *(.got1)
+    *(.text*)
   }
   _etext = .;
   PROVIDE (etext = .);
   .rodata    :
   {
-    *(.eh_frame)
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x00FF) & 0xFFFFFF00;
@@ -77,23 +46,19 @@ SECTIONS
   PROVIDE (erotext = .);
   .reloc   :
   {
-    *(.got)
+    KEEP(*(.got))
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
   __fixup_entries = (. - _FIXUP_TABLE_)>>2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -119,19 +84,17 @@ SECTIONS
   __bss_start = .;
   .bss (NOLOAD)       :
   {
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
   }
 
   _end = . ;
   PROVIDE (end = .);
-/*   . = env_start;
-	.ppcenv	:
-	{
-		common/env_embedded.o (.ppcenv)
-	}
-*/
+  . = env_start;
+  .ppcenv :
+  {
+    common/env_embedded.o (.ppcenv)
+  }
 }
include/configs/cmi_mpc5xx.h +1 -0
index 198f342..329e4e3 100644
@@ -62,6 +62,7 @@
 #include <config_cmd_default.h>
 
 #undef	CONFIG_CMD_NET		/* disabeled - causes compile errors */
+#undef	CONFIG_CMD_NFS
 
 #define CONFIG_CMD_MEMORY
 #define CONFIG_CMD_LOADB
Signature · 1 line
1.7.3.2
#62 lore raw

PATCH v2 19/24 512x: Cleanup for partial linking and --gc-sections

In reply to Wolfgang Denk
Cc Anatolij Gustschin <[email protected]>
Cc Timur Tabi <[email protected]>
---
 Makefile                            |    5 ++-
 arch/powerpc/cpu/mpc512x/Makefile   |    1 -
 arch/powerpc/cpu/mpc512x/u-boot.lds |   53 ++++++----------------------------
 board/freescale/common/Makefile     |    4 +-
 4 files changed, 16 insertions(+), 47 deletions(-)
Makefile +4 -1
index b4aae89..28028dc 100644
@@ -185,6 +185,9 @@ LIBS += lib/lzma/liblzma.o
 LIBS += lib/lzo/liblzo.o
 LIBS += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \
 	"board/$(VENDOR)/common/lib$(VENDOR).o"; fi)
+ifdef CONFIG_FSL_DIU_FB
+LIBS += board/freescale/common/libfreescale.o
+endif
 LIBS += $(CPUDIR)/lib$(CPU).o
 ifdef SOC
 LIBS += $(CPUDIR)/$(SOC)/lib$(SOC).o
@@ -260,7 +263,7 @@ ifeq ($(SOC),s5pc2xx)
 LIBS += $(CPUDIR)/s5p-common/libs5p-common.o
 endif
 
-LIBS := $(addprefix $(obj),$(LIBS))
+LIBS := $(addprefix $(obj),$(sort $(LIBS)))
 .PHONY : $(LIBS) $(TIMESTAMP_FILE) $(VERSION_FILE)
 
 LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).o
arch/powerpc/cpu/mpc512x/Makefile +0 -1
index cb1263a..4a4bc0d 100644
@@ -37,7 +37,6 @@ COBJS-y += iopin.o
 COBJS-y += serial.o
 COBJS-y += speed.o
 COBJS-$(CONFIG_FSL_DIU_FB) += diu.o
-COBJS-$(CONFIG_FSL_DIU_FB) += ../../../../board/freescale/common/fsl_diu_fb.o
 COBJS-$(CONFIG_CMD_IDE) += ide.o
 COBJS-$(CONFIG_IIM) += iim.o
 COBJS-$(CONFIG_PCI) += pci.o
arch/powerpc/cpu/mpc512x/u-boot.lds +10 -43

88 lines not on this page · raw message

board/freescale/common/Makefile +2 -2
index 703a347..905dd7a 100644
@@ -24,10 +24,10 @@
 include $(TOPDIR)/config.mk
 
 ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)board/$(VENDOR)/common)
+$(shell mkdir -p $(obj)board/freescale/common)
 endif
 
-LIB	= $(obj)lib$(VENDOR).o
+LIB	= $(obj)libfreescale.o
 
 COBJS-$(CONFIG_FSL_CADMUS)	+= cadmus.o
 COBJS-$(CONFIG_FSL_VIA)		+= cds_via.o
Signature · 1 line
1.7.3.2
#63 lore raw

PATCH v2 20/24 5xxx: Cleanup for partial linking and --gc-sections

In reply to Wolfgang Denk
---
 arch/powerpc/cpu/mpc5xxx/Makefile                |   27 +++++++---
 arch/powerpc/cpu/mpc5xxx/u-boot-customlayout.lds |   61 ++++-----------------
 arch/powerpc/cpu/mpc5xxx/u-boot.lds              |   57 ++++----------------
 board/manroland/hmi1001/config.mk                |   24 ---------
 board/matrix_vision/mvsmr/u-boot.lds             |   58 ++++-----------------
 include/configs/TQM5200.h                        |    2 +-
 include/configs/mcc200.h                         |    2 +-
 7 files changed, 56 insertions(+), 175 deletions(-)
 delete mode 100644 board/manroland/hmi1001/config.mk
arch/powerpc/cpu/mpc5xxx/Makefile +19 -8
index ecaeb22..1a088b7 100644
@@ -25,14 +25,25 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(CPU).o
 
-START	= start.o
-SOBJS	= io.o firmware_sc_task_bestcomm.impl.o
-COBJS	= i2c.o traps.o cpu.o cpu_init.o ide.o interrupts.o \
-	  loadtask.o pci_mpc5200.o serial.o speed.o usb_ohci.o usb.o
-
-SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
-START	:= $(addprefix $(obj),$(START))
+SSTART	= start.o
+CSTART  = traps.o
+SOBJS  += io.o
+SOBJS  += firmware_sc_task_bestcomm.impl.o
+COBJS-y += i2c.o
+COBJS-y += cpu.o
+COBJS-y += cpu_init.o
+COBJS-y += ide.o
+COBJS-y += interrupts.o
+COBJS-y += loadtask.o
+COBJS-y += pci_mpc5200.o
+COBJS-y += serial.o
+COBJS-y += speed.o
+COBJS-$(CONFIG_CMD_USB) += usb_ohci.o
+COBJS-$(CONFIG_CMD_USB) += usb.o
+
+SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS-y))
+START	:= $(addprefix $(obj),$(SSTART) $(CSTART))
 
 all:	$(obj).depend $(START) $(LIB)
 
arch/powerpc/cpu/mpc5xxx/u-boot-customlayout.lds +12 -49

101 lines not on this page · raw message

arch/powerpc/cpu/mpc5xxx/u-boot.lds +12 -45

96 lines not on this page · raw message

board/manroland/hmi1001/config.mk deleted +0 -24
deleted file mode 100644
index 54dc1c4..0000000
@@ -1,24 +0,0 @@
-#
-# (C) Copyright 2004
-# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
-#
-# 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
-#
-
-LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/mpc5xxx/u-boot-customlayout.lds
board/matrix_vision/mvsmr/u-boot.lds +11 -47

97 lines not on this page · raw message

include/configs/TQM5200.h +1 -1
index c11fe8a..c2f6b8a 100644
@@ -396,6 +396,7 @@
 /* use CFI flash driver */
 #define CONFIG_SYS_FLASH_CFI		1	/* Flash is CFI conformant */
 #define CONFIG_FLASH_CFI_DRIVER	1	/* Use the common driver */
+#define CONFIG_FLASH_CFI_MTD		/* with MTD support */
 #define CONFIG_SYS_FLASH_BANKS_LIST	{ CONFIG_SYS_BOOTCS_START }
 #define CONFIG_SYS_MAX_FLASH_BANKS	1	/* max num of flash banks
 					   (= chip selects) */
@@ -417,7 +418,6 @@
 /* Dynamic MTD partition support */
 #define CONFIG_CMD_MTDPARTS
 #define CONFIG_MTD_DEVICE		/* needed for mtdparts commands */
-#define CONFIG_FLASH_CFI_MTD
 #define MTDIDS_DEFAULT		"nor0=TQM5200-0"
 
 #ifdef CONFIG_STK52XX
include/configs/mcc200.h +1 -1
index f1cdc40..b56b273 100644
@@ -121,7 +121,7 @@
 #define CONFIG_CMD_USB
 
 #undef	CONFIG_CMD_NET
-
+#undef	CONFIG_CMD_NFS
 
 /*
  * Autobooting
Signature · 1 line
1.7.3.2
#64 lore raw

PATCH v2 21/24 8220: Cleanup for partial linking and --gc-sections

In reply to Wolfgang Denk
---
 arch/powerpc/cpu/mpc8220/u-boot.lds |   56 +++++++----------------------------
 1 files changed, 11 insertions(+), 45 deletions(-)
arch/powerpc/cpu/mpc8220/u-boot.lds +11 -45
index 31a7a0e..63cbbd7 100644
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2003-2004
+ * (C) Copyright 2003-2010
  * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
  *
  * See file CREDITS for list of people who contributed to this
@@ -22,46 +22,17 @@
  */
 
 OUTPUT_ARCH(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
+
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .interp : { *(.interp) }
-  .hash          : { *(.hash)		}
-  .dynsym        : { *(.dynsym)		}
-  .dynstr        : { *(.dynstr)		}
-  .rel.text      : { *(.rel.text)		}
-  .rela.text     : { *(.rela.text)	}
-  .rel.data      : { *(.rel.data)		}
-  .rela.data     : { *(.rela.data)	}
-  .rel.rodata    : { *(.rel.rodata)	}
-  .rela.rodata   : { *(.rela.rodata)	}
-  .rel.got       : { *(.rel.got)		}
-  .rela.got      : { *(.rela.got)		}
-  .rel.ctors     : { *(.rel.ctors)	}
-  .rela.ctors    : { *(.rela.ctors)	}
-  .rel.dtors     : { *(.rel.dtors)	}
-  .rela.dtors    : { *(.rela.dtors)	}
-  .rel.bss       : { *(.rel.bss)		}
-  .rela.bss      : { *(.rela.bss)		}
-  .rel.plt       : { *(.rel.plt)		}
-  .rela.plt      : { *(.rela.plt)		}
-  .init          : { *(.init)	}
-  .plt : { *(.plt) }
   .text      :
   {
-    arch/powerpc/cpu/mpc8220/start.o	(.text)
-    *(.text)
-    *(.got1)
+    arch/powerpc/cpu/mpc8220/start.o	(.text*)
+    *(.text*)
     . = ALIGN(16);
-    *(.eh_frame)
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x0FFF) & 0xFFFFF000;
@@ -69,23 +40,19 @@ SECTIONS
   PROVIDE (erotext = .);
   .reloc   :
   {
-    *(.got)
+    KEEP(*(.got))
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
   __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -111,9 +78,8 @@ SECTIONS
   __bss_start = .;
   .bss (NOLOAD)       :
   {
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
   }
Signature · 1 line
1.7.3.2
#65 lore raw

PATCH v2 22/24 824x: Cleanup for partial linking and --gc-sections

In reply to Wolfgang Denk
---
 arch/powerpc/cpu/mpc824x/u-boot.lds |   53 ++++---------------
 board/cpc45/pd67290.c               |    4 +-
 board/mousse/u-boot.lds             |   56 +++----------------
 board/mvblue/u-boot.lds             |   99 +++++++++++++++++++++++++++++++++++
 board/sandpoint/u-boot.lds          |   97 ++++++++++++++++++++++++++++++++++
 drivers/net/Makefile                |   10 +++-
 include/configs/MVBLUE.h            |    1 +
 include/configs/Sandpoint8240.h     |    1 +
 include/configs/Sandpoint8245.h     |    1 +
 9 files changed, 227 insertions(+), 95 deletions(-)
 create mode 100644 board/mvblue/u-boot.lds
 create mode 100644 board/sandpoint/u-boot.lds
arch/powerpc/cpu/mpc824x/u-boot.lds +10 -43
index d1fcd7c..e7f2837 100644
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2001-2007
+ * (C) Copyright 2001-2010
  * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
  *
  * See file CREDITS for list of people who contributed to this
@@ -27,41 +27,13 @@ OUTPUT_ARCH(powerpc)
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .interp : { *(.interp) }
-  .hash          : { *(.hash)		}
-  .dynsym        : { *(.dynsym)		}
-  .dynstr        : { *(.dynstr)		}
-  .rel.text      : { *(.rel.text)		}
-  .rela.text     : { *(.rela.text)	}
-  .rel.data      : { *(.rel.data)		}
-  .rela.data     : { *(.rela.data)	}
-  .rel.rodata    : { *(.rel.rodata)	}
-  .rela.rodata   : { *(.rela.rodata)	}
-  .rel.got       : { *(.rel.got)		}
-  .rela.got      : { *(.rela.got)		}
-  .rel.ctors     : { *(.rel.ctors)	}
-  .rela.ctors    : { *(.rela.ctors)	}
-  .rel.dtors     : { *(.rel.dtors)	}
-  .rela.dtors    : { *(.rela.dtors)	}
-  .rel.bss       : { *(.rel.bss)		}
-  .rela.bss      : { *(.rela.bss)		}
-  .rel.plt       : { *(.rel.plt)		}
-  .rela.plt      : { *(.rela.plt)		}
-  .init          : { *(.init)	}
-  .plt : { *(.plt) }
   .text      :
   {
-    arch/powerpc/cpu/mpc824x/start.o		(.text)
-    *(.text)
-    *(.got1)
+    arch/powerpc/cpu/mpc824x/start.o	(.text*)
+    *(.text*)
     . = ALIGN(16);
-    *(.eh_frame)
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x0FFF) & 0xFFFFF000;
@@ -69,23 +41,19 @@ SECTIONS
   PROVIDE (erotext = .);
   .reloc   :
   {
-    *(.got)
+    KEEP(*(.got))
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
   __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -111,9 +79,8 @@ SECTIONS
   __bss_start = .;
   .bss (NOLOAD)       :
   {
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
   }
board/cpc45/pd67290.c +2 -2
index 12c9c74..0d8ef23 100644
@@ -639,7 +639,7 @@ static int i365_set_io_map (socket_info_t * s, struct pccard_io_map *io)
 #define	HOST_TO_PCI(addr)	((addr) - 0xfe000000)
 #define	PCI_TO_HOST(addr)	((addr) + 0xfe000000)
 
-int i82365_init (void)
+static int i82365_init (void)
 {
 	u_int val;
 	int i;
@@ -719,7 +719,7 @@ int i82365_init (void)
 	return 0;
 }
 
-void i82365_exit (void)
+static void i82365_exit (void)
 {
 	io.map = 0;
 	io.flags = 0;
board/mousse/u-boot.lds +9 -47

87 lines not on this page · raw message

board/mvblue/u-boot.lds new file +99 -0

99 lines not on this page · raw message

board/sandpoint/u-boot.lds new file +97 -0

97 lines not on this page · raw message

drivers/net/Makefile +7 -3
index 5393955..b605eea 100644
@@ -30,7 +30,9 @@ COBJS-$(CONFIG_PPC4xx_EMAC) += 4xx_enet.o
 COBJS-$(CONFIG_ALTERA_TSE) += altera_tse.o
 COBJS-$(CONFIG_DRIVER_AT91EMAC) += at91_emac.o
 COBJS-$(CONFIG_DRIVER_AX88180) += ax88180.o
-COBJS-$(CONFIG_BCM570x) += bcm570x.o bcm570x_autoneg.o 5701rls.o
+COBJS-$(CONFIG_BCM570x) += bcm570x.o
+COBJS-$(CONFIG_BCM570x) += bcm570x_autoneg.o
+COBJS-$(CONFIG_BCM570x) += 5701rls.o
 COBJS-$(CONFIG_BFIN_MAC) += bfin_mac.o
 COBJS-$(CONFIG_CS8900) += cs8900.o
 COBJS-$(CONFIG_TULIP) += dc2114x.o
@@ -72,7 +74,9 @@ COBJS-$(CONFIG_DRIVER_S3C4510_ETH) += s3c4510b_eth.o
 COBJS-$(CONFIG_SH_ETHER) += sh_eth.o
 COBJS-$(CONFIG_SMC91111) += smc91111.o
 COBJS-$(CONFIG_SMC911X) += smc911x.o
-COBJS-$(CONFIG_TIGON3) += tigon3.o bcm570x_autoneg.o 5701rls.o
+COBJS-$(CONFIG_TIGON3) += tigon3.o
+COBJS-$(CONFIG_TIGON3) += bcm570x_autoneg.o
+COBJS-$(CONFIG_TIGON3) += 5701rls.o
 COBJS-$(CONFIG_DRIVER_TI_EMAC) += davinci_emac.o
 COBJS-$(CONFIG_TSEC_ENET) += tsec.o
 COBJS-$(CONFIG_TSI108_ETH) += tsi108_eth.o
@@ -80,7 +84,7 @@ COBJS-$(CONFIG_ULI526X) += uli526x.o
 COBJS-$(CONFIG_VSC7385_ENET) += vsc7385.o
 COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o
 
-COBJS	:= $(COBJS-y)
+COBJS	:= $(sort $(COBJS-y))
 SRCS	:= $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 
include/configs/MVBLUE.h +1 -0
index 3aed447..5674636 100644
@@ -44,6 +44,7 @@
 #define MVBLUE_BOARD_LYNX	2
 
 #define	CONFIG_SYS_TEXT_BASE	0xFFF00000
+#define CONFIG_SYS_LDSCRIPT	"board/mvblue/u-boot.lds"
 
 #if 0
 #define ERR_LED(code)	do { if (code) \
include/configs/Sandpoint8240.h +1 -0
index 74c9ed1..524a3e0 100644
@@ -40,6 +40,7 @@
 #define CONFIG_SANDPOINT	1
 
 #define	CONFIG_SYS_TEXT_BASE	0xFFF00000
+#define CONFIG_SYS_LDSCRIPT	"board/sandpoint/u-boot.lds"
 
 #if 0
 #define USE_DINK32		1
include/configs/Sandpoint8245.h +1 -0
index 92b1256..87aa4fd 100644
@@ -40,6 +40,7 @@
 #define CONFIG_SANDPOINT	1
 
 #define	CONFIG_SYS_TEXT_BASE	0xFFF00000
+#define CONFIG_SYS_LDSCRIPT	"board/sandpoint/u-boot.lds"
 
 #if 0
 #define USE_DINK32		1
Signature · 1 line
1.7.3.2
#66 lore raw

PATCH v2 23/24 8260: Cleanup for partial linking and --gc-sections

In reply to Wolfgang Denk
---
 arch/powerpc/cpu/mpc8260/u-boot.lds |   56 +++++++----------------------------
 board/atc/ti113x.c                  |    4 +-
 board/cogent/u-boot.lds             |    6 +++-
 include/configs/cogent_mpc8260.h    |    2 +-
 4 files changed, 19 insertions(+), 49 deletions(-)
arch/powerpc/cpu/mpc8260/u-boot.lds +11 -45
index b8681e7..ad2ce37 100644
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2001-2007
+ * (C) Copyright 2001-2010
  * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
  *
  * See file CREDITS for list of people who contributed to this
@@ -22,46 +22,17 @@
  */
 
 OUTPUT_ARCH(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
+
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */
-  . = + SIZEOF_HEADERS;
-  .interp : { *(.interp) }
-  .hash          : { *(.hash)		}
-  .dynsym        : { *(.dynsym)		}
-  .dynstr        : { *(.dynstr)		}
-  .rel.text      : { *(.rel.text)		}
-  .rela.text     : { *(.rela.text)	}
-  .rel.data      : { *(.rel.data)		}
-  .rela.data     : { *(.rela.data)	}
-  .rel.rodata    : { *(.rel.rodata)	}
-  .rela.rodata   : { *(.rela.rodata)	}
-  .rel.got       : { *(.rel.got)		}
-  .rela.got      : { *(.rela.got)		}
-  .rel.ctors     : { *(.rel.ctors)	}
-  .rela.ctors    : { *(.rela.ctors)	}
-  .rel.dtors     : { *(.rel.dtors)	}
-  .rela.dtors    : { *(.rela.dtors)	}
-  .rel.bss       : { *(.rel.bss)		}
-  .rela.bss      : { *(.rela.bss)		}
-  .rel.plt       : { *(.rel.plt)		}
-  .rela.plt      : { *(.rela.plt)		}
-  .init          : { *(.init)	}
-  .plt : { *(.plt) }
   .text      :
   {
-    arch/powerpc/cpu/mpc8260/start.o		(.text)
-    *(.text)
-    *(.got1)
+    arch/powerpc/cpu/mpc8260/start.o	(.text*)
+    *(.text*)
     . = ALIGN(16);
-    *(.eh_frame)
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
   }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
 
   /* Read-write section, merged into data segment: */
   . = (. + 0x0FFF) & 0xFFFFF000;
@@ -69,23 +40,19 @@ SECTIONS
   PROVIDE (erotext = .);
   .reloc   :
   {
-    *(.got)
+    KEEP(*(.got))
     _GOT2_TABLE_ = .;
-    *(.got2)
+    KEEP(*(.got2))
     _FIXUP_TABLE_ = .;
-    *(.fixup)
+    KEEP(*(.fixup))
   }
   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
   __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
 
   .data    :
   {
-    *(.data)
-    *(.data1)
-    *(.sdata)
-    *(.sdata2)
-    *(.dynamic)
-    CONSTRUCTORS
+    *(.data*)
+    *(.sdata*)
   }
   _edata  =  .;
   PROVIDE (edata = .);
@@ -111,9 +78,8 @@ SECTIONS
   __bss_start = .;
   .bss (NOLOAD)       :
   {
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
+   *(.bss*)
+   *(.sbss*)
    *(COMMON)
    . = ALIGN(4);
   }
board/atc/ti113x.c +2 -2
index 473bb10..ff871f6 100644
@@ -468,7 +468,7 @@ static int i365_set_io_map (socket_info_t * s, struct pccard_io_map *io)
 
 /*====================================================================*/
 
-int i82365_init (void)
+static int i82365_init (void)
 {
 	u_int val;
 	int i;
@@ -545,7 +545,7 @@ int i82365_init (void)
 	return 0;
 }
 
-void i82365_exit (void)
+static void i82365_exit (void)
 {
 	io.map = 0;
 	io.flags = 0;
board/cogent/u-boot.lds +5 -1
index b4c7a0e..42ed142 100644
@@ -21,6 +21,7 @@
  * MA 02111-1307 USA
  */
 
+#include <config.h>
 OUTPUT_ARCH(powerpc)
 
 SECTIONS
@@ -29,9 +30,12 @@ SECTIONS
   . = + SIZEOF_HEADERS;
   .text      :
   {
+#ifdef CONFIG_MPC8260
+    arch/powerpc/cpu/mpc8260/start.o	(.text*)
+#else
     arch/powerpc/cpu/mpc8xx/start.o	(.text*)
     arch/powerpc/cpu/mpc8xx/traps.o	(.text*)
-
+#endif
     *(.text*)
   }
   _etext = .;
include/configs/cogent_mpc8260.h +1 -1
index d77af0d..2997f52 100644
@@ -108,7 +108,7 @@
 #define CONFIG_CMD_KGDB
 
 #undef CONFIG_CMD_NET
-
+#undef CONFIG_CMD_NFS
 
 #ifdef DEBUG
 #define CONFIG_BOOTDELAY	-1	/* autoboot disabled		*/
Signature · 1 line
1.7.3.2
#67 lore raw

PATCH v2 24/24 74xx_7xx: Cleanup for partial linking and --gc-sections

In reply to Wolfgang Denk
---
 arch/powerpc/cpu/74xx_7xx/u-boot.lds   |   91 +++++++++++++++++++++
 board/Marvell/db64360/u-boot.lds       |  135 -------------------------------
 board/Marvell/db64460/u-boot.lds       |  135 -------------------------------
 board/eltec/bab7xx/u-boot.lds          |  135 -------------------------------
 board/eltec/elppc/u-boot.lds           |  135 -------------------------------
 board/esd/cpci750/u-boot.lds           |  135 -------------------------------
 board/evb64260/u-boot.lds              |   60 +++-----------
 board/freescale/mpc7448hpc2/u-boot.lds |  133 ------------------------------
 board/pcippc2/u-boot.lds               |  138 --------------------------------
 board/ppmc7xx/u-boot.lds               |  132 ------------------------------
 board/prodrive/p3mx/u-boot.lds         |  135 -------------------------------
 drivers/pci/tsi108_pci.c               |    3 +-
 include/configs/EVB64260.h             |    1 +
 13 files changed, 106 insertions(+), 1262 deletions(-)
 create mode 100644 arch/powerpc/cpu/74xx_7xx/u-boot.lds
 delete mode 100644 board/Marvell/db64360/u-boot.lds
 delete mode 100644 board/Marvell/db64460/u-boot.lds
 delete mode 100644 board/eltec/bab7xx/u-boot.lds
 delete mode 100644 board/eltec/elppc/u-boot.lds
 delete mode 100644 board/esd/cpci750/u-boot.lds
 delete mode 100644 board/freescale/mpc7448hpc2/u-boot.lds
 delete mode 100644 board/pcippc2/u-boot.lds
 delete mode 100644 board/ppmc7xx/u-boot.lds
 delete mode 100644 board/prodrive/p3mx/u-boot.lds
arch/powerpc/cpu/74xx_7xx/u-boot.lds new file +91 -0
new file mode 100644
index 0000000..771a845
@@ -0,0 +1,91 @@
+/*
+ * (C) Copyright 2010 Wolfgang Denk <[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_ARCH(powerpc)
+
+SECTIONS
+{
+  .text      :
+  {
+    arch/powerpc/cpu/74xx_7xx/start.o	(.text*)
+
+    *(.text*)
+  }
+  _etext = .;
+  PROVIDE (etext = .);
+  .rodata    :
+  {
+    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
+  }
+
+  /* Read-write section, merged into data segment: */
+  . = (. + 0x00FF) & 0xFFFFFF00;
+  _erotext = .;
+  PROVIDE (erotext = .);
+  .reloc   :
+  {
+    KEEP(*(.got))
+    _GOT2_TABLE_ = .;
+    KEEP(*(.got2))
+    _FIXUP_TABLE_ = .;
+    KEEP(*(.fixup))
+  }
+  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
+  __fixup_entries = (. - _FIXUP_TABLE_)>>2;
+
+  .data    :
+  {
+    *(.data*)
+    *(.sdata*)
+  }
+  _edata  =  .;
+  PROVIDE (edata = .);
+
+  . = .;
+  __u_boot_cmd_start = .;
+  .u_boot_cmd : { *(.u_boot_cmd) }
+  __u_boot_cmd_end = .;
+
+
+  . = .;
+  __start___ex_table = .;
+  __ex_table : { *(__ex_table) }
+  __stop___ex_table = .;
+
+  . = ALIGN(256);
+  __init_begin = .;
+  .text.init : { *(.text.init) }
+  .data.init : { *(.data.init) }
+  . = ALIGN(256);
+  __init_end = .;
+
+  __bss_start = .;
+  .bss (NOLOAD)       :
+  {
+   *(.bss*)
+   *(.sbss*)
+   *(COMMON)
+   . = ALIGN(4);
+  }
+  _end = . ;
+  PROVIDE (end = .);
+}
board/Marvell/db64360/u-boot.lds deleted +0 -135

135 lines not on this page · raw message

board/Marvell/db64460/u-boot.lds deleted +0 -135

135 lines not on this page · raw message

board/eltec/bab7xx/u-boot.lds deleted +0 -135

135 lines not on this page · raw message

board/eltec/elppc/u-boot.lds deleted +0 -135

135 lines not on this page · raw message

board/esd/cpci750/u-boot.lds deleted +0 -135

135 lines not on this page · raw message

board/evb64260/u-boot.lds +12 -48

99 lines not on this page · raw message

board/freescale/mpc7448hpc2/u-boot.lds deleted +0 -133

133 lines not on this page · raw message

board/pcippc2/u-boot.lds deleted +0 -138

138 lines not on this page · raw message

board/ppmc7xx/u-boot.lds deleted +0 -132

132 lines not on this page · raw message

board/prodrive/p3mx/u-boot.lds deleted +0 -135

135 lines not on this page · raw message

drivers/pci/tsi108_pci.c +2 -1
index 627e8a0..c568bf9 100644
@@ -94,7 +94,8 @@ unsigned int __get_pci_config_dword (u32 addr)
 			     ".section __ex_table,\"a\"\n"
 			     "       .align 2\n"
 			     "       .long 1b,3b\n"
-			     ".text":"=r"(retval):"r"(addr));
+			     ".section .text.__get_pci_config_dword"
+				: "=r"(retval) : "r"(addr));
 
 	return (retval);
 }
include/configs/EVB64260.h +1 -0
index 3fda551..9a68b1c 100644
@@ -43,6 +43,7 @@
 #define CONFIG_SYS_GT_6426x        GT_64260 /* with a 64260 system controller */
 
 #define	CONFIG_SYS_TEXT_BASE	0xfff00000
+#define	CONFIG_SYS_LDSCRIPT	"board/evb64260/u-boot.lds"
 
 #define CONFIG_BAUDRATE		38400	/* console baudrate = 38400	*/
 
Signature · 1 line
1.7.3.2