On Sunday 18 October 2009 17:32:15 Wolfgang Denk wrote: > Mike Frysinger wrote: > > > Mike Frysinger wrote: > > > > The env code is protected by the ENV_IS_EMBEDDED define, so > > > > attempting to compile the code when this isn't defined is pointless. > > > > Now that the env headers have unified around CONFIG_ENV_IS_EMBEDDED, > > > > convert the build system to only build the env objects when this is > > > > enabled. And now that the env code is conditionally compiled, we can > > > > drop the source code checks. > > > > > > > > For people who want to extract the environment manually, add a new > > > > option CONFIG_BUILD_ENVCRC that only enables the envcrc utility. > > > > > > > > Signed-off-by: Mike Frysinger <vap...@gentoo.org> > > > > --- > > > > v4 > > > > - rename config option to CONFIG_BUILD_ENVCRC > > > > > > > > README | 5 +++++ > > > > common/Makefile | 3 --- > > > > common/env_embedded.c | 7 ------- > > > > include/common.h | 5 +++++ > > > > tools/Makefile | 9 ++------- > > > > tools/envcrc.c | 11 +---------- > > > > 6 files changed, 13 insertions(+), 27 deletions(-) > > > > > > Applied, thanks. > > Arghhh... > > This patch seems to break a *lot* of boards:
i'm attaching two patches here. since we're past the merge window but before rc1, i dont know how invasive you want to get. the first one restores env_embedded.o building for certain config options (even though it'll only produce a 0 byte file). if you want to be cautious for this release, then i guess we can merge just this patch. the second one attempts to clean up env_embedded.o in all linker scripts where the board would only end up with a 0 byte file. obviously i cant test any of these since i dont have the hardware, but the logic seems straight forward. if you want to stay cautious, this would go into the next branch for start of next merge window. or just merge the 2nd patch only and assume that people who dont test the rc1+ are dead boards anyways. i got some build errors even after these fixes, but they seem unrelated to my env_embedded changes as they have to do with sections filling up & overflowing with my gcc-4.1.1 compiler. -mike
From b3003ff02cc6e4165b99df87c2024742598fa61f Mon Sep 17 00:00:00 2001 From: Mike Frysinger <vap...@gentoo.org> Date: Sun, 18 Oct 2009 19:09:18 -0400 Subject: [PATCH 1/2] env: restore limited env_embedded building A lot of linker scripts rely on an empty env_embedded file even though they don't actually have an embedded env. So restore creation of this dummy file while the linker scripts get updated. Signed-off-by: Mike Frysinger <vap...@gentoo.org> --- common/Makefile | 3 +++ common/env_embedded.c | 7 +++++++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/common/Makefile b/common/Makefile index a92a75f..3781738 100644 --- a/common/Makefile +++ b/common/Makefile @@ -52,6 +52,9 @@ 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 +COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_embedded.o +COBJS-$(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 COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o diff --git a/common/env_embedded.c b/common/env_embedded.c index e27e1cd..ae6cac4 100644 --- a/common/env_embedded.c +++ b/common/env_embedded.c @@ -41,6 +41,11 @@ #endif /* + * Generate embedded environment table + * inside U-Boot image, if needed. + */ +#if defined(ENV_IS_EMBEDDED) +/* * Only put the environment in it's own section when we are building * U-Boot proper. The host based program "tools/envcrc" does not need * a seperate section. Note that ENV_CRC is only defined when building @@ -205,3 +210,5 @@ unsigned long env_size __PPCTEXT__ = sizeof(env_t); * Add in absolutes. */ GEN_ABS(env_offset, CONFIG_ENV_OFFSET); + +#endif /* ENV_IS_EMBEDDED */ -- 1.6.5.1
From 1ffa4c71d249e877c8b4b84e412af7efc1e8f113 Mon Sep 17 00:00:00 2001 From: Mike Frysinger <vap...@gentoo.org> Date: Sun, 18 Oct 2009 19:37:11 -0400 Subject: [PATCH 2/2] env_embedded: remove unused code from linker scripts Punt references to common/env_embedded.o when the linker script does not utilize env_offset as this means the location of the environment is not kept in a fixed location -- it'll get appended wherever the previous .text objects happen to end. This will fluctuate greatly by the compiler and related optimizations. For boards that do leverage env_offset behind a DEFINED() check, only try to include env_embedded.o when the object would actually be non-zero. i.e. when CONFIG_ENV_IS_EMBEDDED is defined Signed-off-by: Mike Frysinger <vap...@gentoo.org> --- board/BuS/EB+MCF-EV123/u-boot.lds | 3 --- board/MAI/AmigaOneG3SE/u-boot.lds | 3 --- board/RPXClassic/u-boot.lds | 4 ---- board/RPXlite/u-boot.lds | 4 ---- board/RPXlite_dw/u-boot.lds | 4 ---- board/cobra5272/u-boot.lds | 4 ++++ board/cogent/u-boot.lds | 1 - board/cray/L1/u-boot.lds | 3 --- board/cray/L1/u-boot.lds.debug | 2 -- board/eltec/mhpc/u-boot.lds | 1 - board/eric/u-boot.lds | 3 --- board/esd/tasreg/u-boot.lds | 4 ++++ board/exbitgen/u-boot.lds | 3 --- board/fads/u-boot.lds | 3 --- board/freescale/m5208evbe/u-boot.lds | 4 ++++ board/freescale/m52277evb/u-boot.spa | 4 ++++ board/freescale/m5235evb/u-boot.16 | 4 ++++ board/freescale/m5235evb/u-boot.32 | 4 ++++ board/freescale/m5249evb/u-boot.lds | 4 ++++ board/freescale/m5253demo/u-boot.lds | 4 ++++ board/freescale/m5253evbe/u-boot.lds | 4 ++++ board/freescale/m5271evb/u-boot.lds | 4 ++++ board/freescale/m5272c3/u-boot.lds | 4 ++++ board/freescale/m5275evb/u-boot.lds | 4 ++++ board/freescale/m5282evb/u-boot.lds | 4 ++++ board/freescale/m53017evb/u-boot.lds | 4 ++++ board/freescale/m5329evb/u-boot.lds | 4 ++++ board/freescale/m5373evb/u-boot.lds | 4 ++++ board/freescale/m54451evb/u-boot.spa | 4 ++++ board/freescale/m54455evb/u-boot.atm | 4 ++++ board/freescale/m547xevb/u-boot.lds | 4 ++++ board/freescale/m548xevb/u-boot.lds | 4 ++++ board/freescale/mx31ads/u-boot.lds | 4 ++++ board/gth/u-boot.lds | 1 - board/idmr/u-boot.lds | 4 ++++ board/ivm/u-boot.lds | 1 - board/keymile/km8xx/u-boot.lds | 4 ++++ board/lwmon/u-boot.lds | 1 - board/ml2/u-boot.lds.debug | 2 -- board/mpl/pip405/u-boot.lds.debug | 2 -- board/netphone/u-boot.lds | 4 ++++ board/netta/u-boot.lds | 4 ++++ board/netta2/u-boot.lds | 4 ++++ board/netvia/u-boot.lds | 4 ++++ board/nx823/u-boot.lds | 1 - board/purple/u-boot.lds | 4 ++++ board/quantum/u-boot.lds | 4 ---- board/r360mpi/u-boot.lds | 8 ++++---- board/rmu/u-boot.lds | 4 ---- board/siemens/pcu_e/u-boot.lds | 1 - board/sixnet/u-boot.lds | 1 - board/snmc/qs850/u-boot.lds | 4 ++++ board/snmc/qs860t/u-boot.lds | 4 ++++ board/spc1920/u-boot.lds | 4 ++++ board/spd8xx/u-boot.lds | 1 - board/stx/stxxtc/u-boot.lds | 4 ++++ board/tqc/tqm8xx/u-boot.lds | 4 ++++ board/trab/u-boot.lds | 4 ++++ board/uc100/u-boot.lds | 2 -- board/uc100/u-boot.lds.debug | 2 -- board/v37/u-boot.lds | 5 ----- board/w7o/u-boot.lds.debug | 2 -- board/xilinx/ml300/u-boot.lds.debug | 2 -- 63 files changed, 140 insertions(+), 70 deletions(-) diff --git a/board/BuS/EB+MCF-EV123/u-boot.lds b/board/BuS/EB+MCF-EV123/u-boot.lds index 3450793..bf51330 100644 --- a/board/BuS/EB+MCF-EV123/u-boot.lds +++ b/board/BuS/EB+MCF-EV123/u-boot.lds @@ -62,9 +62,6 @@ SECTIONS lib_generic/crc32.o (.text) lib_generic/zlib.o (.text) -/* . = env_offset; */ - common/env_embedded.o(.text) - *(.text) *(.fixup) *(.got1) diff --git a/board/MAI/AmigaOneG3SE/u-boot.lds b/board/MAI/AmigaOneG3SE/u-boot.lds index 18510a8..3ffd43f 100644 --- a/board/MAI/AmigaOneG3SE/u-boot.lds +++ b/board/MAI/AmigaOneG3SE/u-boot.lds @@ -60,9 +60,6 @@ SECTIONS .text : { cpu/74xx_7xx/start.o (.text) -/* store the environment in a seperate sector in the boot flash */ -/* . = env_offset; */ - common/env_embedded.o(.text) *(.text) *(.got1) diff --git a/board/RPXClassic/u-boot.lds b/board/RPXClassic/u-boot.lds index 47247ec..7e1ac82 100644 --- a/board/RPXClassic/u-boot.lds +++ b/board/RPXClassic/u-boot.lds @@ -61,10 +61,6 @@ SECTIONS lib_generic/vsprintf.o (.text) lib_generic/crc32.o (.text) lib_generic/zlib.o (.text) -/* XXX ? - . = env_offset; -*/ - common/env_embedded.o(.text) *(.text) *(.got1) diff --git a/board/RPXlite/u-boot.lds b/board/RPXlite/u-boot.lds index 47247ec..7e1ac82 100644 --- a/board/RPXlite/u-boot.lds +++ b/board/RPXlite/u-boot.lds @@ -61,10 +61,6 @@ SECTIONS lib_generic/vsprintf.o (.text) lib_generic/crc32.o (.text) lib_generic/zlib.o (.text) -/* XXX ? - . = env_offset; -*/ - common/env_embedded.o(.text) *(.text) *(.got1) diff --git a/board/RPXlite_dw/u-boot.lds b/board/RPXlite_dw/u-boot.lds index 7ae7be0..967e788 100644 --- a/board/RPXlite_dw/u-boot.lds +++ b/board/RPXlite_dw/u-boot.lds @@ -61,10 +61,6 @@ SECTIONS lib_generic/vsprintf.o (.text) lib_generic/crc32.o (.text) lib_generic/zlib.o (.text) -/* XXX ? - . = env_offset; -*/ - common/env_embedded.o(.text) *(.text) *(.got1) diff --git a/board/cobra5272/u-boot.lds b/board/cobra5272/u-boot.lds index 7e716bb..777499a 100644 --- a/board/cobra5272/u-boot.lds +++ b/board/cobra5272/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(m68k) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -61,8 +63,10 @@ SECTIONS common/dlmalloc.o (.text) lib_generic/zlib.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) +#endif *(.text) *(.fixup) diff --git a/board/cogent/u-boot.lds b/board/cogent/u-boot.lds index 2fecb0f..37deca6 100644 --- a/board/cogent/u-boot.lds +++ b/board/cogent/u-boot.lds @@ -53,7 +53,6 @@ SECTIONS .text : { *(.text) - common/env_embedded.o(.text) *(.got1) } _etext = .; diff --git a/board/cray/L1/u-boot.lds b/board/cray/L1/u-boot.lds index bd80df6..6517d48 100644 --- a/board/cray/L1/u-boot.lds +++ b/board/cray/L1/u-boot.lds @@ -74,9 +74,6 @@ SECTIONS lib_ppc/extable.o (.text) lib_generic/zlib.o (.text) -/*. = env_offset;*/ - common/env_embedded.o(.text) - *(.text) *(.got1) } diff --git a/board/cray/L1/u-boot.lds.debug b/board/cray/L1/u-boot.lds.debug index 970628d..b64ce7a 100644 --- a/board/cray/L1/u-boot.lds.debug +++ b/board/cray/L1/u-boot.lds.debug @@ -61,8 +61,6 @@ SECTIONS lib_generic/crc32.o (.text) lib_ppc/extable.o (.text) - common/env_embedded.o(.text) - *(.text) *(.got1) } diff --git a/board/eltec/mhpc/u-boot.lds b/board/eltec/mhpc/u-boot.lds index 5c847fb..877e82c 100644 --- a/board/eltec/mhpc/u-boot.lds +++ b/board/eltec/mhpc/u-boot.lds @@ -53,7 +53,6 @@ SECTIONS .text : { cpu/mpc8xx/start.o (.text) - common/env_embedded.o(.text) *(.text) *(.got1) diff --git a/board/eric/u-boot.lds b/board/eric/u-boot.lds index 261ccfb..b2e37d3 100644 --- a/board/eric/u-boot.lds +++ b/board/eric/u-boot.lds @@ -74,9 +74,6 @@ SECTIONS lib_ppc/extable.o (.text) lib_generic/zlib.o (.text) -/* . = env_offset;*/ - common/env_embedded.o(.text) - *(.text) *(.got1) } diff --git a/board/esd/tasreg/u-boot.lds b/board/esd/tasreg/u-boot.lds index e3230b9..8a55ce9 100644 --- a/board/esd/tasreg/u-boot.lds +++ b/board/esd/tasreg/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(m68k) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -61,8 +63,10 @@ SECTIONS common/dlmalloc.o (.text) lib_generic/zlib.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) +#endif *(.text) *(.fixup) diff --git a/board/exbitgen/u-boot.lds b/board/exbitgen/u-boot.lds index d2b28e1..3a7078f 100644 --- a/board/exbitgen/u-boot.lds +++ b/board/exbitgen/u-boot.lds @@ -73,9 +73,6 @@ SECTIONS lib_ppc/extable.o (.text) lib_generic/zlib.o (.text) -/* . = env_offset;*/ - common/env_embedded.o(.text) - *(.text) *(.got1) } diff --git a/board/fads/u-boot.lds b/board/fads/u-boot.lds index ce3e32e..f8fefcf 100644 --- a/board/fads/u-boot.lds +++ b/board/fads/u-boot.lds @@ -52,9 +52,6 @@ SECTIONS { cpu/mpc8xx/start.o (.text) - /*. = DEFINED(env_offset) ? env_offset : .;*/ - common/env_embedded.o (.ppcenv) - *(.text) *(.got1) } diff --git a/board/freescale/m5208evbe/u-boot.lds b/board/freescale/m5208evbe/u-boot.lds index bc9d5cd..bf2b0a8 100644 --- a/board/freescale/m5208evbe/u-boot.lds +++ b/board/freescale/m5208evbe/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(m68k) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -60,8 +62,10 @@ SECTIONS lib_m68k/libm68k.a (.text) common/dlmalloc.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) +#endif *(.text) *(.fixup) diff --git a/board/freescale/m52277evb/u-boot.spa b/board/freescale/m52277evb/u-boot.spa index 7ae70d4..a8ff771 100644 --- a/board/freescale/m52277evb/u-boot.spa +++ b/board/freescale/m52277evb/u-boot.spa @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(m68k) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -62,8 +64,10 @@ SECTIONS common/cmd_mem.o (.text) common/main.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) +#endif *(.text) *(.fixup) diff --git a/board/freescale/m5235evb/u-boot.16 b/board/freescale/m5235evb/u-boot.16 index c134884..34aaaf1 100644 --- a/board/freescale/m5235evb/u-boot.16 +++ b/board/freescale/m5235evb/u-boot.16 @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(m68k) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -62,8 +64,10 @@ SECTIONS common/dlmalloc.o (.text) lib_generic/zlib.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) +#endif *(.text) *(.fixup) diff --git a/board/freescale/m5235evb/u-boot.32 b/board/freescale/m5235evb/u-boot.32 index 53c337d..191b1ed 100644 --- a/board/freescale/m5235evb/u-boot.32 +++ b/board/freescale/m5235evb/u-boot.32 @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(m68k) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -70,8 +72,10 @@ SECTIONS common/main.o (.text) lib_generic/libgeneric.a (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) +#endif *(.text) *(.fixup) diff --git a/board/freescale/m5249evb/u-boot.lds b/board/freescale/m5249evb/u-boot.lds index e3230b9..8a55ce9 100644 --- a/board/freescale/m5249evb/u-boot.lds +++ b/board/freescale/m5249evb/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(m68k) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -61,8 +63,10 @@ SECTIONS common/dlmalloc.o (.text) lib_generic/zlib.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) +#endif *(.text) *(.fixup) diff --git a/board/freescale/m5253demo/u-boot.lds b/board/freescale/m5253demo/u-boot.lds index 6cb5ee0..4fe1e84 100644 --- a/board/freescale/m5253demo/u-boot.lds +++ b/board/freescale/m5253demo/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(m68k) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -61,8 +63,10 @@ SECTIONS common/dlmalloc.o (.text) lib_generic/zlib.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) +#endif *(.text) diff --git a/board/freescale/m5253evbe/u-boot.lds b/board/freescale/m5253evbe/u-boot.lds index 132fccf..fe7c02c 100644 --- a/board/freescale/m5253evbe/u-boot.lds +++ b/board/freescale/m5253evbe/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(m68k) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -61,8 +63,10 @@ SECTIONS common/dlmalloc.o (.text) lib_generic/zlib.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) +#endif *(.text) *(.fixup) diff --git a/board/freescale/m5271evb/u-boot.lds b/board/freescale/m5271evb/u-boot.lds index 00c1f2a..d2fa064 100644 --- a/board/freescale/m5271evb/u-boot.lds +++ b/board/freescale/m5271evb/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(m68k) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -62,8 +64,10 @@ SECTIONS common/dlmalloc.o (.text) lib_generic/zlib.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.ppcenv) +#endif *(.text) *(.fixup) diff --git a/board/freescale/m5272c3/u-boot.lds b/board/freescale/m5272c3/u-boot.lds index 9d20b22..371793f 100644 --- a/board/freescale/m5272c3/u-boot.lds +++ b/board/freescale/m5272c3/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(m68k) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -61,8 +63,10 @@ SECTIONS common/dlmalloc.o (.text) lib_generic/zlib.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) +#endif *(.text) *(.fixup) diff --git a/board/freescale/m5275evb/u-boot.lds b/board/freescale/m5275evb/u-boot.lds index daf8724..3f427d7 100644 --- a/board/freescale/m5275evb/u-boot.lds +++ b/board/freescale/m5275evb/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(m68k) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -60,8 +62,10 @@ SECTIONS lib_generic/string.o (.text) lib_generic/zlib.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o(.text) +#endif *(.text) *(.fixup) diff --git a/board/freescale/m5282evb/u-boot.lds b/board/freescale/m5282evb/u-boot.lds index f46e025..29e6f96 100644 --- a/board/freescale/m5282evb/u-boot.lds +++ b/board/freescale/m5282evb/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(m68k) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -61,8 +63,10 @@ SECTIONS lib_generic/vsprintf.o (.text) lib_generic/crc32.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o(.text) +#endif *(.text) *(.fixup) diff --git a/board/freescale/m53017evb/u-boot.lds b/board/freescale/m53017evb/u-boot.lds index c79d06c..f877ec5 100644 --- a/board/freescale/m53017evb/u-boot.lds +++ b/board/freescale/m53017evb/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(m68k) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -61,8 +63,10 @@ SECTIONS common/dlmalloc.o (.text) lib_generic/zlib.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) +#endif *(.text) *(.fixup) diff --git a/board/freescale/m5329evb/u-boot.lds b/board/freescale/m5329evb/u-boot.lds index af31098..2548d59 100644 --- a/board/freescale/m5329evb/u-boot.lds +++ b/board/freescale/m5329evb/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(m68k) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -61,8 +63,10 @@ SECTIONS common/dlmalloc.o (.text) lib_generic/zlib.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) +#endif *(.text) *(.fixup) diff --git a/board/freescale/m5373evb/u-boot.lds b/board/freescale/m5373evb/u-boot.lds index dff74b6..45181c7 100644 --- a/board/freescale/m5373evb/u-boot.lds +++ b/board/freescale/m5373evb/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(m68k) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -61,8 +63,10 @@ SECTIONS common/dlmalloc.o (.text) lib_generic/zlib.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) +#endif *(.text) *(.fixup) diff --git a/board/freescale/m54451evb/u-boot.spa b/board/freescale/m54451evb/u-boot.spa index d8caefa..8060898 100644 --- a/board/freescale/m54451evb/u-boot.spa +++ b/board/freescale/m54451evb/u-boot.spa @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(m68k) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -64,8 +66,10 @@ SECTIONS common/image.o (.text) lib_generic/libgeneric.a (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) +#endif *(.text) *(.fixup) diff --git a/board/freescale/m54455evb/u-boot.atm b/board/freescale/m54455evb/u-boot.atm index 08e184c..af60784 100644 --- a/board/freescale/m54455evb/u-boot.atm +++ b/board/freescale/m54455evb/u-boot.atm @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(m68k) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -61,8 +63,10 @@ SECTIONS common/dlmalloc.o (.text) lib_generic/zlib.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) +#endif *(.text) *(.fixup) diff --git a/board/freescale/m547xevb/u-boot.lds b/board/freescale/m547xevb/u-boot.lds index a3014bd..64d38e5 100644 --- a/board/freescale/m547xevb/u-boot.lds +++ b/board/freescale/m547xevb/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(m68k) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -60,8 +62,10 @@ SECTIONS lib_m68k/interrupts.o (.text) common/dlmalloc.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) +#endif *(.text) *(.fixup) diff --git a/board/freescale/m548xevb/u-boot.lds b/board/freescale/m548xevb/u-boot.lds index a3014bd..64d38e5 100644 --- a/board/freescale/m548xevb/u-boot.lds +++ b/board/freescale/m548xevb/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(m68k) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -60,8 +62,10 @@ SECTIONS lib_m68k/interrupts.o (.text) common/dlmalloc.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) +#endif *(.text) *(.fixup) diff --git a/board/freescale/mx31ads/u-boot.lds b/board/freescale/mx31ads/u-boot.lds index 3182aa6..edbbcf6 100644 --- a/board/freescale/mx31ads/u-boot.lds +++ b/board/freescale/mx31ads/u-boot.lds @@ -24,6 +24,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) @@ -43,8 +45,10 @@ SECTIONS net/libnet.a (.text) drivers/mtd/libmtd.a (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o(.text) +#endif *(.text) } diff --git a/board/gth/u-boot.lds b/board/gth/u-boot.lds index f6175d9..543ea3b 100644 --- a/board/gth/u-boot.lds +++ b/board/gth/u-boot.lds @@ -54,7 +54,6 @@ SECTIONS { cpu/mpc8xx/start.o(.text) *(.text) - common/env_embedded.o(.text) *(.got1) } _etext = .; diff --git a/board/idmr/u-boot.lds b/board/idmr/u-boot.lds index 00c1f2a..d2fa064 100644 --- a/board/idmr/u-boot.lds +++ b/board/idmr/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(m68k) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -62,8 +64,10 @@ SECTIONS common/dlmalloc.o (.text) lib_generic/zlib.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.ppcenv) +#endif *(.text) *(.fixup) diff --git a/board/ivm/u-boot.lds b/board/ivm/u-boot.lds index 8d7ff70..1c74f32 100644 --- a/board/ivm/u-boot.lds +++ b/board/ivm/u-boot.lds @@ -53,7 +53,6 @@ SECTIONS .text : { cpu/mpc8xx/start.o (.text) - common/env_embedded.o(.text) *(.text) *(.got1) } diff --git a/board/keymile/km8xx/u-boot.lds b/board/keymile/km8xx/u-boot.lds index a8057f2..8a3cfe7 100644 --- a/board/keymile/km8xx/u-boot.lds +++ b/board/keymile/km8xx/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(powerpc) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -65,8 +67,10 @@ SECTIONS lib_ppc/cache.o (.text) lib_ppc/time.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.ppcenv) +#endif *(.text) *(.got1) diff --git a/board/lwmon/u-boot.lds b/board/lwmon/u-boot.lds index cc8ad7d..4dd8d9b 100644 --- a/board/lwmon/u-boot.lds +++ b/board/lwmon/u-boot.lds @@ -53,7 +53,6 @@ SECTIONS .text : { cpu/mpc8xx/start.o (.text) - common/env_embedded.o(.text) *(.text) *(.got1) } diff --git a/board/ml2/u-boot.lds.debug b/board/ml2/u-boot.lds.debug index 970628d..b64ce7a 100644 --- a/board/ml2/u-boot.lds.debug +++ b/board/ml2/u-boot.lds.debug @@ -61,8 +61,6 @@ SECTIONS lib_generic/crc32.o (.text) lib_ppc/extable.o (.text) - common/env_embedded.o(.text) - *(.text) *(.got1) } diff --git a/board/mpl/pip405/u-boot.lds.debug b/board/mpl/pip405/u-boot.lds.debug index 970628d..b64ce7a 100644 --- a/board/mpl/pip405/u-boot.lds.debug +++ b/board/mpl/pip405/u-boot.lds.debug @@ -61,8 +61,6 @@ SECTIONS lib_generic/crc32.o (.text) lib_ppc/extable.o (.text) - common/env_embedded.o(.text) - *(.text) *(.got1) } diff --git a/board/netphone/u-boot.lds b/board/netphone/u-boot.lds index d64274b..d018f0c 100644 --- a/board/netphone/u-boot.lds +++ b/board/netphone/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(powerpc) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -62,8 +64,10 @@ SECTIONS lib_ppc/cache.o (.text) lib_ppc/time.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) +#endif *(.text) *(.got1) diff --git a/board/netta/u-boot.lds b/board/netta/u-boot.lds index 860c887..09843f0 100644 --- a/board/netta/u-boot.lds +++ b/board/netta/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(powerpc) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -62,8 +64,10 @@ SECTIONS lib_ppc/cache.o (.text) lib_ppc/time.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) +#endif *(.text) *(.got1) diff --git a/board/netta2/u-boot.lds b/board/netta2/u-boot.lds index 860c887..09843f0 100644 --- a/board/netta2/u-boot.lds +++ b/board/netta2/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(powerpc) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -62,8 +64,10 @@ SECTIONS lib_ppc/cache.o (.text) lib_ppc/time.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) +#endif *(.text) *(.got1) diff --git a/board/netvia/u-boot.lds b/board/netvia/u-boot.lds index a7d290a..7b54304 100644 --- a/board/netvia/u-boot.lds +++ b/board/netvia/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(powerpc) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -62,8 +64,10 @@ SECTIONS lib_ppc/cache.o (.text) lib_ppc/time.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) +#endif *(.text) *(.got1) diff --git a/board/nx823/u-boot.lds b/board/nx823/u-boot.lds index 5c847fb..877e82c 100644 --- a/board/nx823/u-boot.lds +++ b/board/nx823/u-boot.lds @@ -53,7 +53,6 @@ SECTIONS .text : { cpu/mpc8xx/start.o (.text) - common/env_embedded.o(.text) *(.text) *(.got1) diff --git a/board/purple/u-boot.lds b/board/purple/u-boot.lds index 04a641a..0414a1b 100644 --- a/board/purple/u-boot.lds +++ b/board/purple/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + /* OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips") */ @@ -41,8 +43,10 @@ SECTIONS common/dlmalloc.o (.text) common/cmd_boot.o (.text) lib_generic/zlib.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.ppcenv) +#endif *(.text) } diff --git a/board/quantum/u-boot.lds b/board/quantum/u-boot.lds index 47247ec..7e1ac82 100644 --- a/board/quantum/u-boot.lds +++ b/board/quantum/u-boot.lds @@ -61,10 +61,6 @@ SECTIONS lib_generic/vsprintf.o (.text) lib_generic/crc32.o (.text) lib_generic/zlib.o (.text) -/* XXX ? - . = env_offset; -*/ - common/env_embedded.o(.text) *(.text) *(.got1) diff --git a/board/r360mpi/u-boot.lds b/board/r360mpi/u-boot.lds index 9089f7d..88b5ed3 100644 --- a/board/r360mpi/u-boot.lds +++ b/board/r360mpi/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(powerpc) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -59,10 +61,6 @@ SECTIONS cpu/mpc8xx/cpu_init.o (.text) cpu/mpc8xx/interrupts.o (.text) cpu/mpc8xx/traps.o (.text) -/*** - . = env_offset; - common/env_embedded.o (.text) -***/ *(.text) *(.got1) } @@ -133,9 +131,11 @@ SECTIONS } _end = . ; PROVIDE (end = .); +#ifdef CONFIG_ENV_IS_EMBEDDED . = ALIGN(128 * 1024); .ppcenv : { common/env_embedded.o (.ppcenv) } +#endif } diff --git a/board/rmu/u-boot.lds b/board/rmu/u-boot.lds index 47247ec..7e1ac82 100644 --- a/board/rmu/u-boot.lds +++ b/board/rmu/u-boot.lds @@ -61,10 +61,6 @@ SECTIONS lib_generic/vsprintf.o (.text) lib_generic/crc32.o (.text) lib_generic/zlib.o (.text) -/* XXX ? - . = env_offset; -*/ - common/env_embedded.o(.text) *(.text) *(.got1) diff --git a/board/siemens/pcu_e/u-boot.lds b/board/siemens/pcu_e/u-boot.lds index cc8ad7d..4dd8d9b 100644 --- a/board/siemens/pcu_e/u-boot.lds +++ b/board/siemens/pcu_e/u-boot.lds @@ -53,7 +53,6 @@ SECTIONS .text : { cpu/mpc8xx/start.o (.text) - common/env_embedded.o(.text) *(.text) *(.got1) } diff --git a/board/sixnet/u-boot.lds b/board/sixnet/u-boot.lds index dd632a4..6b67d4f 100644 --- a/board/sixnet/u-boot.lds +++ b/board/sixnet/u-boot.lds @@ -53,7 +53,6 @@ SECTIONS .text : { cpu/mpc8xx/start.o (.text) - common/env_embedded.o(.text) *(.text) *(.got1) } diff --git a/board/snmc/qs850/u-boot.lds b/board/snmc/qs850/u-boot.lds index 9ef2c20..ad4dd4a 100644 --- a/board/snmc/qs850/u-boot.lds +++ b/board/snmc/qs850/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(powerpc) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -65,8 +67,10 @@ SECTIONS lib_ppc/cache.o (.text) lib_ppc/time.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.ppcenv) +#endif *(.text) *(.got1) diff --git a/board/snmc/qs860t/u-boot.lds b/board/snmc/qs860t/u-boot.lds index 9ef2c20..ad4dd4a 100644 --- a/board/snmc/qs860t/u-boot.lds +++ b/board/snmc/qs860t/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(powerpc) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -65,8 +67,10 @@ SECTIONS lib_ppc/cache.o (.text) lib_ppc/time.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.ppcenv) +#endif *(.text) *(.got1) diff --git a/board/spc1920/u-boot.lds b/board/spc1920/u-boot.lds index d6711b5..046817f 100644 --- a/board/spc1920/u-boot.lds +++ b/board/spc1920/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(powerpc) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -65,8 +67,10 @@ SECTIONS lib_ppc/cache.o (.text) lib_ppc/time.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.ppcenv) +#endif *(.text) *(.got1) diff --git a/board/spd8xx/u-boot.lds b/board/spd8xx/u-boot.lds index 7b9455b..bc8a128 100644 --- a/board/spd8xx/u-boot.lds +++ b/board/spd8xx/u-boot.lds @@ -53,7 +53,6 @@ SECTIONS .text : { cpu/mpc8xx/start.o (.text) - common/env_embedded.o(.text) *(.text) *(.got1) } diff --git a/board/stx/stxxtc/u-boot.lds b/board/stx/stxxtc/u-boot.lds index 860c887..09843f0 100644 --- a/board/stx/stxxtc/u-boot.lds +++ b/board/stx/stxxtc/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(powerpc) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -62,8 +64,10 @@ SECTIONS lib_ppc/cache.o (.text) lib_ppc/time.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.text) +#endif *(.text) *(.got1) diff --git a/board/tqc/tqm8xx/u-boot.lds b/board/tqc/tqm8xx/u-boot.lds index 2df8d84..8207b2c 100644 --- a/board/tqc/tqm8xx/u-boot.lds +++ b/board/tqc/tqm8xx/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(powerpc) /* Do we need any of these for elf? __DYNAMIC = 0; */ @@ -64,8 +66,10 @@ SECTIONS lib_generic/zlib.o (.text) lib_ppc/cache.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.ppcenv) +#endif *(.text) *(.got1) diff --git a/board/trab/u-boot.lds b/board/trab/u-boot.lds index c3d5c49..c72a6d7 100644 --- a/board/trab/u-boot.lds +++ b/board/trab/u-boot.lds @@ -21,6 +21,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") /*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/ OUTPUT_ARCH(arm) @@ -37,8 +39,10 @@ SECTIONS lib_generic/crc32.o (.text) lib_generic/string.o (.text) +#ifdef CONFIG_ENV_IS_EMBEDDED . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.ppcenv) +#endif *(.text) } diff --git a/board/uc100/u-boot.lds b/board/uc100/u-boot.lds index e3ea52a..7e9cb57 100644 --- a/board/uc100/u-boot.lds +++ b/board/uc100/u-boot.lds @@ -65,8 +65,6 @@ SECTIONS lib_ppc/cache.o (.text) lib_ppc/time.o (.text) - common/env_embedded.o (.text) - *(.text) *(.got1) } diff --git a/board/uc100/u-boot.lds.debug b/board/uc100/u-boot.lds.debug index edaa402..f98ebb0 100644 --- a/board/uc100/u-boot.lds.debug +++ b/board/uc100/u-boot.lds.debug @@ -60,8 +60,6 @@ SECTIONS lib_generic/vsprintf.o (.text) lib_generic/crc32.o (.text) - common/env_embedded.o(.text) - *(.text) *(.got1) } diff --git a/board/v37/u-boot.lds b/board/v37/u-boot.lds index 6f2ea9a..97a5784 100644 --- a/board/v37/u-boot.lds +++ b/board/v37/u-boot.lds @@ -65,11 +65,6 @@ SECTIONS lib_ppc/cache.o (.text) lib_ppc/time.o (.text) -/* - . = env_offset; -*/ - common/env_embedded.o (.ppcenv) - *(.text) *(.got1) } diff --git a/board/w7o/u-boot.lds.debug b/board/w7o/u-boot.lds.debug index 8bb4929..d3a4d0a 100644 --- a/board/w7o/u-boot.lds.debug +++ b/board/w7o/u-boot.lds.debug @@ -61,8 +61,6 @@ SECTIONS lib_generic/crc32.o (.text) lib_ppc/extable.o (.text) - common/env_embedded.o(.text) - *(.text) *(.got1) } diff --git a/board/xilinx/ml300/u-boot.lds.debug b/board/xilinx/ml300/u-boot.lds.debug index 970628d..b64ce7a 100644 --- a/board/xilinx/ml300/u-boot.lds.debug +++ b/board/xilinx/ml300/u-boot.lds.debug @@ -61,8 +61,6 @@ SECTIONS lib_generic/crc32.o (.text) lib_ppc/extable.o (.text) - common/env_embedded.o(.text) - *(.text) *(.got1) } -- 1.6.5.1
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot