Browse Source

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>
Sascha Silbe 11 years ago
parent
commit
9fa7bbc126
1 changed files with 5 additions and 0 deletions
  1. 5 0
      include/configs/openrd.h

+ 5 - 0
include/configs/openrd.h

@@ -77,6 +77,11 @@
 #define CONFIG_ENV_SIZE			0x20000	/* 128k */
 #define CONFIG_ENV_SIZE			0x20000	/* 128k */
 #define CONFIG_ENV_ADDR			0x60000
 #define CONFIG_ENV_ADDR			0x60000
 #define CONFIG_ENV_OFFSET		0x60000	/* env starts here */
 #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
  * Default environment variables