binman: Allow listing the entries in an image
[oweals/u-boot.git] / tools / binman / image.py
index 6339d020e766dedc48e14826a8e5ee560501fd6c..6f4bd5d37b252a707d7e8efeaa52fa1fb1693b82 100644 (file)
@@ -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