From 1eb0c03c2198a7ec9de456b83dacdc4831b96cbf Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 13 Sep 2015 14:45:15 +0200 Subject: malloc_simple: Add Kconfig option for using only malloc_simple in the SPL common/dlmalloc.c is quite big, both in .text and .data usage, therefor on some boards the SPL is build to use only malloc_simple.c and not the dlmalloc.c code. This is done in various include/configs/foo.h with the following construct: #ifdef CONFIG_SPL_BUILD #define CONFIG_SYS_MALLOC_SIMPLE #endif This commit introduces a SPL_MALLOC_SIMPLE Kconfig bool which allows selecting this functionality through Kconfig instead. Signed-off-by: Hans de Goede Acked-by: Simon Glass --- Kconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Kconfig') diff --git a/Kconfig b/Kconfig index f364a7a4d5..b4ad610f61 100644 --- a/Kconfig +++ b/Kconfig @@ -114,6 +114,16 @@ config SPL help If you want to build SPL as well as the normal image, say Y. +config SPL_SYS_MALLOC_SIMPLE + bool + depends on SPL + prompt "Only use malloc_simple functions in the spl" + help + Say Y here to only use the *_simple malloc functions from + malloc_simple.c, rather then using the versions from dlmalloc.c + this will make the SPL binary smaller at the cost of more heap + usage as the *_simple malloc functions do not re-use free-ed mem. + config SPL_STACK_R depends on SPL bool "Enable SDRAM location for SPL stack" -- cgit v1.2.1