]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
openrd: fail build if U-Boot would overlap with environment in flash
authorSascha Silbe <t-uboot@infra-silbe.de>
Sun, 11 Aug 2013 14:40:45 +0000 (16:40 +0200)
committerAnatolij Gustschin <agust@denx.de>
Thu, 14 Aug 2014 14:01:05 +0000 (16:01 +0200)
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

index 3eb408f004b0107b4ddb1e7a96c799cd62d2eaf2..b65bdfda32870b17547b3e1101d30e540d4199ec 100644 (file)
 #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