[PATCH v3 16/26] binman: Update fit to move node reading into the ReadNode() method

Simon Glass sjg at chromium.org
Sun Mar 6 04:19:07 CET 2022


This should not be done in the constructor. Move it.

Signed-off-by: Simon Glass <sjg at chromium.org>
Suggested-by: Alper Nebi Yasak <alpernebiyasak at gmail.com>
---

(no changes since v1)

 tools/binman/etype/fit.py | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/tools/binman/etype/fit.py b/tools/binman/etype/fit.py
index 8c37e0a77f..4c0e345a4e 100644
--- a/tools/binman/etype/fit.py
+++ b/tools/binman/etype/fit.py
@@ -168,12 +168,14 @@ class Entry_fit(Entry_section):
         super().__init__(section, etype, node)
         self._fit = None
         self._fit_props = {}
+        self._fdts = None
+        self.mkimage = None
 
+    def ReadNode(self):
+        super().ReadNode()
         for pname, prop in self._node.props.items():
             if pname.startswith('fit,'):
                 self._fit_props[pname] = prop
-
-        self._fdts = None
         self._fit_list_prop = self._fit_props.get('fit,fdt-list')
         if self._fit_list_prop:
             fdts, = self.GetEntryArgsOrProps(
@@ -182,10 +184,6 @@ class Entry_fit(Entry_section):
                 self._fdts = fdts.split()
         self._fit_default_dt = self.GetEntryArgsOrProps([EntryArg('default-dt',
                                                                   str)])[0]
-        self.mkimage = None
-
-    def ReadNode(self):
-        super().ReadNode()
 
     def _get_operation(self, subnode):
         """Get the operation referenced by a subnode
-- 
2.35.1.616.g0bdcbb4464-goog



More information about the U-Boot mailing list