[U-Boot] what's the proper use (if any) of [CONFIG_]ENV_IS_EMBEDDED?

Robert P. J. Day rpjday at crashcourse.ca
Wed Aug 31 17:41:52 CEST 2016


  still crawling through environment manipulation code, and noticed:

  ...
  # ifdef CONFIG_ENV_IS_EMBEDDED
  #  error "do not define CONFIG_ENV_IS_EMBEDDED in your board config"
  #  error "it is calculated automatically for you"
  # endif
  ...

but it seems there are a number of boards that are doing just that (as
well as defining ENV_IS_EMBEDDED as well:

  $ grep -r "define.*ENV_IS_EMBEDDED$" include/configs
  include/configs/ibf-dsp561.h:#define ENV_IS_EMBEDDED
  include/configs/bf533-stamp.h:#define ENV_IS_EMBEDDED
  include/configs/cm-bf537u.h:#define ENV_IS_EMBEDDED
  include/configs/bct-brettl2.h:#define ENV_IS_EMBEDDED
  include/configs/sh7753evb.h:#define CONFIG_ENV_IS_EMBEDDED
  include/configs/bf537-pnav.h:#define ENV_IS_EMBEDDED
  include/configs/sh7757lcr.h:#define CONFIG_ENV_IS_EMBEDDED
  include/configs/bf537-stamp.h:#define ENV_IS_EMBEDDED
  include/configs/sh7752evb.h:#define CONFIG_ENV_IS_EMBEDDED
  include/configs/cm-bf537e.h:#define ENV_IS_EMBEDDED
  include/configs/tcm-bf537.h:#define ENV_IS_EMBEDDED
  include/configs/bf538f-ezkit.h:#define ENV_IS_EMBEDDED
  include/configs/dnp5370.h:#define ENV_IS_EMBEDDED
  $

and testing ENV_IS_EMBEDDED:

  $ grep -r "ifdef.*ENV_IS_EMBEDDED$" *
  common/env_onenand.c:#ifdef ENV_IS_EMBEDDED
  common/env_mmc.c:#ifdef ENV_IS_EMBEDDED
  common/env_flash.c:#ifdef ENV_IS_EMBEDDED
  common/env_remote.c:#ifdef ENV_IS_EMBEDDED
  include/environment.h:# ifdef CONFIG_ENV_IS_EMBEDDED
  include/environment.h:#ifdef CONFIG_ENV_IS_EMBEDDED
  include/environment.h:# ifdef ENV_IS_EMBEDDED
  include/environment.h:#ifdef ENV_IS_EMBEDDED
  include/configs/ibf-dsp561.h:#ifdef ENV_IS_EMBEDDED
  include/configs/bf533-stamp.h:#ifdef ENV_IS_EMBEDDED
  include/configs/cm-bf537u.h:#ifdef ENV_IS_EMBEDDED
  include/configs/bct-brettl2.h:#ifdef ENV_IS_EMBEDDED
  include/configs/bf537-pnav.h:#ifdef ENV_IS_EMBEDDED
  include/configs/bf537-stamp.h:#ifdef ENV_IS_EMBEDDED
  include/configs/cm-bf537e.h:#ifdef ENV_IS_EMBEDDED
  include/configs/tcm-bf537.h:#ifdef ENV_IS_EMBEDDED
  include/configs/bf538f-ezkit.h:#ifdef ENV_IS_EMBEDDED
  $

what is the proper usage of this construct?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



More information about the U-Boot mailing list