[PATCH 0/3] Synchronize DTC to 1.7.2
Tom Rini
trini at konsulko.com
Thu Nov 13 18:57:00 CET 2025
On Thu, Nov 13, 2025 at 01:21:07PM +0100, Marek Vasut wrote:
> Synchronize local copy of DTC with Linux 6.17 , using commits picked
> from Linux kernel. This also includes two fix up patches to make the
> DM core work with new 8-byte alignment checking in libfdt and another
> fix for NULL pointer check that is missing in libfdt.
>
> This depends on the following patches sent separately, which fix
> various 8-byte alignment problems in the code base:
>
> - boot: android: Always use 8-byte aligned DT with libfdt
> - test/py: android: Point fdt command to aligned addresses
> - test/py: Use aligned address for overlays in 'extension' test
> - sandbox: Fix DT compiler address warnings in sandbox DTs
> - sandbox: Fix DT compiler pin warnings in sandbox DTs
> - boot: Assure FDT is always at 8-byte aligned address
> - arm: qemu: Eliminate fdt_high and initrd_high misuse
> - efi_loader: Assure fitImage from capsule is used from 8-byte aligned address
> - MIPS: Assure end of U-Boot is at 8-byte aligned offset
So, taking a look at the test branch you pointed me at, my big concern
is size growth. On imx8mp_dhcom_drc02 (where we're already LTO'ing),
with the CI gcc-14.2.0 toolchain full U-Boot grows by more than 6KiB and
SPL by a bit more than 2KiB. This is a bit of a worst-case, imx8mp_navqp
is a bit more than 3KiB / 548 bytes, with the average feeling like
~4KiB/1KiB for aarch64.
I know there are some configuration choices to make libfdt be more
risk-adverse and perform less sanity checks, but I also think we had
fully enabled them.
Frustratingly I think this is why we ended up with:
commit 088bbc1efa8c1efe8e2714b9640055ce984aec93
Author: Patrice Chotard <patrice.chotard at foss.st.com>
Date: Fri Mar 28 17:31:15 2025 +0100
dtc: introduce label relative path references
Since introduction of OF_UPSTREAM flag, U-Boot's dtc must be able
to compile Kernel's device tree.
Since kernel commit 7de129f5389b ("ARM: dts: stm32: stm32mp151a-prtt1l:
Fix QSPI configuration"), label relative path references has been
introduced. These label relative path references is not supported
by current U-Boot dtc version 1.5.0: (see mailing list discussion [1]).
In order to support such label relative patch references
adds following commit from upstream DTC tree:
commit 651410e54cb9 ("util: introduce xstrndup helper")
commit ec7986e682cf ("dtc: introduce label relative path references")
[1] https://lore.kernel.org/all/20250115144428.GZ3476@bill-the-cat/T/
Signed-off-by: Patrice Chotard <patrice.chotard at foss.st.com>
Cc: Tom Rini <trini at konsulko.com>
Cc: Simon Glass <sjg at chromium.org>
Reviewed-by: Tom Rini <trini at konsulko.com>
Reviewed-by: Simon Glass <sjg at chromium.org>
Rather than a full-resync for the last time we needed a feature found
upstream.
There are things we *need* like to be 8-byte aligned and also the
phandle resolution thing I believe inspired your investigations here,
but I don't know if we can take the whole sync. Or maybe needing to work
with upstream to shrink down some parts, I'm unsure.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20251113/271a0021/attachment.sig>
More information about the U-Boot
mailing list