diff options
author | Simon Glass <sjg@chromium.org> | 2019-07-08 14:25:50 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-07-24 12:54:08 -0700 |
commit | f667e45b1c0a7f21d433ee8f3ec18858d87dd2e5 (patch) | |
tree | ae849665f80553e7689976d578e90250545f5423 /tools/binman/image.py | |
parent | eea264ead3ca198ed66f62a78dc4940075621ae7 (diff) |
binman: Allow reading an entry from an image
It is useful to be able to extract entry contents from an image to see
what is inside. Add a simple function to read the contents of an entry,
decompressing it by default.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/image.py')
-rw-r--r-- | tools/binman/image.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/binman/image.py b/tools/binman/image.py index bbb5e23c3b..fb6e591ca6 100644 --- a/tools/binman/image.py +++ b/tools/binman/image.py @@ -82,7 +82,9 @@ class Image(section.Entry_section): dtb.Scan() # Return an Image with the associated nodes - return Image('image', dtb.GetRoot()) + image = Image('image', dtb.GetRoot()) + image._data = data + return image def Raise(self, msg): """Convenience function to raise an error referencing an image""" |