]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
kbuild: Drop phandle from diff between base DT and U-Boot augmented DT if DEVICE_TREE...
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Sun, 15 Feb 2026 14:04:55 +0000 (15:04 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 3 Mar 2026 16:34:57 +0000 (10:34 -0600)
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@mailbox.org>
Tested-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
scripts/Makefile.lib

index 377a4700b9408fa280159f86543854a10ad648c9..7386353e0cceb55a437be607ffb3398fb03ad7cc 100644 (file)
@@ -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)