From 2577015dc5c48e7892dea8731a27530543606673 Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Fri, 24 May 2019 22:07:04 +0200 Subject: spl: add overall SPL size check This adds a size check for SPL that can dynamically check generated SPL binaries (including devicetree) for a size limit that ensures this image plus global data, heap and stack fit in initial SRAM. Since some of these sizes are not available to make, a new host tool 'spl_size_limit' is added that dumps the resulting maximum size for an SPL binary to stdout. This tool is used in toplevel Makefile to implement the size check on SPL binaries. Signed-off-by: Simon Goldschmidt --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index da8a38d..8de3d41 100644 --- a/Makefile +++ b/Makefile @@ -797,7 +797,7 @@ BOARD_SIZE_CHECK = endif ifneq ($(CONFIG_SPL_SIZE_LIMIT),0) -SPL_SIZE_CHECK = @$(call size_check,$@,$(CONFIG_SPL_SIZE_LIMIT)) +SPL_SIZE_CHECK = @$(call size_check,$@,$$(tools/spl_size_limit)) else SPL_SIZE_CHECK = endif @@ -1782,6 +1782,7 @@ checkarmreloc: u-boot envtools: scripts_basic $(version_h) $(timestamp_h) $(Q)$(MAKE) $(build)=tools/env +tools-only: export TOOLS_ONLY=y tools-only: scripts_basic $(version_h) $(timestamp_h) $(Q)$(MAKE) $(build)=tools -- cgit v1.1