Use U-Boot max. image size definition from top Makefile in configs
authorPiotr Dymacz <pepe2k@gmail.com>
Tue, 14 Oct 2014 21:58:10 +0000 (23:58 +0200)
committerPiotr Dymacz <pepe2k@gmail.com>
Mon, 27 Apr 2015 11:24:15 +0000 (13:24 +0200)
u-boot/Makefile
u-boot/include/configs/ap121.h
u-boot/include/configs/db12x.h

index 302f3e06c91ebd266d829b6bf8f82df900fafa1a..5018dc7892e3c39d3c6a769fa68c7c36b64f61e0 100644 (file)
@@ -289,6 +289,10 @@ ifdef CONFIG_BOOTDELAY
        @echo "#define CONFIG_BOOTDELAY "$(CONFIG_BOOTDELAY)   >> include/config.h
 endif
 
+ifdef CONFIG_MAX_UBOOT_SIZE_KB
+       @echo "#define CONFIG_MAX_UBOOT_SIZE_KB "$(CONFIG_MAX_UBOOT_SIZE_KB) >> include/config.h
+endif
+
 ifdef CFG_PLL_FREQ
        @echo "#define CFG_PLL_FREQ "$(CFG_PLL_FREQ)           >> include/config.h
 endif
index 5cc76699af178c00fc948d70af8b9b2abfef25d9..244987c703108d0d3d51f079a68abef1c92110f4 100644 (file)
 
 // U-Boot partition size and offset
 #define WEBFAILSAFE_UPLOAD_UBOOT_ADDRESS                               CFG_FLASH_BASE
+#define WEBFAILSAFE_UPLOAD_UBOOT_SIZE_IN_BYTES                 (CONFIG_MAX_UBOOT_SIZE_KB * 1024)
 
 #if defined(CONFIG_FOR_DLINK_DIR505_A1)
-       #define WEBFAILSAFE_UPLOAD_UBOOT_SIZE_IN_BYTES          (64 * 1024)
        #define UPDATE_SCRIPT_UBOOT_SIZE_IN_BYTES                       "0x10000"
 #elif defined(CONFIG_FOR_8DEVICES_CARAMBOLA2)
-       #define WEBFAILSAFE_UPLOAD_UBOOT_SIZE_IN_BYTES          (256 * 1024)
        #define UPDATE_SCRIPT_UBOOT_SIZE_IN_BYTES                       "0x40000"
 #elif defined(CONFIG_FOR_DRAGINO_V2) || \
       defined(CONFIG_FOR_MESH_POTATO_V2)
-       #define WEBFAILSAFE_UPLOAD_UBOOT_SIZE_IN_BYTES          (192 * 1024)
        #define UPDATE_SCRIPT_UBOOT_SIZE_IN_BYTES                       "0x30000"
 #else
-       #define WEBFAILSAFE_UPLOAD_UBOOT_SIZE_IN_BYTES          (64 * 1024)
        #define UPDATE_SCRIPT_UBOOT_SIZE_IN_BYTES                       "0x10000"
 #endif
 
index f298a9ad265c1f12b153a4de15562f397189f471..2b2d377a2f5ec05400d30e37191d2ec0d3722bee 100644 (file)
 #define WEBFAILSAFE_UPLOAD_KERNEL_ADDRESS                      WEBFAILSAFE_UPLOAD_UBOOT_ADDRESS + 0x20000\r
 \r
 // U-Boot partition size\r
-#define WEBFAILSAFE_UPLOAD_UBOOT_SIZE_IN_BYTES         (64 * 1024)\r
+#define WEBFAILSAFE_UPLOAD_UBOOT_SIZE_IN_BYTES         (CONFIG_MAX_UBOOT_SIZE_KB * 1024)\r
 #define UPDATE_SCRIPT_UBOOT_SIZE_IN_BYTES                      "0x10000"\r
 \r
 // ART partition size\r