binman: Include also subnodes in generator nodes
PATCH 1/1 binman: Include also subnodes in generator nodes
From: Jan Kiszka <[email protected]>
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.
--- tools/binman/etype/fit.py | 4 ++++ 1 file changed, 4 insertions(+)
tools/binman/etype/fit.py +4 -0
@@ -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) else: if self._fdts is None: if self._fit_list_prop:
Signature · 1 line
2.34.1
Hi Jan,
Quoted 17 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
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 <[email protected]>--- tools/binman/etype/fit.py | 4 ++++ 1 file changed, 4 insertions(+)tools/binman/etype/fit.py +0
-0
tools/binman/etype/fit.py class Entry_fit(Entry_section): · line 220
Quoted 7 lines
tools/binman/etype/fit.py +4
-0@@ -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.
Quoted 5 lines
tools/binman/etype/fit.py +0
-1else: 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