Re: [PATCH v3] fdt: Fix phandles not copying when using templates

Simon Glass <[email protected]>
Newsgroups org.u-boot-project.lists.u-boot
Message-ID <CAFLszTjF-YcHuGmVWGJWJwSSxPYxN-c3n3imSeuNHWFo3r2iQw@mail.gmail.com>
On 2026-07-29T10:24:57, Anshul Dalal <[email protected]> wrote:
> fdt: Fix phandles not copying when using templates
>
> The phandles used inside a template are not copied to the node inserting
> the template, leading to a missing phandle error.
>
> The following example can be used to reproduce the issue:
>
> &binman {
>   some_template: template-0 {
>     ti-secure-rom {
>       content = <&some_data>;
>       keyfile = "some_key";
>     };
>     some_data: blob-ext {
>       optional;
>     };
>   };
>   output-bin {
>     insert-template = <&some_template>;
>   };
> };
>
> With the error 'binman: Node '/binman/output-bin/ti-secure-rom': Cannot
> find node for phandle 103' observed.
>
> The test_copy_subnodes_from_phandles was also updated to verify the new
> behavior of phandles being copied.
>
> Reviewed-by: Moteen Shah <[email protected]>
> Signed-off-by: Anshul Dalal <[email protected]>
>
> tools/binman/ftest.py                           | 12 ++++++++++++
>  tools/binman/test/fdt/template_phandle_copy.dts | 22 ++++++++++++++++++++++
>  tools/dtoc/fdt.py                               |  2 +-
>  tools/dtoc/test_fdt.py                          |  4 ++--
>  4 files changed, 37 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.