summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Silbe <t-uboot@infra-silbe.de>2013-08-11 16:40:45 +0200
committerAnatolij Gustschin <agust@denx.de>2014-08-14 16:01:05 +0200
commit9fa7bbc126d697f1415adbac72bb7f6d978ff50d (patch)
treeb39696df0d0dbc3f8faf8046208fe05cf906588c
parentfeb858012f51e672025a8c12e69077646280b68b (diff)
downloadu-boot-imx-9fa7bbc126d697f1415adbac72bb7f6d978ff50d.zip
u-boot-imx-9fa7bbc126d697f1415adbac72bb7f6d978ff50d.tar.gz
u-boot-imx-9fa7bbc126d697f1415adbac72bb7f6d978ff50d.tar.bz2
openrd: fail build if U-Boot would overlap with environment in flash
Set CONFIG_BOARD_SIZE_LIMIT so we'll notice at build time if U-Boot has grown so large that it would overlap with the environment area in flash, rather than bricking the device at run-time on first saveenv. Signed-off-by: Sascha Silbe <t-uboot@infra-silbe.de>
-rw-r--r--include/configs/openrd.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/configs/openrd.h b/include/configs/openrd.h
index 3eb408f..b65bdfd 100644
--- a/include/configs/openrd.h
+++ b/include/configs/openrd.h
@@ -77,6 +77,11 @@
#define CONFIG_ENV_SIZE 0x20000 /* 128k */
#define CONFIG_ENV_ADDR 0x60000
#define CONFIG_ENV_OFFSET 0x60000 /* env starts here */
+/*
+ * Environment is right behind U-Boot in flash. Make sure U-Boot
+ * doesn't grow into the environment area.
+ */
+#define CONFIG_BOARD_SIZE_LIMIT CONFIG_ENV_OFFSET
/*
* Default environment variables