summaryrefslogtreecommitdiff
path: root/tools/binman/etype/fit.py
diff options
context:
space:
mode:
authorAlper Nebi Yasak <alpernebiyasak@gmail.com>2022-02-09 22:02:35 +0300
committerSimon Glass <sjg@chromium.org>2022-02-22 20:05:44 +0300
commitee813c86f99006bf37826d195e7212cf98803de6 (patch)
tree3c564e2bba9b9d8092dd847b0362dfd298cb6397 /tools/binman/etype/fit.py
parent17a0dc6abfdbf392f6a27074f2633608038c4221 (diff)
downloadu-boot-ee813c86f99006bf37826d195e7212cf98803de6.tar.xz
binman: Skip processing "hash" subnodes of FIT subsections
Binman's FIT entry type can have image subentries with "hash" subnodes intended to be processed by mkimage, but not binman. However, the Entry class and any subclass that reuses its implementation tries to process these unconditionally. This can lead to an error when boards specify hash algorithms that binman doesn't support, but mkimage supports. Let entries skip processing these "hash" subnodes based on an instance variable, and set this instance variable for FIT subsections. Also re-enable processing of calculated and missing properties of FIT entries which was disabled to mitigate this issue. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/etype/fit.py')
-rw-r--r--tools/binman/etype/fit.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/tools/binman/etype/fit.py b/tools/binman/etype/fit.py
index a56b0564f9..cd7ebc571e 100644
--- a/tools/binman/etype/fit.py
+++ b/tools/binman/etype/fit.py
@@ -186,6 +186,8 @@ class Entry_fit(Entry_section):
# 'data' property later.
entry = Entry.Create(self.section, node, etype='section')
entry.ReadNode()
+ # The hash subnodes here are for mkimage, not binman.
+ entry.SetUpdateHash(False)
self._entries[rel_path] = entry
for subnode in node.subnodes:
@@ -294,13 +296,3 @@ class Entry_fit(Entry_section):
def AddBintools(self, tools):
super().AddBintools(tools)
self.mkimage = self.AddBintool(tools, 'mkimage')
-
- def AddMissingProperties(self, have_image_pos):
- # We don't want to interfere with any hash properties in the FIT, so
- # disable this for now.
- pass
-
- def SetCalculatedProperties(self):
- # We don't want to interfere with any hash properties in the FIT, so
- # disable this for now.
- pass