diff options
author | Alper Nebi Yasak <alpernebiyasak@gmail.com> | 2022-02-09 22:02:35 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2022-02-22 20:05:44 +0300 |
commit | ee813c86f99006bf37826d195e7212cf98803de6 (patch) | |
tree | 3c564e2bba9b9d8092dd847b0362dfd298cb6397 /tools/binman/etype/fit.py | |
parent | 17a0dc6abfdbf392f6a27074f2633608038c4221 (diff) | |
download | u-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.py | 12 |
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 |