diff options
author | Stefan Roese <sr@denx.de> | 2009-06-04 16:55:34 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-06-12 20:47:18 +0200 |
commit | 60cfe87bd39e6f07f2b92eb4bff82bfd105f4724 (patch) | |
tree | c1a617e613e9594651522f30fedb88b4a89e59e3 /drivers | |
parent | 7ce6031afc8671c8b47c6135b3678d43fcd02852 (diff) | |
download | u-boot-midas-60cfe87bd39e6f07f2b92eb4bff82bfd105f4724.tar.gz u-boot-midas-60cfe87bd39e6f07f2b92eb4bff82bfd105f4724.tar.bz2 u-boot-midas-60cfe87bd39e6f07f2b92eb4bff82bfd105f4724.zip |
UBI: Add compile-time check for correct malloc area configuration
UBI is quite memory greedy and requires at least approx. 512k of malloc
area. This patch adds a compile-time check, so that boards will not
build with less memory reserved for this area (CONFIG_SYS_MALLOC_LEN).
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/ubi/build.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index f4b01a9ded..4f50b2db62 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c @@ -46,6 +46,10 @@ #include <ubi_uboot.h> #include "ubi.h" +#if (CONFIG_SYS_MALLOC_LEN < (512 << 10)) +#error Malloc area too small for UBI, increase CONFIG_SYS_MALLOC_LEN to >= 512k +#endif + /* Maximum length of the 'mtd=' parameter */ #define MTD_PARAM_LEN_MAX 64 |