[PATCH] board: var-som-mx8mn: Fix alloc space exhausted in SPL

Hugo Villeneuve hugo at hugovil.com
Thu Jun 12 15:35:18 CEST 2025


From: Hugo Villeneuve <hvilleneuve at dimonoff.com>

After enabling some options to support EEPROM read in SPL
(CONFIG_SPL_I2C_EEPROM), the following error appears:

    alloc space exhausted

Increasing SYS_MALLOC_F_LEN from 8kB to 64kB fixes the problem.

But instead of manually increasing the value, adopt method used in
commit ce3f23404c19 ("board: bsh: imx8mn_bsh_smm_s2/s2pro: enlarge
CONFIG_SPL_SYS_MALLOC_F_LEN"):

Dropping CONFIG_SPL_SYS_MALLOC_F_LEN option allows it to be set to the
default value of CONFIG_SYS_MALLOC_F_LEN, which is set by default to 64kB
(0x10000) on i.MX8M platforms.

Suggested-by: Fabio Estevam  <festevam at gmail.com>
Signed-off-by: Hugo Villeneuve <hvilleneuve at dimonoff.com>
---
 configs/imx8mn_var_som_defconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/configs/imx8mn_var_som_defconfig b/configs/imx8mn_var_som_defconfig
index 5a9f31b1c2a..0596e33fa04 100644
--- a/configs/imx8mn_var_som_defconfig
+++ b/configs/imx8mn_var_som_defconfig
@@ -17,7 +17,6 @@ CONFIG_SPL_MMC=y
 CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=y
 CONFIG_SPL_STACK=0x980000
-CONFIG_SPL_SYS_MALLOC_F_LEN=0x2000
 CONFIG_SPL_TEXT_BASE=0x912000
 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
 CONFIG_SPL_BSS_START_ADDR=0x950000

base-commit: d7c449c3d83a986d61e38d1762433c0607caf5c5
-- 
2.39.5



More information about the U-Boot mailing list