public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] check u-boot SPL size to avoid producing non-working images
@ 2016-05-28  8:55 Pavel Machek
  2016-05-28 11:55 ` Marek Vasut
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2016-05-28  8:55 UTC (permalink / raw)
  To: u-boot

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>

diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index 6d2017d..504f0d2 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -237,6 +237,7 @@ endif
 
 MKIMAGEFLAGS_$(SPL_BIN).sfp = -T socfpgaimage
 $(obj)/$(SPL_BIN).sfp: $(obj)/$(SPL_BIN).bin FORCE
+	@if test `stat -c%s $(obj)/$(SPL_BIN).bin` -gt 50000; then echo `stat -c%s $(obj)/$(SPL_BIN).bin` is too big, it probably will not work; exit 1; fi
 	$(call if_changed,mkimage)
 
 quiet_cmd_mksunxiboot = MKSUNXI $@


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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-30 20:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-28  8:55 [U-Boot] [PATCH] check u-boot SPL size to avoid producing non-working images Pavel Machek
2016-05-28 11:55 ` Marek Vasut
2016-05-28 19:41   ` [U-Boot] [PATCHv2] " Pavel Machek
2016-05-30 20:10     ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox