[PATCH 0/3] libfdt: A few more size improvements

Tom Rini <[email protected]> Tue, 9 Dec 2025 15:50:50 -0600
Newsgroups org.kernel.vger.devicetree-compiler
Message-ID <[email protected]>
Hey all,

Over on the U-Boot list we're talking about re-syncing our copy of
libfdt with the Linux Kernel again (and so with upstream dtc)[1][2].
While we've worked out most of the size increase with the upgrade, there
are still a few places we can do more. This series is three patches. The
first patch fixes a comment from back when Simon was iterating on the
whole assume framework and one spot wasn't updated. The second patch
updates the FDT_RO_PROBE macro to optimize out quicker when we assume a
valid DTB and the third patch brings in one more assume check that
U-Boot has had for ages, but wasn't upstreamed. I did not see if there
was old discussion about it, but it's something U-Boot really needs.

The end result of this series, when applied on top of [2] and some other
fixes U-Boot itself needed is that our SPL size shrinks by 12 bytes on
aarch64 without LTO.

I've run a meson build and test cycle in dtc and everything continues to
pass. I've also thrown all of this through U-Boot and things are fine
there as well.

[1]: https://lore.kernel.org/u-boot/[email protected]/
[2]: https://lore.kernel.org/u-boot/[email protected]/
-- 
Tom