
On Wed, 9 Feb 2022 at 12:02, Alper Nebi Yasak alpernebiyasak@gmail.com wrote:
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
This applies on top of u-boot-dm/master, and does not resend my "binman: Update image positions of FIT subentries" patch [1] which should be applied on top of this.
[1] https://patchwork.ozlabs.org/project/uboot/patch/20220207220809.4497-6-alper...
Changes in v2:
- Set update_hash via a SetUpdateHash() method
- Add a test using hash nodes in FIT subentries
v1: https://patchwork.ozlabs.org/project/uboot/patch/20220208230656.43504-1-alpe...
tools/binman/entry.py | 23 +++++++-- tools/binman/etype/fit.py | 12 +---- tools/binman/ftest.py | 24 ++++++++++ tools/binman/test/221_fit_subentry_hash.dts | 52 +++++++++++++++++++++ 4 files changed, 97 insertions(+), 14 deletions(-) create mode 100644 tools/binman/test/221_fit_subentry_hash.dts
Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot-dm, thanks!