summaryrefslogtreecommitdiffstats
path: root/tools/binman/image.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-07-08 14:25:43 -0600
committerSimon Glass <sjg@chromium.org>2019-07-24 12:54:08 -0700
commit41b8ba090ced0bb54733dc3dd32e945e7e332801 (patch)
treeba39478dfacd366f90de71001734414e5efc627f /tools/binman/image.py
parent8a1ad068deef6228fd501992bdb347ecad9da067 (diff)
downloadu-boot-41b8ba090ced0bb54733dc3dd32e945e7e332801.tar.gz
u-boot-41b8ba090ced0bb54733dc3dd32e945e7e332801.tar.xz
u-boot-41b8ba090ced0bb54733dc3dd32e945e7e332801.zip
binman: Allow listing the entries in an image
It is useful to be able to summarise all the entries in an image, e.g. to display this to this user. Add a new ListEntries() method to Entry, and set up a way to call it through the Image class. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/image.py')
-rw-r--r--tools/binman/image.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/binman/image.py b/tools/binman/image.py
index 6339d020e7..6f4bd5d37b 100644
--- a/tools/binman/image.py
+++ b/tools/binman/image.py
@@ -162,3 +162,13 @@ class Image:
file=fd)
self._section.WriteMap(fd, 0)
return fname
+
+ def BuildEntryList(self):
+ """List the files in an image
+
+ Returns:
+ List of entry.EntryInfo objects describing all entries in the image
+ """
+ entries = []
+ self._section.ListEntries(entries, 0)
+ return entries