[PATCH] kbuild: Drop phandle from diff between base DT and U-Boot augmented DT if DEVICE_TREE_DEBUG=1

Marek Vasut marek.vasut+renesas at mailbox.org
Sun Feb 15 15:04:55 CET 2026


Remove the "phandle = <0x..>;" properties from the DT diff between
unpatched base DT and U-Boot augmented DT if DEVICE_TREE_DEBUG=1.
The phandle numbers are only generated by DTC, but not referenced
anywhere in the DT, because the original references are specifically
not replaced by phandle numbers when recent DTC is invoked with the
-I dts -O dts flags . The phandle number are therefore only a noise
in the diff, filter them out.

Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
---
Cc: Adriano Cordova <adrianox at gmail.com>
Cc: Ilias Apalodimas <ilias.apalodimas at linaro.org>
Cc: Peter Robinson <pbrobinson at gmail.com>
Cc: Sam Edwards <cfsworks at gmail.com>
Cc: Sughosh Ganu <sughosh.ganu at arm.com>
Cc: Tom Rini <trini at konsulko.com>
Cc: u-boot at lists.denx.de
---
 scripts/Makefile.lib | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 377a4700b94..7386353e0cc 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -437,6 +437,8 @@ cmd_dtc_diff = \
 	$(DTC) -s -O dts -o $@.full.dts -b 0 \
 		-i $(dir $<) -i $(u_boot_dtsi_loc) $(DTC_FLAGS) $(dtc-tmp) || \
 		(echo "Check $(shell pwd)/$(pre-tmp) for errors" && false); \
+	sed -i '/\<phandle\> = <0x[0-9a-f]\+>;/ d' $@.clean.dts; \
+	sed -i '/\<phandle\> = <0x[0-9a-f]\+>;/ d' $@.full.dts; \
 	(diff -Naru $@.clean.dts $@.full.dts > $@.diff || true)
 
 dtn-tmp = $(subst $(comma),_,$(dot-target).dtn.tmp)
-- 
2.51.0



More information about the U-Boot mailing list