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

yuanlinyu <[email protected]> Mon, 29 Sep 2025 02:33:19 +0000
Newsgroups org.kernel.vger.devicetree-compiler
Message-ID <[email protected]>
Hi David and other devicetree developer,

Could you help review this change ?

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(-)