summaryrefslogtreecommitdiff
path: root/tools/binman/etype/fit.py
diff options
context:
space:
mode:
authorAlper Nebi Yasak <alpernebiyasak@gmail.com>2022-03-27 18:31:48 +0300
committerTom Rini <trini@konsulko.com>2022-04-25 17:11:05 +0300
commit74d3b2311deeefe0da8df75d16b8d839ba5ff2a4 (patch)
tree8f9b8a5e538a1a085cea543b6728e70a61536f0f /tools/binman/etype/fit.py
parente736878b0865cdf963f02ec088b1df1d600ded20 (diff)
downloadu-boot-74d3b2311deeefe0da8df75d16b8d839ba5ff2a4.tar.xz
binman: Create FIT subentries in the FIT section, not its parent
When reading images from a file, each entry's data is read from its parent section as specified in the Entry.Create() call that created it. The FIT entry type has been creating its subentries under its parent (their grandparent), as creating them under the FIT entry resulted in an error until FIT was converted into a proper section. FIT subentries have their offsets relative to the FIT section, and reading those offsets in the parent section results in wrong data. The subentries rightfully belong under the FIT entries, so create them there. Add tests checking that we can extract the correct data for a FIT entry and its subentries. 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.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/binman/etype/fit.py b/tools/binman/etype/fit.py
index 035719871e..12306623af 100644
--- a/tools/binman/etype/fit.py
+++ b/tools/binman/etype/fit.py
@@ -380,7 +380,7 @@ class Entry_fit(Entry_section):
# section entries for them here to merge the content subnodes
# together and put the merged contents in the subimage node's
# 'data' property later.
- entry = Entry.Create(self.section, node, etype='section')
+ entry = Entry.Create(self, node, etype='section')
entry.ReadNode()
# The hash subnodes here are for mkimage, not binman.
entry.SetUpdateHash(False)