From: Mike Frysinger Date: Mon, 19 Oct 2009 15:36:57 -0400 Subject: [U-Boot] [PATCH 1/2 v4] env: only build env_embedded and envcrc when needed In-Reply-To: <20091019093136.5DAE5182D944E@nyx.denx.de> References: <1252498455-28276-1-git-send-email-vapier@gentoo.org> <200910182055.01744.vapier@gentoo.org> <20091019093136.5DAE5182D944E@nyx.denx.de> Message-ID: <200910191537.04195.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Monday 19 October 2009 05:31:36 Wolfgang Denk wrote: > Mike Frysinger wrote: > > 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 > > + > > 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. if none of them have defined CONFIG_ENV_IS_EMBEDDED, then this code never would have expanded to anything. if you look at the actual env_embedded.c code, it is completely wrapped in #ifdef CONFIG_ENV_IS_EMBEDDED ... #endif thus env_offset would not be defined nor would env_embedded.o contain anything thus nothing would be injected thus nothing should be changed thus my proposed change should be fine -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/20091019/be076157/attachment.pgp