[PATCH 0/6] binman: Template fixes and improvements

Simon Glass sjg at chromium.org
Fri Jul 21 18:07:00 CEST 2023


With the basic template feature in place, some problems have come to
light.

Firstly, keeping the template around while processing entries seems
unnecessary and perhaps confusing, so this is removed.

Secondly this series aims to support phandles in a more intuitive way,
rather than just ignoring them in templates. It includes an experimental
patch to copy phandles from template so that it is possible to so
something like:

   template {
      some_node: some-node {
      };
   };

   image {
      insert-template = <&template>;
   };

with the some_node phandle being copied to the 'image' node, to result in:

   image {
      insert-template = <&template>;

      some_node: some-node {
      };
   };



Simon Glass (6):
  binman: Produce a template-file after processing
  dtoc: Make properties dirty when purging them
  dtoc: Add some debugging when copying nodes
  fdt: Allow copying phandles into templates
  binman: Remove templates after use
  WIP: binman: Support templates containing phandles

 tools/binman/binman.rst                    |  8 +++-
 tools/binman/control.py                    | 32 ++++++++++++--
 tools/binman/ftest.py                      | 31 +++++++++++++
 tools/binman/test/291_template_phandle.dts | 51 ++++++++++++++++++++++
 tools/dtoc/fdt.py                          |  9 +++-
 tools/dtoc/test/dtoc_test_copy.dts         |  6 ++-
 tools/dtoc/test_fdt.py                     | 34 ++++++++++-----
 7 files changed, 153 insertions(+), 18 deletions(-)
 create mode 100644 tools/binman/test/291_template_phandle.dts

-- 
2.41.0.487.g6d72f3e995-goog



More information about the U-Boot mailing list