diff options
author | Simon Glass <sjg@chromium.org> | 2019-07-20 12:23:41 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-07-29 09:38:05 -0600 |
commit | d5079330f588a1aeedc734197124543bbc4e2d3c (patch) | |
tree | 0247b9faeb43b805280d44d81e7a186961bc1250 /tools/binman/entry.py | |
parent | 589d8f917e718f702142d1fdba51723d45237b44 (diff) | |
download | u-boot-d5079330f588a1aeedc734197124543bbc4e2d3c.zip u-boot-d5079330f588a1aeedc734197124543bbc4e2d3c.tar.gz u-boot-d5079330f588a1aeedc734197124543bbc4e2d3c.tar.bz2 |
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>
Diffstat (limited to 'tools/binman/entry.py')
-rw-r--r-- | tools/binman/entry.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py index e3c6434..6436384 100644 --- a/tools/binman/entry.py +++ b/tools/binman/entry.py @@ -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)) |