summaryrefslogtreecommitdiff
path: root/tools/binman/entry.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-10-27 02:40:16 +0300
committerSimon Glass <sjg@chromium.org>2020-10-29 23:42:59 +0300
commit63e7ba6c1820def06e7ba88ce357cb605285e70c (patch)
treee8a3e3bb89cf0ebc36299c683ce56fb52e6d722e /tools/binman/entry.py
parent97c3e9a6faa4483a700b26988bc48c2f9efe8dd6 (diff)
downloadu-boot-63e7ba6c1820def06e7ba88ce357cb605285e70c.tar.xz
binman: Set section contents in GetData()
Section contents is not set up when ObtainContents() is called, since packing often changes the layout of the contents. Ensure that the contents are correctly recorded by making this function regenerate the section. It is normally only called by the parent section (when packing) or by the top-level image code, when writing out the image. So the performance impact is fairly small. Now that sections have their contents in their 'data' property, update testSkipAtStartSectionPad() to check it. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/entry.py')
-rw-r--r--tools/binman/entry.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index d701eaff8f..01a5fde84e 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -437,6 +437,12 @@ class Entry(object):
return self._node.path
def GetData(self):
+ """Get the contents of an entry
+
+ Returns:
+ bytes content of the entry, excluding any padding. If the entry is
+ compressed, the compressed data is returned
+ """
self.Detail('GetData: size %s' % ToHexSize(self.data))
return self.data