[PATCH v3 02/27] binman: Document ExpandEntries() in the base class

Simon Glass sjg at chromium.org
Thu Mar 18 08:24:52 CET 2021


Move the documentation to the base method as it is with other methods.
Also update it a little while we are here.

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

(no changes since v1)

 tools/binman/entry.py         | 11 +++++++++++
 tools/binman/etype/section.py |  6 ------
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index d58a730f3d5..507760e2a86 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -211,6 +211,17 @@ class Entry(object):
         return {}
 
     def ExpandEntries(self):
+        """Expand out entries which produce other entries
+
+        Some entries generate subnodes automatically, from which sub-entries
+        are then created. This method allows those to be added to the binman
+        definition for the current image. An entry which implements this method
+        should call state.AddSubnode() to add a subnode and can add properties
+        with state.AddString(), etc.
+
+        An example is 'files', which produces a section containing a list of
+        files.
+        """
         pass
 
     def AddMissingProperties(self, have_image_pos):
diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py
index 1ceadef13f3..2103919b0c3 100644
--- a/tools/binman/etype/section.py
+++ b/tools/binman/etype/section.py
@@ -126,12 +126,6 @@ class Entry_section(Entry):
         return True
 
     def ExpandEntries(self):
-        """Expand out any entries which have calculated sub-entries
-
-        Some entries are expanded out at runtime, e.g. 'files', which produces
-        a section containing a list of files. Process these entries so that
-        this information is added to the device tree.
-        """
         super().ExpandEntries()
         for entry in self._entries.values():
             entry.ExpandEntries()
-- 
2.31.0.rc2.261.g7f71774620-goog



More information about the U-Boot mailing list