summaryrefslogtreecommitdiff
path: root/tools/binman/ftest.py
diff options
context:
space:
mode:
authorJonas Karlman <jonas@kwiboo.se>2023-01-21 19:01:48 +0000
committerSimon Glass <sjg@chromium.org>2023-01-26 10:47:45 -0700
commit00b3d53f156927427b2bec95604acb6f6190c134 (patch)
tree66f35ae3faebb592b54df51b94ad196ef4384934 /tools/binman/ftest.py
parent5ad03fc77dfa055629bfbf283bdf938e6dd27d94 (diff)
binman: Add special subnodes to the nodes generated by split-elf
Special nodes, hash and signature, is not being added to the nodes generated for each segment in split-elf operation. Copy the subnode logic used in _gen_fdt_nodes to _gen_split_elf to ensure special nodes are added to the generated nodes. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/ftest.py')
-rw-r--r--tools/binman/ftest.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index f0d0afd5b80..cd275725717 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -5439,6 +5439,10 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
fdt_util.fdt32_to_cpu(atf1.props['load'].value))
self.assertEqual(data, atf1.props['data'].bytes)
+ hash_node = atf1.FindNode('hash')
+ self.assertIsNotNone(hash_node)
+ self.assertEqual({'algo', 'value'}, hash_node.props.keys())
+
atf2 = dtb.GetNode('/images/atf-2')
self.assertEqual(base_keys, atf2.props.keys())
_, start, data = segments[1]
@@ -5446,6 +5450,14 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
fdt_util.fdt32_to_cpu(atf2.props['load'].value))
self.assertEqual(data, atf2.props['data'].bytes)
+ hash_node = atf2.FindNode('hash')
+ self.assertIsNotNone(hash_node)
+ self.assertEqual({'algo', 'value'}, hash_node.props.keys())
+
+ hash_node = dtb.GetNode('/images/tee-1/hash-1')
+ self.assertIsNotNone(hash_node)
+ self.assertEqual({'algo', 'value'}, hash_node.props.keys())
+
conf = dtb.GetNode('/configurations')
self.assertEqual({'default'}, conf.props.keys())