diff mbox

[U-Boot,3/3] openrd: fail build if U-Boot would overlap with environment in flash

Message ID 1376232045-18757-4-git-send-email-t-uboot@infra-silbe.de
State Accepted
Delegated to: Anatolij Gustschin
Headers show

Commit Message

Sascha Silbe Aug. 11, 2013, 2:40 p.m. UTC
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>
---
 include/configs/openrd.h | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Anatolij Gustschin Aug. 14, 2014, 2:09 p.m. UTC | #1
On Sun, 11 Aug 2013 16:40:45 +0200
Sascha Silbe <t-uboot@infra-silbe.de> wrote:

> 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>
> ---
>  include/configs/openrd.h | 5 +++++
>  1 file changed, 5 insertions(+)

applied to u-boot-staging/agust@denx.de. thanks!

Anatolij
diff mbox

Patch

diff --git a/include/configs/openrd.h b/include/configs/openrd.h
index 8fab6e6..b7526f8 100644
--- a/include/configs/openrd.h
+++ b/include/configs/openrd.h
@@ -76,6 +76,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