[PATCH] binman: Include also subnodes in generator nodes

Simon Glass sjg at chromium.org
Wed Feb 16 15:21:21 CET 2022


Hi Jan,

On Mon, 14 Feb 2022 at 05:05, Jan Kiszka <jan.kiszka at siemens.com> wrote:
>
> From: Jan Kiszka <jan.kiszka at siemens.com>
>
> This allows to prefill fdt and config nodes with hash and signature
> subnodes. It's just important to place the child nodes last so that
> hashes do not come before the data - would be disliked by mkimage.
>
> Signed-off-by: Jan Kiszka <jan.kiszka at siemens.com>
> ---
>  tools/binman/etype/fit.py | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/tools/binman/etype/fit.py b/tools/binman/etype/fit.py
> index a56b0564f9a..477d0156e48 100644
> --- a/tools/binman/etype/fit.py
> +++ b/tools/binman/etype/fit.py
> @@ -214,6 +214,10 @@ class Entry_fit(Entry_section):
>                                  if depth == 1 and in_images:
>                                      fsw.property('data',
>                                                   tools.read_file(fname))
> +
> +                                for child in subnode.subnodes:
> +                                    with fsw.add_node(child.name):
> +                                        _AddNode(subnode, depth + 1, child)

We already have subnode, and child is a bit like that. The libfdt
library tries to use subnode instead of child and binman has followed
suit.

So s/child/subsubnode/ perhaps.

>                      else:
>                          if self._fdts is None:
>                              if self._fit_list_prop:
> --
> 2.34.1

Please also add or modify a test to show/check this feature.

Regards,
Simon


More information about the U-Boot mailing list