]> git.dujemihanovic.xyz Git - u-boot.git/commit
binman: Create FIT subentries in the FIT section, not its parent
authorAlper Nebi Yasak <alpernebiyasak@gmail.com>
Sun, 27 Mar 2022 15:31:48 +0000 (18:31 +0300)
committerTom Rini <trini@konsulko.com>
Mon, 25 Apr 2022 14:11:05 +0000 (10:11 -0400)
commit74d3b2311deeefe0da8df75d16b8d839ba5ff2a4
tree8f9b8a5e538a1a085cea543b6728e70a61536f0f
parente736878b0865cdf963f02ec088b1df1d600ded20
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>
tools/binman/etype/fit.py
tools/binman/ftest.py
tools/binman/test/233_fit_extract_replace.dts [new file with mode: 0644]