From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bo Shen Date: Mon, 12 Aug 2013 21:07:16 +0800 Subject: [U-Boot] [RFC PATCH] env: add default env size for CONFIG_ENV_IS_NOWHERE In-Reply-To: <20130811145016.677F7380E10@gemini.denx.de> References: <1376230503-25331-1-git-send-email-voice.shen@gmail.com> <20130811145016.677F7380E10@gemini.denx.de> Message-ID: <5208DE04.1000405@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Wolfgang Denk, On 8/11/2013 10:50 PM, Wolfgang Denk wrote: > Dear Bo Shen, > > In message <1376230503-25331-1-git-send-email-voice.shen@gmail.com> you wrote: >> when CONFIG_ENV_IS_NOWHERE is enabled, it is still need to define >> CONFIG_ENV_SIZE. So, add a default size (1024 Bytes) to avoid >> compile error if not define CONFIG_ENV_SIZE > > I don;t understand the rationale for this patch. In which way is the > environment seize for the CONFIG_ENV_IS_NOWHERE case different from > any other cases? For these, we do not define a default either, so why > should we handle this case differently? In my opinion, there is a little different. The CONFIG_ENV_IS_NOWHERE case only store environment in volatile memory (e.g. DDR SDRAM) while not store in non-volatile device. At first glance of CONFIG_ENV_IS_NOWHERE, I think no need to define the CONFIG_ENV_SIZE, actually, it needs to define the CONFIG_ENV_SIZE. So, I think add a default value will be better (Maybe another choice to add a description in README file to specify how to use CONFIG_ENV_IS_NOWHERE). > In any cse, the needed environment seize if a pretty board specific > thing, and I think it makes sense to let the user define it. Yes, the environment size is a pretty board specific thing. So, in this patch, there is an option for user to define it. > Best regards, > > Wolfgang Denk > Best Regards, Bo Shen