public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/7] Address partial linking issues
@ 2010-11-21 21:03 Wolfgang Denk
  2010-11-21 21:03 ` [U-Boot] [PATCH 1/7] common/Makefile: don't include env_embedded.o into libcommon Wolfgang Denk
                   ` (36 more replies)
  0 siblings, 37 replies; 68+ messages in thread
From: Wolfgang Denk @ 2010-11-21 21:03 UTC (permalink / raw)
  To: u-boot

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

-- 
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.

^ permalink raw reply	[flat|nested] 68+ messages in thread

end of thread, other threads:[~2010-12-01 19:53 UTC | newest]

Thread overview: 68+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-21 21:03 [U-Boot] [PATCH 0/7] Address partial linking issues Wolfgang Denk
2010-11-21 21:03 ` [U-Boot] [PATCH 1/7] common/Makefile: don't include env_embedded.o into libcommon Wolfgang Denk
2010-11-21 21:45   ` Mike Frysinger
2010-11-21 21:03 ` [U-Boot] [PATCH 2/7] cpu/ppc4xx/Makefile: build only needed object files Wolfgang Denk
2010-11-21 21:03 ` [U-Boot] [PATCH 3/7] arch/powerpc/config.mk: make CONFIG_SYS_LDSCRIPT settings work Wolfgang Denk
2010-11-21 21:03 ` [U-Boot] [PATCH 4/7] PPChameleonEVB and CATcenter need a custom linker script Wolfgang Denk
2010-11-21 21:03 ` [U-Boot] [PATCH 5/7] ERIC: drop unsupported board configuration Wolfgang Denk
2010-11-21 21:03 ` [U-Boot] [PATCH 6/7] POWERPC: enable --gc-sections and -ffunction-sections -fdata-sections Wolfgang Denk
2010-11-21 22:31   ` Peter Tyser
2010-11-22  7:11     ` Wolfgang Denk
2010-11-22  7:10   ` [U-Boot] [PATCH 6/7 v2] " Wolfgang Denk
2010-11-21 21:03 ` [U-Boot] [PATCH 7/7] 4xx: Cleanup for partial linking and --gc-sections Wolfgang Denk
2010-11-23 13:31   ` Stefan Roese
2010-11-23 19:55     ` Wolfgang Denk
2010-11-24  5:40       ` Stefan Roese
2010-11-22  7:34 ` [U-Boot] [PATCH] 86xx: " Wolfgang Denk
2010-11-22 20:37 ` [U-Boot] [PATCH] 8xx: " Wolfgang Denk
2010-11-22 21:44 ` [U-Boot] [PATCH] 5xx: " Wolfgang Denk
2010-11-22 22:40 ` [U-Boot] [PATCH] 512x: " Wolfgang Denk
2010-11-22 22:58   ` Timur Tabi
2010-11-29 21:24   ` Anatolij Gustschin
2010-11-29 21:28   ` [U-Boot] [PATCH] video: move fsl_diu_fb driver to drivers/video Anatolij Gustschin
2010-12-01 19:53     ` Anatolij Gustschin
2010-11-23  6:02 ` [U-Boot] [PATCH 0/7] Address partial linking issues Stefan Roese
2010-11-25 16:00 ` [U-Boot] [PATCH 01/24] 0000-Address-partial-linking-issues Wolfgang Denk
2010-11-27 22:18   ` Wolfgang Denk
2010-11-25 16:00 ` [U-Boot] [PATCH 01/24] ERIC: drop unsupported board configuration Wolfgang Denk
2010-11-25 16:00 ` [U-Boot] [PATCH 02/24] barco: " Wolfgang Denk
2010-11-25 16:00 ` [U-Boot] [PATCH 03/24] e1000: fix compile warning Wolfgang Denk
2010-11-28 17:48   ` Sergei Shtylyov
2010-11-25 16:00 ` [U-Boot] [PATCH 04/24] IDS8247: remove redundant flash.c file Wolfgang Denk
2010-11-25 16:00 ` [U-Boot] [PATCH 05/24] WINBOND_83C553: enable only on boards that actually use it Wolfgang Denk
2010-11-25 16:00 ` [U-Boot] [PATCH 06/24] cam5200_niosflash: fix build warnings Wolfgang Denk
2010-11-25 16:00 ` [U-Boot] [PATCH 07/24 V2] common/Makefile: don't include env_embedded.o into libcommon Wolfgang Denk
2010-11-25 16:00 ` [U-Boot] [PATCH 08/24 V2] cpu/ppc4xx/Makefile: build only needed object files Wolfgang Denk
2010-11-25 16:10   ` Stefan Roese
2010-11-25 16:00 ` [U-Boot] [PATCH 09/24 V2] arch/powerpc/*/config.mk: make CONFIG_SYS_LDSCRIPT settings work Wolfgang Denk
2010-11-25 16:20   ` [U-Boot] [PATCH 09/24 V2] arch/powerpc/*/config.mk: makeCONFIG_SYS_LDSCRIPT " Haiying Wang
2010-11-25 17:19     ` Wolfgang Denk
2010-11-25 18:16       ` [U-Boot] [PATCH 09/24 V2] arch/powerpc/*/config.mk:makeCONFIG_SYS_LDSCRIPT " Haiying Wang
2010-11-25 18:28         ` Wolfgang Denk
2010-11-25 18:59           ` Haiying Wang
2010-11-25 17:47     ` [U-Boot] [PATCH 09/24 V2] arch/powerpc/*/config.mk: makeCONFIG_SYS_LDSCRIPT " Wolfgang Denk
2010-11-25 16:00 ` [U-Boot] [PATCH 10/24 V2] PPChameleonEVB and CATcenter need a custom linker script Wolfgang Denk
2010-11-25 16:12   ` Stefan Roese
2010-11-25 16:00 ` [U-Boot] [PATCH 11/24 V2] ppc4xx: Fix build problems of IBM DDR2 NAND booting targets Wolfgang Denk
2010-11-25 16:15   ` Stefan Roese
2010-11-25 16:00 ` [U-Boot] [PATCH 12/24 V3] POWERPC: enable --gc-sections and -ffunction-sections -fdata-sections Wolfgang Denk
2010-11-25 16:00 ` [U-Boot] [PATCH 13/24 V2] ppc4xx: Cleanup for partial linking and --gc-sections Wolfgang Denk
2010-11-25 16:00 ` [U-Boot] [PATCH 14/24 V2] ppc4xx/NAND: Reduce size of NAND SPL image Wolfgang Denk
2010-11-25 16:00 ` [U-Boot] [PATCH 15/24 V2] 83xx: Cleanup for partial linking and --gc-sections Wolfgang Denk
2010-11-25 18:02   ` Wolfgang Denk
2010-11-25 18:23   ` [U-Boot] [PATCH 15/24 V2] 83xx: Cleanup for partial linking and--gc-sections Haiying Wang
2010-11-25 18:32     ` Wolfgang Denk
2010-11-25 18:56       ` Haiying Wang
2010-11-26 19:53         ` Wolfgang Denk
2010-11-26 19:56   ` [U-Boot] [PATCH 15/25 V3] 83xx: Cleanup for partial linking and --gc-sections Wolfgang Denk
2010-11-28 15:11     ` [U-Boot] [PATCH 15/25 V4] " Kim Phillips
2010-11-28 16:36       ` Wolfgang Denk
2010-11-25 16:00 ` [U-Boot] [PATCH 16/24 V2] 86xx: " Wolfgang Denk
2010-11-25 16:00 ` [U-Boot] [PATCH 17/24 V2] 8xx: " Wolfgang Denk
2010-11-25 16:00 ` [U-Boot] [PATCH 18/24 V2] 5xx: " Wolfgang Denk
2010-11-25 16:00 ` [U-Boot] [PATCH 19/24 V2] 512x: " Wolfgang Denk
2010-11-25 16:00 ` [U-Boot] [PATCH 20/24 V2] 5xxx: " Wolfgang Denk
2010-11-25 16:00 ` [U-Boot] [PATCH 21/24 V2] 8220: " Wolfgang Denk
2010-11-25 16:00 ` [U-Boot] [PATCH 22/24 V2] 824x: " Wolfgang Denk
2010-11-25 16:00 ` [U-Boot] [PATCH 23/24 V2] 8260: " Wolfgang Denk
2010-11-25 16:00 ` [U-Boot] [PATCH 24/24 V2] 74xx_7xx: " Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox