]> git.ipfire.org Git - thirdparty/u-boot.git/commit
binman: Use the actual contents in CheckSize()
authorSimon Glass <sjg@chromium.org>
Mon, 26 Oct 2020 23:40:24 +0000 (17:40 -0600)
committerSimon Glass <sjg@chromium.org>
Thu, 29 Oct 2020 20:42:59 +0000 (14:42 -0600)
commit0ff83da634c4e4a8e510c5b2434cab88cb33c164
tree6c57bb759292d9b3825b17907e4afe6846741e98
parentb004bf3906e6f80b80558424e4a3ed8767103e37
binman: Use the actual contents in CheckSize()

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>
tools/binman/etype/section.py
tools/binman/ftest.py