binman: Fix subentry expansion for FIT entry type
authorAlper Nebi Yasak <alpernebiyasak@gmail.com>
Mon, 7 Feb 2022 22:08:04 +0000 (01:08 +0300)
committerSimon Glass <sjg@chromium.org>
Wed, 9 Feb 2022 19:30:13 +0000 (12:30 -0700)
commit21353311ffe9bf28e168ab7d69ec670f0093cf96
treeb0ab914737256323a4e71f0394c7ca2903db26a1
parent058fb9f5ffc422f987c33adb01f8fa6e4434eff8
binman: Fix subentry expansion for FIT entry type

Binman tries to expand some entries into parts that make it up, e.g.
'u-boot' into a 'u-boot-expanded' section that contains 'u-boot-nodtb'
and 'u-boot-dtb'. Entries with child entries must call ExpandEntries()
on them to build a correct image, as it's possible that unexpanded child
entries have no data of their own. The FIT entry type doesn't currently
do this, which means putting a "u-boot" entry inside it doesn't work as
expected.

Implement ExpandEntries() for FIT and add a copy of a simple FIT image
test that checks subentry expansion in FIT entries.

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