[U-Boot] [PATCH 036/126] binman: Add a base implementation of Entry.ReadChildData()

Simon Glass sjg at chromium.org
Wed Sep 25 14:56:20 UTC 2019

At present this function is not present in the Entry base class so it is
hard to find the documentation for it. Move the docs from the section
class and expand it a little.

Signed-off-by: Simon Glass <sjg at chromium.org>

 tools/binman/entry.py | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index 04c26f9e505..0e82065c291 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -720,6 +720,22 @@ features to produce new behaviours.
         data = self.section.ReadChildData(self, decomp)
         return data
+    def ReadChildData(self, child, decomp=True):
+        """Read the data for a particular child
+        This reads data from the parent and extracts the piece that relates to
+        the given child.
+        Args:
+            child: Child to read (must be valid)
+            decomp: True to decompress any compressed data before returning it;
+                False to return the raw, uncompressed data
+        Returns:
+            Data for the child (bytes)
+        """
+        pass
     def LoadData(self, decomp=True):
         data = self.ReadData(decomp)
         self.contents_size = len(data)

More information about the U-Boot mailing list