From f667e45b1c0a7f21d433ee8f3ec18858d87dd2e5 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 8 Jul 2019 14:25:50 -0600 Subject: 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 --- tools/binman/image.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools/binman/image.py') 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""" -- cgit