mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
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>
This commit is contained in:
parent
eea264ead3
commit
f667e45b1c
5 changed files with 99 additions and 1 deletions
|
@ -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"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue