Thoughts about U-boot binary size increase

Lukasz Majewski lukma at denx.de
Thu Mar 28 13:55:22 CET 2024


Hi Tom,

> On Thu, Mar 28, 2024 at 10:20:49AM +0100, Lukasz Majewski wrote:
> > Dear Community,
> > 
> > I'd like to share with you some thoughts about growth of u-boot's
> > binary size for SPL and u-boot proper.
> > 
> > Board: XEA
> > SoC  : imx287 (still in active production)
> > Problem: SPL size constrained to ~55 KiB (This cannot be exceeded). 
> > 	 Board design constraints u-boot proper size to less than
> > ~448 KiB
> > 
> > 
> > When XEA was added (2019.07):
> > 	- u-boot.sb (SPL): 37 KiB
> > 	- u-boot.img 	 : 401 KiB
> > 
> > Now (2024.04):
> > 	- u-boot.sb (SPL): 40 KiB
> > 	- u-boot.img 	 : 427 KiB
> > 
> > (With a _lot_ of effort put to reduce the size)
> > 
> > Hence, the question - would it be possible to take more concern
> > about the binary size growth?
> > 
> > Maybe CI could catch patches, which enable by default some features
> > and the size is unintentionally increased?
> > 
> > I'm open for any feedback and thoughts on "stopping" the binary size
> > increase.  
> 
> I think that's pretty amazingly small growth for nearly 5 years of bug
> fixes and feature enhancements that it's likely minor to make
> granular.

Those results are after using OF_PLATDATA in SPL and other tricks - like
compression of DTB in u-boot proper, so this caused some extra effort
to keep small.

> If LTO is not enabled on this platform 

As Fabio pointed out - I shall check if LTO can be (safely) enabled for
imx287.

> you should be able
> to use buildman to give you a "bloat" list from v2019.07 to v2024.04
> and see if anything sticks out as being something that can be
> addressed. But that little growth seems pretty good to me at first
> glance.
> 


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240328/62631f6b/attachment.sig>


More information about the U-Boot mailing list