[PATCH v2 0/6] Restore phandles from binary representations

Uwe Kleine-König <[email protected]> Fri, 19 Sep 2025 11:29:13 +0200
Newsgroups org.kernel.vger.devicetree-compiler
Message-ID <[email protected]>
Hello,

the motivation is to improve the result when compiling from dtb to dts.
By restoring the labels and phandles the noise in the output of dtdiff
is considerably reduced in many cases.

This is v2 of the series. (Implicit) v1 can be found at
https://lore.kernel.org/devicetree-compiler/[email protected]
. The only change is an added return statement in an error case that i
missed to add. Thanks to David who spotted that.

Note that this series supersedes https://github.com/dgibson/dtc/pull/151
which can be closed once this series is in.

Best regards
Uwe

Uwe Kleine-König (6):
  Emit /plugin/ when compiling to .dts with DTSF_PLUGIN set
  Set DTSF_PLUGIN if needed when compiling from dtb
  Improve type guessing when compiling to dts format
  Restore labels from __symbols__ node
  Restore phandle references from __local_fixups__ node
  Restore phandle references from __fixups__ node

 dtc.c        |   5 ++
 dtc.h        |   6 ++
 flattree.c   |   6 +-
 livetree.c   | 174 +++++++++++++++++++++++++++++++++++++++++++++++++++
 treesource.c | 114 ++++++++++++++++++++++++---------
 5 files changed, 273 insertions(+), 32 deletions(-)


base-commit: 9197f1ccd95c9475006677aa97bf39727c1e8aa5
-- 
2.51.0