From: Tom Rini Date: Thu, 16 May 2013 09:14:28 -0400 Subject: [U-Boot] [PATCH v3] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL In-Reply-To: References: <1368584128-2274-1-git-send-email-ying.zhang@freescale.com> <20130515140729.GD29196@bill-the-cat> Message-ID: <20130516131428.GE32163@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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: