From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bo Shen Date: Sun, 11 Aug 2013 14:15:03 +0000 Subject: [U-Boot] [RFC PATCH] env: add default env size for CONFIG_ENV_IS_NOWHERE Message-ID: <1376230503-25331-1-git-send-email-voice.shen@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 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 Signed-off-by: Bo Shen --- The default value for CONFIG_ENV_SIZE (1024 Bytes) maybe not the better choice, consider runtime decided, however failed. This patch is only compile testing with CONFIG_ENV_IS_NOWHERE enable --- include/environment.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/environment.h b/include/environment.h index 46a3554..52a7769 100644 --- a/include/environment.h +++ b/include/environment.h @@ -146,6 +146,12 @@ extern unsigned long nand_env_oob_offset; extern char *env_name_spec; #endif +#ifdef CONFIG_ENV_IS_NOWHERE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE 0x400 +# endif +#endif + #define ENV_SIZE (CONFIG_ENV_SIZE - ENV_HEADER_SIZE) typedef struct environment_s { -- 1.7.10.4