aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-11-23 11:03:52 -0700
committerSimon Glass <sjg@chromium.org>2021-12-02 09:16:30 -0700
commit3fc20fd8055f59137293e487244d8b3d885bbbe5 (patch)
tree79ab5f2dcdc6df3286e94b4392276e0b329ffc30
parent080f859cf180e860ec5f3c8b7940820c5a32b02a (diff)
downloadu-boot-3fc20fd8055f59137293e487244d8b3d885bbbe5.zip
u-boot-3fc20fd8055f59137293e487244d8b3d885bbbe5.tar.gz
u-boot-3fc20fd8055f59137293e487244d8b3d885bbbe5.tar.bz2
binman: cbfs: Refactor the init process
Update the constructor to work in the recommended way, where the node properties are read in a separate function. This makes it more similar to entry_Section. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--tools/binman/etype/cbfs.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/binman/etype/cbfs.py b/tools/binman/etype/cbfs.py
index 873b199..a512012 100644
--- a/tools/binman/etype/cbfs.py
+++ b/tools/binman/etype/cbfs.py
@@ -168,12 +168,16 @@ class Entry_cbfs(Entry):
from binman import state
super().__init__(section, etype, node)
- self._cbfs_arg = fdt_util.GetString(node, 'cbfs-arch', 'x86')
self.align_default = None
self._entries = OrderedDict()
- self.ReadEntries()
self.reader = None
+ def ReadNode(self):
+ """Read properties from the atf-fip node"""
+ super().ReadNode()
+ self._cbfs_arg = fdt_util.GetString(self._node, 'cbfs-arch', 'x86')
+ self.ReadEntries()
+
def ReadEntries(self):
"""Read the subnodes to find out what should go in this CBFS"""
for node in self._node.subnodes: