1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

binman: Refactor _BuildSectionData()

At present this function does the padding needed around an entry. It is
easier to understand what is going on if we have a function that returns
the contents of an entry, with padding included.

Refactor the code accordingly, adding a new GetPaddedData() method.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2020-10-26 17:40:12 -06:00
parent 17ea9f35e7
commit 4a655c9bd7
2 changed files with 51 additions and 10 deletions

View File

@@ -146,7 +146,7 @@ class Image(section.Entry_section):
fname = tools.GetOutputFilename(self._filename)
tout.Info("Writing image to '%s'" % fname)
with open(fname, 'wb') as fd:
data = self.GetData()
data = self.GetPaddedData()
fd.write(data)
tout.Info("Wrote %#x bytes" % len(data))