
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@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!