All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [RFC PATCH] env: add default env size for CONFIG_ENV_IS_NOWHERE
@ 2013-08-11 14:15 Bo Shen
  2013-08-11 14:50 ` Wolfgang Denk
  2013-08-12 13:39 ` Tom Rini
  0 siblings, 2 replies; 5+ messages in thread
From: Bo Shen @ 2013-08-11 14:15 UTC (permalink / raw)
  To: u-boot

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 <voice.shen@gmail.com>

---
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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-08-12 13:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-11 14:15 [U-Boot] [RFC PATCH] env: add default env size for CONFIG_ENV_IS_NOWHERE Bo Shen
2013-08-11 14:50 ` Wolfgang Denk
2013-08-12 13:07   ` Bo Shen
2013-08-12 13:29     ` Wolfgang Denk
2013-08-12 13:39 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.