[U-Boot] [PATCH 01/24] 0000-Address-partial-linking-issues
Wolfgang Denk
wd at denx.de
Thu Nov 25 17:00:20 CET 2010
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
More information about the U-Boot
mailing list