[U-Boot] [PATCHv2] check u-boot SPL size to avoid producing non-working images

Pavel Machek
2016-05-28T19:41:24Z

Debugging SPL is hard, and if SPL is too big, it tends to crash in
mysterious ways.

(I'm not sure what the exact threshold is, 49762 bytes works, 52426
bytes does not, so 50000 should be good value).

Signed-off-by: Pavel Machek <pavel@denx.de>

---

> Please use CONFIG_SPL_MAX_*

Ok, that's simple enough. It computes the size different way, thus the
different number.

diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index f657766..c82da96 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -323,7 +332,7 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
#define CONFIG_SPL_FRAMEWORK
#define CONFIG_SPL_RAM_DEVICE
#define CONFIG_SPL_TEXT_BASE CONFIG_SYS_INIT_RAM_ADDR
-#define CONFIG_SPL_MAX_SIZE (64 * 1024)
+#define CONFIG_SPL_MAX_SIZE (48 * 1024)
#ifdef CONFIG_SPL_BUILD
#define CONFIG_SYS_MALLOC_SIMPLE
#endif

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html