Patchwork [U-Boot,2/3] Makefile: check native boot image sizes against CONFIG_BOARD_SIZE_LIMIT

login
register
mail settings
Submitter Sascha Silbe
Date Aug. 11, 2013, 2:40 p.m.
Message ID <1376232045-18757-3-git-send-email-t-uboot@infra-silbe.de>
Download mbox | patch
Permalink /patch/266331/
State New
Delegated to: Wolfgang Denk
Headers show

Comments

Sascha Silbe - Aug. 11, 2013, 2:40 p.m.
The purpose of CONFIG_BOARD_SIZE_LIMIT is to make sure that U-Boot
fits into the space reserved for it in some permanent storage. This
includes any overhead incurred by native boot image formats, so check
the final image against the size limit, too.

Signed-off-by: Sascha Silbe <t-uboot@infra-silbe.de>
---
 Makefile | 3 +++
 1 file changed, 3 insertions(+)

Patch

diff --git a/Makefile b/Makefile
index d545d30..3e05f9a 100644
--- a/Makefile
+++ b/Makefile
@@ -459,15 +459,18 @@  $(obj)u-boot.img:	$(obj)u-boot.bin
 
 $(obj)u-boot.imx: $(obj)u-boot.bin depend
 		$(MAKE) -C $(SRCTREE)/arch/arm/imx-common $(OBJTREE)/u-boot.imx
+		$(BOARD_SIZE_CHECK)
 
 $(obj)u-boot.kwb:       $(obj)u-boot.bin
 		$(obj)tools/mkimage -n $(CONFIG_SYS_KWD_CONFIG) -T kwbimage \
 		-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -d $< $@
+		$(BOARD_SIZE_CHECK)
 
 $(obj)u-boot.pbl:	$(obj)u-boot.bin
 		$(obj)tools/mkimage -n $(CONFIG_PBLRCW_CONFIG) \
 		-R $(CONFIG_PBLPBI_CONFIG) -T pblimage \
 		-d $< $@
+		$(BOARD_SIZE_CHECK)
 
 $(obj)u-boot.sha1:	$(obj)u-boot.bin
 		$(obj)tools/ubsha1 $(obj)u-boot.bin