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>
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user