From: Albert ARIBAUD Date: Wed, 10 Apr 2013 01:14:52 +0200 Subject: [U-Boot] [PATCH v2 1/4] cam_enc_4xx: fix CONFIG_SPL_MAX_SIZE semantics In-Reply-To: <1365549295-9388-1-git-send-email-albert.u.boot@aribaud.net> References: <1365451109-22030-1-git-send-email-albert.u.boot@aribaud.net> <1365549295-9388-1-git-send-email-albert.u.boot@aribaud.net> Message-ID: <1365549295-9388-2-git-send-email-albert.u.boot@aribaud.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de CONFIG_SPL_MAX_SIZE wrongly included BSS size. Split 12K max size between 10K image (text,rodata,data) and 2K BSS based on sizes reported for current build: text data bss 9073 840 500 Signed-off-by: Albert ARIBAUD --- Changes in v2: - brought back total size to 12K board/ait/cam_enc_4xx/u-boot-spl.lds | 2 +- include/configs/cam_enc_4xx.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/board/ait/cam_enc_4xx/u-boot-spl.lds b/board/ait/cam_enc_4xx/u-boot-spl.lds index dd9d52d..25625dc 100644 --- a/board/ait/cam_enc_4xx/u-boot-spl.lds +++ b/board/ait/cam_enc_4xx/u-boot-spl.lds @@ -25,7 +25,7 @@ */ MEMORY { .sram : ORIGIN = CONFIG_SPL_TEXT_BASE,\ - LENGTH = CONFIG_SPL_MAX_SIZE } + LENGTH = (CONFIG_SPL_MAX_SIZE + CONFIG_SPL_BSS_MAX_SIZE) } OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") OUTPUT_ARCH(arm) diff --git a/include/configs/cam_enc_4xx.h b/include/configs/cam_enc_4xx.h index 56528dd..b73b72c 100644 --- a/include/configs/cam_enc_4xx.h +++ b/include/configs/cam_enc_4xx.h @@ -230,7 +230,9 @@ #define CONFIG_SPL_STACK (0x00010000 + 0x7f00) #define CONFIG_SPL_TEXT_BASE 0x00000020 /*CONFIG_SYS_SRAM_START*/ -#define CONFIG_SPL_MAX_SIZE 12320 +/* SPL total size is 12K -- but --pad-to requires a single decimal number */ +#define CONFIG_SPL_MAX_SIZE 10240 +#define CONFIG_SPL_BSS_MAX_SIZE (2*1024) #ifndef CONFIG_SPL_BUILD #define CONFIG_SYS_TEXT_BASE 0x81080000 -- 1.7.10.4