aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-11-23 11:03:51 -0700
committerSimon Glass <sjg@chromium.org>2021-12-02 09:16:30 -0700
commit080f859cf180e860ec5f3c8b7940820c5a32b02a (patch)
tree0f994ee34df735e649dd303cf62104c84aa45e3f /tools
parent8cb069ab7467cd4b0a1a4f3fa18ed358c9179557 (diff)
downloadu-boot-080f859cf180e860ec5f3c8b7940820c5a32b02a.zip
u-boot-080f859cf180e860ec5f3c8b7940820c5a32b02a.tar.gz
u-boot-080f859cf180e860ec5f3c8b7940820c5a32b02a.tar.bz2
binman: Use normal entries in cbfs
This currently uses _cbfs_entries[] to store entries. Since the entries are in fact valid etypes, we may as well use the same name as entry_Section uses, which is _entries. This allows reusing more of the code there (in a future patch). Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/binman/etype/cbfs.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/binman/etype/cbfs.py b/tools/binman/etype/cbfs.py
index 9e04897..873b199 100644
--- a/tools/binman/etype/cbfs.py
+++ b/tools/binman/etype/cbfs.py
@@ -170,7 +170,7 @@ class Entry_cbfs(Entry):
super().__init__(section, etype, node)
self._cbfs_arg = fdt_util.GetString(node, 'cbfs-arch', 'x86')
self.align_default = None
- self._cbfs_entries = OrderedDict()
+ self._entries = OrderedDict()
self.ReadEntries()
self.reader = None
@@ -187,7 +187,7 @@ class Entry_cbfs(Entry):
if entry._cbfs_compress is None:
self.Raise("Invalid compression in '%s': '%s'" %
(node.name, compress))
- self._cbfs_entries[entry._cbfs_name] = entry
+ self._entries[entry._cbfs_name] = entry
def ObtainContents(self, skip=None):
arch = cbfs_util.find_arch(self._cbfs_arg)
@@ -196,7 +196,7 @@ class Entry_cbfs(Entry):
if self.size is None:
self.Raise("'cbfs' entry must have a size property")
cbfs = CbfsWriter(self.size, arch)
- for entry in self._cbfs_entries.values():
+ for entry in self._entries.values():
# First get the input data and put it in a file. If not available,
# try later.
if entry != skip and not entry.ObtainContents():
@@ -230,7 +230,7 @@ class Entry_cbfs(Entry):
super().SetImagePos(image_pos)
# Now update the entries with info from the CBFS entries
- for entry in self._cbfs_entries.values():
+ for entry in self._entries.values():
cfile = entry._cbfs_file
entry.size = cfile.data_len
entry.offset = cfile.calced_cbfs_offset
@@ -240,7 +240,7 @@ class Entry_cbfs(Entry):
def AddMissingProperties(self, have_image_pos):
super().AddMissingProperties(have_image_pos)
- for entry in self._cbfs_entries.values():
+ for entry in self._entries.values():
entry.AddMissingProperties(have_image_pos)
if entry._cbfs_compress:
state.AddZeroProp(entry._node, 'uncomp-size')
@@ -252,7 +252,7 @@ class Entry_cbfs(Entry):
def SetCalculatedProperties(self):
"""Set the value of device-tree properties calculated by binman"""
super().SetCalculatedProperties()
- for entry in self._cbfs_entries.values():
+ for entry in self._entries.values():
state.SetInt(entry._node, 'offset', entry.offset)
state.SetInt(entry._node, 'size', entry.size)
state.SetInt(entry._node, 'image-pos', entry.image_pos)
@@ -262,11 +262,11 @@ class Entry_cbfs(Entry):
def ListEntries(self, entries, indent):
"""Override this method to list all files in the section"""
super().ListEntries(entries, indent)
- for entry in self._cbfs_entries.values():
+ for entry in self._entries.values():
entry.ListEntries(entries, indent + 1)
def GetEntries(self):
- return self._cbfs_entries
+ return self._entries
def ReadData(self, decomp=True):
data = super().ReadData(True)