summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2013-04-08 10:32:51 +0000
committerTom Rini <trini@ti.com>2013-04-11 15:52:55 -0400
commit2b74433f365fa677a60431a80e524b5d8d04e995 (patch)
tree4f33620eb0534e8861010fb6d8945d3da3b455a7 /include
parenta7eb1d66c704c884584bf00548cfdf68abfe68bb (diff)
env: Add support for UBI environment
UBI is a better place for the environment on NAND devices because it handles wear-leveling and bad blocks. Gluebi is needed in Linux to access the env as an MTD partition. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'include')
-rw-r--r--include/environment.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/environment.h b/include/environment.h
index e64b43d2d9..ece073fcc3 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -96,6 +96,21 @@ extern unsigned long nand_env_oob_offset;
# endif
#endif /* CONFIG_ENV_IS_IN_NAND */
+#if defined(CONFIG_ENV_IS_IN_UBI)
+# ifndef CONFIG_ENV_UBI_PART
+# error "Need to define CONFIG_ENV_UBI_PART when using CONFIG_ENV_IS_IN_UBI"
+# endif
+# ifndef CONFIG_ENV_UBI_VOLUME
+# error "Need to define CONFIG_ENV_UBI_VOLUME when using CONFIG_ENV_IS_IN_UBI"
+# endif
+# ifndef CONFIG_ENV_SIZE
+# error "Need to define CONFIG_ENV_SIZE when using CONFIG_ENV_IS_IN_UBI"
+# endif
+# ifndef CONFIG_CMD_UBI
+# error "Need to define CONFIG_CMD_UBI when using CONFIG_ENV_IS_IN_UBI"
+# endif
+#endif /* CONFIG_ENV_IS_IN_UBI */
+
/* Embedded env is only supported for some flash types */
#ifdef CONFIG_ENV_IS_EMBEDDED
# if !defined(CONFIG_ENV_IS_IN_FLASH) && \