All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bo Shen <voice.shen@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH] env: add default env size for CONFIG_ENV_IS_NOWHERE
Date: Sun, 11 Aug 2013 14:15:03 +0000	[thread overview]
Message-ID: <1376230503-25331-1-git-send-email-voice.shen@gmail.com> (raw)

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

             reply	other threads:[~2013-08-11 14:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-11 14:15 Bo Shen [this message]
2013-08-11 14:50 ` [U-Boot] [RFC PATCH] env: add default env size for CONFIG_ENV_IS_NOWHERE Wolfgang Denk
2013-08-12 13:07   ` Bo Shen
2013-08-12 13:29     ` Wolfgang Denk
2013-08-12 13:39 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1376230503-25331-1-git-send-email-voice.shen@gmail.com \
    --to=voice.shen@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.