[U-Boot] ENV_IS_EMBEDDED vs CONFIG_ENV_IS_EMBEDDED

Wolfgang Denk wd at denx.de
Mon Jun 15 11:02:42 CEST 2009


Dear Mike Frysinger,

In message <200906142240.59607.vapier at gentoo.org> you wrote:
>
> is there a reason to keep ENV_IS_EMBEDDED around ?  i see a few places that 
> use CONFIG_ENV_IS_EMBEDDED, but it seems to be largely useless at the moment 
> as the define doesn't really do anything without ENV_IS_EMBEDDED.

I'm not sure where CONFIG_ENV_IS_EMBEDDED (resp. CFG_ENV_IS_EMBEDDED)
coming from. I guess from some comments ("short-cut compile-time
test") that it was intended to enable using something like

	COBJS-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o

Unfortunately it was not even documented in the README so we can only
guess what it is supposed to mean  :-(  From  original  the  software
design  point  of  view, CONFIG_ENV_IS_EMBEDDED is redundant at best,
and usally just bogus, as the  actual  location  of  the  environment
sectors   (as  determined  by  CONFIG_ENV_OFFSET  or  CONFIG_ENV_ADDR
combined with CONFIG_ENV_SECT_SIZE, plus eventually the definition of
the corresponding "*_REDUND" settings) automatically determine if the
environment is embedded or  not  -  there  is  no  need  for  such  a
variable.

> in other words, i'd like to just do a sed on the tree to convert all 
> ENV_IS_EMBEDDED instances to CONFIG_ENV_IS_EMBEDDED.

That whould IMHO be wrong. We should rather check if there was a way
to get rid of CONFIG_ENV_IS_EMBEDDED (which is probably hard because
of it's use in the Makefile).

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
Children are natural mimics who act like their parents despite  every
effort to teach them good manners.


More information about the U-Boot mailing list