mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-28 07:03:31 +08:00
binman: Include also subnodes in generator nodes
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@siemens.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
7aa288ef5c
commit
b210661c86
@ -269,6 +269,10 @@ class Entry_fit(Entry_section):
|
||||
# Add data for 'images' nodes (but not 'config')
|
||||
if depth == 1 and in_images:
|
||||
fsw.property('data', tools.read_file(fname))
|
||||
|
||||
for subnode in node.subnodes:
|
||||
with fsw.add_node(subnode.name):
|
||||
_add_node(node, depth + 1, subnode)
|
||||
else:
|
||||
if self._fdts is None:
|
||||
if self._fit_list_prop:
|
||||
|
@ -4029,6 +4029,7 @@ class TestFunctional(unittest.TestCase):
|
||||
self.assertEqual(expected_data, fnode.props['data'].bytes)
|
||||
self.assertEqual('fdt-test-fdt%d.dtb' % seq,
|
||||
fnode.props['description'].value)
|
||||
self.assertEqual(fnode.subnodes[0].name, 'hash')
|
||||
|
||||
def _CheckConfig(seq, expected_data):
|
||||
"""Check the configuration nodes
|
||||
|
@ -36,6 +36,9 @@
|
||||
description = "fdt-NAME.dtb";
|
||||
type = "flat_dt";
|
||||
compression = "none";
|
||||
hash {
|
||||
algo = "sha256";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user