[PATCH v2 26/28] binman: Use the actual contents in CheckSize()

Simon Glass sjg at chromium.org
Fri Oct 30 04:33:40 CET 2020


At present this function adds up the total size of entries to work out the
size of a section's contents. With compression this is no-longer enough.

We may as well bite the bullet and build the section contents instead.
Call _BuildSectionData() to get the (possibly compressed) contents and
GetPaddedData() to get the same but with padding added.

Note that this is inefficient since the section contents is calculated
twice. Future work will improve this.

This affects testPackOverlapMap() since the error is reported with a
different section size now (enough to hold the contents). Update that at
the same time.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 tools/binman/etype/section.py | 11 ++++-------
 tools/binman/ftest.py         |  2 +-
 2 files changed, 5 insertions(+), 8 deletions(-)

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list