[U-Boot] [PATCH 1/2 v4] env: only build env_embedded and envcrc when needed
Wolfgang Denk
wd at denx.de
Mon Oct 19 11:31:36 CEST 2009
Dear Mike Frysinger,
In message <200910182055.01744.vapier at gentoo.org> you wrote:
>
> > 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.
I would tend to apply your second patch - but looking at it I will
not do it, as it seems to break boards just harder, i. e. they may
build, but will fail to work.
For example:
...
> 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
All TQM8xx boards use a hand-optimized linker script that places the
envrionment (both the primary and the redundant copies) into the
small boot sectors of the bottom boot block type NOR flash used on
these boards (and the same is true for other boards as well; I know
this for sure at least for IVM*, km8xx, purple, spc1920, stxxtc,
trab).
However, none of these #defines CONFIG_ENV_IS_EMBEDDED in their board
config files.
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
Intel's new motto: United we stand. Divided we fall!
More information about the U-Boot
mailing list