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 --- tools/Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/Makefile') diff --git a/tools/Makefile b/tools/Makefile index e2f572cae1b..33e90a8025a 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -199,6 +199,10 @@ hostprogs-$(CONFIG_RISCV) += prelink-riscv hostprogs-y += fdtgrep fdtgrep-objs += $(LIBFDT_OBJS) fdtgrep.o +ifneq ($(TOOLS_ONLY),y) +hostprogs-y += spl_size_limit +endif + hostprogs-$(CONFIG_MIPS) += mips-relocs # We build some files with extra pedantic flags to try to minimize things -- cgit v1.3.1