]> git.baikalelectronics.ru Git - uboot.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)
commit89da7369b85e1be24697d3277b9713d4e5613232
tree6c57bb759292d9b3825b17907e4afe6846741e98
parent39a0ba44152b443d8a9585135cb47ad211723023
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