-----Original Message----- From: Wood Scott-B07421 Sent: Tuesday, May 21, 2013 2:56 AM To: Zhang Ying-B40530 Cc: Wood Scott-B07421; u-boot@lists.denx.de; aflem...@gmail.com; Xie Xiaobo-R63061; Tom Rini Subject: Re: [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL On 05/17/2013 07:58:15 PM, Zhang Ying-B40530 wrote: > > ________________________________________ > From: Wood Scott-B07421 > Sent: Friday, May 17, 2013 10:41 PM > To: Zhang Ying-B40530 > Cc: u-boot@lists.denx.de<mailto:u-boot@lists.denx.de>; > aflem...@gmail.com<mailto:aflem...@gmail.com>; Xie Xiaobo-R63061; > Zhang Ying-B40530 > Subject: Re: [PATCH] common/Makefile: Add new symbol > CONFIG_SPL_ENV_SUPPORT for environment in SPL > > On 05/16/2013 10:05:17 PM, > ying.zh...@freescale.com<mailto:ying.zh...@freescale.com> wrote: > > diff --git a/common/Makefile b/common/Makefile > > index f50bf2e..26b8495 100644 > > --- a/common/Makefile > > +++ b/common/Makefile > > @@ -44,13 +44,11 @@ COBJS-$(CONFIG_SYS_GENERIC_BOARD) += board_r.o > > COBJS-y += cmd_boot.o > > COBJS-$(CONFIG_CMD_BOOTM) += cmd_bootm.o > > COBJS-y += cmd_help.o > > -COBJS-y += cmd_nvedit.o > > COBJS-y += cmd_version.o > > > > # environment > > COBJS-y += env_attr.o > > COBJS-y += env_callback.o > > -COBJS-y += env_common.o > > COBJS-y += env_flags.o > > COBJS-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o > > COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o > > @@ -215,18 +213,27 @@ COBJS-$(CONFIG_CMD_GPT) += cmd_gpt.o > > endif > > > > ifdef CONFIG_SPL_BUILD > > -COBJS-y += cmd_nvedit.o > > -COBJS-y += env_common.o > > COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o > > COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o > > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += cmd_nvedit.o > > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_attr.o > > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_callback.o > > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_common.o > > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_flags.o > > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_nowhere.o > > COBJS-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o > > +# environment > > +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o > > +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o > > +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o > > +ifneq ($(CONFIG_SPL_NET_SUPPORT),y) > > +COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o > > +COBJS-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o > > +COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o > > +COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o > > +COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o > > +else > > +COBJS-y += env_nowhere.o > > +endif > > Why do you include these files only if we *don't* have net support? > [Zhang Ying] > This because CONFIG_SPL_NET_SUPPORT is conflict with SPL ENV. This > is comments from Tom . I'm not that familiar with CONFIG_SPL_NET_SUPPORT, but it looks like it just enables the net/ directory in an SPL. How does that conflict with env stuff? Perhaps there's some other symbol that better describes the actual conflict. [Zhang Ying] This is Tom's words: 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. 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. My understanding is that there are two kinds of methods: 1. In Tom's opinion: add CONFIG_ENV_IS_IN_... inside the SPL area and add ifneq ($(CONFIG_SPL_NET_SUPPORT),y)...endif around it. 2. Add new SPL env symbol(for example: CONFIG_SPL_ENV_IS_IN_MMC) for the SPL. This need to add excessive symbol for SPL env.
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot