Re: [PATCH] label: collect labels to __phandles__ node in interger format

David Gibson <[email protected]> Fri, 3 Oct 2025 16:29:09 +1000
Newsgroups org.kernel.vger.devicetree-compiler
Message-ID <aN9tNVi25NOxyJoW@zatzit>
On Mon, Sep 29, 2025 at 02:33:19AM +0000, yuanlinyu wrote:
> Hi David and other devicetree developer,
> 
> Could you help review this change ?

Sorry for the lack of reply.  I'm not going to apply this.  There's
currently a big discussion underway on this list (amongst others)
about better ways of doing runtime device tree modifications.  ("Re:
Device tree representation of (hotplug) connectors: discussion at
ELCE").

My main point in that thread is that we need to reconsider the design
of this end-to-end, and not add more hacks on top of the overlay
mechanism which was never really designed for this.

> 
> thanks
> -----Original Message-----
> From: yuanlinyu <[email protected]> 
> Sent: Monday, September 1, 2025 8:23 PM
> To: David Gibson <[email protected]>
> Cc: [email protected]; yuanlinyu <[email protected]>
> Subject: [PATCH] label: collect labels to __phandles__ node in interger format
> 
> Currently labels are collect to __symbols__ node in path string format,
> the libufdt have no support of it when do overlay.
> 
> Add a new method which collect labels in __phandles__ node which each
> entry is an interger format, it will allow libufdt to keep labels when
> do (stack) overlay.
> 
> The new method including below points,
> 1. add an option -P for dtc tool, it will create __phandles__ node and
> labels in interger foramt
> 2. add new function in fdt_overlay.c to support merge __phandles__ node
> 3. add overlay test which test -P option
> ---
>  dtc.c                |  18 +++-
>  dtc.h                |   4 +-
>  libfdt/fdt_overlay.c | 250 ++++++++++++++++++++++++++++++++++++++-----
>  livetree.c           |  76 +++++++++++--
>  tests/run_tests.sh   |  84 +++++++++++++++
>  5 files changed, 392 insertions(+), 40 deletions(-)

-- 
David Gibson (he or they)	| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you, not the other way
				| around.
http://www.ozlabs.org/~dgibson
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmjfbTQACgkQzQJF27ox
2Gf4XQ/+JMPjbQK/7HG4UGw7VUSlyopltCAICV8AN4Hh37OeP8oDgELvZLNHt6Tu
kCgd+dfe9e5u8BxiBR0oJWeu+WNpbswwcrkNtHjhZ8XW1ZfalQVTcTSW3JbHL8/n
GxPiykwgXmViG1OjzeEatOrYZYuXLCvEk4sJYxIxpTDEgF0x/F9GCi31SMCiqu5K
YulmrjOLfKUxVDH5TCq52n5gNGja++Ai3PtP1st1coKNx9gwY2oFQTkBP8WU5F42
4AWOk8GRqYaGUlcUQ7H4I04vIXtvgZwrnmExyJKHDDemNtKQ6b2l6wmm8101nV1T
EEXTfCLcos9BNBRQT6lFMAA4bkuMQ9JrniHNYZSrI0dx+eGzx7uTbStZABkXYZrf
TmqnSmn7nIEldXVri2lXJCKGHn+Wm8n0aFSRKIyrrZslqe8HwWYLrTvIORuV/kws
ihLsgT3f/MGFX+inXO22F+9BhtauYSEi1as7v3m/2Ec+W1cuFjKZThClGHnzJ46d
j6vkAXJM/r+1fiD/xgEcLcrfM0ibSIbjdu4ijHYRASS2VX5jR1wlRrbut2aUTdcB
t59YQIqQssv43yQemqnvlCHUCHoXqaJHxwYMfj02nQF8T+36+Af4/UDM1J/DlMVM
iNTwlkKbXtChEXDoHuaqMBv4QBu/yBAm/D5AlBpZOEmuIcu5HAI=
=nQI2
-----END PGP SIGNATURE-----