aboutsummaryrefslogtreecommitdiff
path: root/tools/binman/entry.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-09-14 04:57:31 -0600
committerSimon Glass <sjg@chromium.org>2018-09-29 11:49:35 -0600
commite0e5df9310d3a0e1fc0eda86ff43fd3e782e61f1 (patch)
tree7550a5bb58f99bcf8e0f3ac2fdd2db8a5bce4bbf /tools/binman/entry.py
parent9c888cca5e87e28e9addcffae9810fee481428a8 (diff)
downloadu-boot-e0e5df9310d3a0e1fc0eda86ff43fd3e782e61f1.zip
u-boot-e0e5df9310d3a0e1fc0eda86ff43fd3e782e61f1.tar.gz
u-boot-e0e5df9310d3a0e1fc0eda86ff43fd3e782e61f1.tar.bz2
binman: Support hashing entries
Sometimesi it us useful to be able to verify the content of entries with a hash. Add an easy way to do this in binman. The hash information can be retrieved from the device tree at run time. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/entry.py')
-rw-r--r--tools/binman/entry.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index 0915b47..fd72234 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -189,12 +189,16 @@ class Entry(object):
for prop in ['offset', 'size', 'image-pos']:
if not prop in self._node.props:
state.AddZeroProp(self._node, prop)
+ err = state.CheckAddHashProp(self._node)
+ if err:
+ self.Raise(err)
def SetCalculatedProperties(self):
"""Set the value of device-tree properties calculated by binman"""
state.SetInt(self._node, 'offset', self.offset)
state.SetInt(self._node, 'size', self.size)
state.SetInt(self._node, 'image-pos', self.image_pos)
+ state.CheckSetHashValue(self._node, self.GetData)
def ProcessFdt(self, fdt):
"""Allow entries to adjust the device tree