From d4d97661d255571118b6fdee0cf082a75f29af29 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 22 Jul 2023 21:43:57 -0600 Subject: binman: Support templates containing phandles This provides support for phandles to be copied over from templates. This is not quite safe, since if the template is instantiated twice (i.e. in two different nodes), then duplicate phandles will be found. This will result in an error. Signed-off-by: Simon Glass --- tools/binman/control.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/binman/control.py') diff --git a/tools/binman/control.py b/tools/binman/control.py index da33c88883e..c6d3205b8c2 100644 --- a/tools/binman/control.py +++ b/tools/binman/control.py @@ -575,6 +575,10 @@ def PrepareImagesAndDtbs(dtb_fname, select_images, update_fdt, use_expanded): _RemoveTemplates(node) dtb.Sync(True) + + # Rescan the dtb to pick up the new phandles + dtb.Scan() + node = _FindBinmanNode(dtb) fname = tools.get_output_filename('u-boot.dtb.tmpl2') tools.write_file(fname, dtb.GetContents()) -- cgit v1.2.3