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]>
