From: Sascha Silbe Date: Sun, 11 Aug 2013 14:40:45 +0000 (+0200) Subject: openrd: fail build if U-Boot would overlap with environment in flash X-Git-Tag: KARO-TXA5-2015-06-26~790^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9fa7bbc126d697f1415adbac72bb7f6d978ff50d;p=karo-tx-uboot.git 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 --- diff --git a/include/configs/openrd.h b/include/configs/openrd.h index 3eb408f004..b65bdfda32 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