1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-02 17:22:22 +02:00

binman: Support loading entry data from a file

When modifying an image it is convenient to load the data from the file
into each entry so that it can be reprocessed. Add a new LoadData() method
to handle this.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2019-07-20 12:23:41 -06:00
parent 589d8f917e
commit d5079330f5
2 changed files with 10 additions and 0 deletions

View File

@@ -695,3 +695,8 @@ features to produce new behaviours.
(self.GetPath(), self.offset, self.offset + self.size,
self.size, len(data)))
return data[self.offset:self.offset + self.size]
def LoadData(self, decomp=True):
data = self.ReadData(decomp)
self.ProcessContentsUpdate(data)
self.Detail('Loaded data size %x' % len(data))