]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
UBI: Add compile-time check for correct malloc area configuration
authorStefan Roese <sr@denx.de>
Thu, 4 Jun 2009 14:55:34 +0000 (16:55 +0200)
committerWolfgang Denk <wd@denx.de>
Fri, 12 Jun 2009 18:47:18 +0000 (20:47 +0200)
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>
drivers/mtd/ubi/build.c

index f4b01a9ded249adb84d6387e72633d53b1095a4a..4f50b2db62950612d4f8ab79600d51e7c7472d86 100644 (file)
 #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