[U-Boot] [PATCH v3] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL

Tom Rini trini at ti.com
Thu May 16 15:14:28 CEST 2013


On Thu, May 16, 2013 at 07:17:50AM +0000, Zhang Ying-B40530 wrote:

[snip]
> Oh, there are some confusion. I thought CONFIG_ENV_IS_xxx defined is
> consistent for both SPL and non-SPL.
> If you want to set CONFIG_ENV_IS_NOWHERE for SPL and CONFIG_ENV_IS_xxx
> somewhere-else for non-SPL, so all of lines CONFIG_ENV_IS_... cann't 
> be moved to the public area, because CONFIG_ENV_IS_NOWHERE has always
> been not effective and CONFIG_ENV_IS_... has been effective in 
> common/Makefile.
> 
> Unless we define some new symbols that for SPL?

OK, you're right, this is a bit more complex than it looks.  Today,
a3m071 relies on SPL always building cmd_nvedit.o and env_common.o and
duplicated CONFIG_ENV_IS_IN_FLASH in the SPL section.
CONFIG_SPL_NET_SUPPORT relies on the same always-built ins and adds
env_nowhere.o which works because the regular CONFIG_ENV_IS_IN_...
section is in the non-SPL-only area.

Part of the answer / problem is, wow, OK, we need to re-sort common/ a
bit:
$ ls common/*.c | wc -l
160
$ ls common/cmd*.c | wc -l
106
$ ls common/env*.c | wc -l
17

Now, your end-goal is to have env from, I assume, NAND, also exist on
SPL?  I guess for now, lets go ahead and duplicate a few lines of
ENV_IS.. inside the SPL area and when you add NAND env, add ifneq
($(CONFIG_SPL_NET_SUPPORT),y)...endif around it and add to the README
that CONFIG_SPL_NET_SUPPORT conflicts with SPL env from nand.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130516/d2c1a5e8/attachment.pgp>


More information about the U-Boot mailing list