summaryrefslogtreecommitdiff
path: root/tools/binman/etype/section.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-07-24 15:42:06 +0300
committerTom Rini <trini@konsulko.com>2020-07-24 15:42:06 +0300
commit7208396bbf1df1c7a85d263b7ff054e6b45d8240 (patch)
tree41b20866e0a94e34ca76e54a2745ca7a5ba0889b /tools/binman/etype/section.py
parent5d3a21df6694ebd66d5c34c9d62a26edc7456fc7 (diff)
downloadu-boot-7208396bbf1df1c7a85d263b7ff054e6b45d8240.tar.xz
Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"
This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing changes made to 56d37f1c564107e27d873181d838571b7d7860e7. Unfortunately this is causing CI failures: https://travis-ci.org/github/trini/u-boot/jobs/711313649 Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'tools/binman/etype/section.py')
-rw-r--r--tools/binman/etype/section.py58
1 files changed, 11 insertions, 47 deletions
diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py
index 73c5553c81..91b8e0c110 100644
--- a/tools/binman/etype/section.py
+++ b/tools/binman/etype/section.py
@@ -34,11 +34,6 @@ class Entry_section(Entry):
name-prefix: Adds a prefix to the name of every entry in the section
when writing out the map
- Properties:
- _allow_missing: True if this section permits external blobs to be
- missing their contents. The second will produce an image but of
- course it will not work.
-
Since a section is also an entry, it inherits all the properies of entries
too.
@@ -48,18 +43,16 @@ class Entry_section(Entry):
"""
def __init__(self, section, etype, node, test=False):
if not test:
- super().__init__(section, etype, node)
+ Entry.__init__(self, section, etype, node)
self._entries = OrderedDict()
self._pad_byte = 0
self._sort = False
self._skip_at_start = None
self._end_4gb = False
- self._allow_missing = False
- self.missing = False
def ReadNode(self):
"""Read properties from the image node"""
- super().ReadNode()
+ Entry.ReadNode(self)
self._pad_byte = fdt_util.GetInt(self._node, 'pad-byte', 0)
self._sort = fdt_util.GetBool(self._node, 'sort-by-offset')
self._end_4gb = fdt_util.GetBool(self._node, 'end-at-4gb')
@@ -133,13 +126,13 @@ class Entry_section(Entry):
a section containing a list of files. Process these entries so that
this information is added to the device tree.
"""
- super().ExpandEntries()
+ Entry.ExpandEntries(self)
for entry in self._entries.values():
entry.ExpandEntries()
def AddMissingProperties(self):
"""Add new properties to the device tree as needed for this entry"""
- super().AddMissingProperties()
+ Entry.AddMissingProperties(self)
for entry in self._entries.values():
entry.AddMissingProperties()
@@ -175,14 +168,14 @@ class Entry_section(Entry):
def ResetForPack(self):
"""Reset offset/size fields so that packing can be done again"""
- super().ResetForPack()
+ Entry.ResetForPack(self)
for entry in self._entries.values():
entry.ResetForPack()
def Pack(self, offset):
"""Pack all entries into the section"""
self._PackEntries()
- return super().Pack(offset)
+ return Entry.Pack(self, offset)
def _PackEntries(self):
"""Pack all entries into the image"""
@@ -226,7 +219,7 @@ class Entry_section(Entry):
"at %#x (%d)" %
(entry.offset, entry.offset, self._skip_at_start,
self._skip_at_start))
- if entry.offset < offset and entry.size:
+ if entry.offset < offset:
entry.Raise("Offset %#x (%d) overlaps with previous entry '%s' "
"ending at %#x (%d)" %
(entry.offset, entry.offset, prev_name, offset, offset))
@@ -239,12 +232,12 @@ class Entry_section(Entry):
entry.WriteSymbols(self)
def SetCalculatedProperties(self):
- super().SetCalculatedProperties()
+ Entry.SetCalculatedProperties(self)
for entry in self._entries.values():
entry.SetCalculatedProperties()
def SetImagePos(self, image_pos):
- super().SetImagePos(image_pos)
+ Entry.SetImagePos(self, image_pos)
for entry in self._entries.values():
entry.SetImagePos(image_pos + self.offset)
@@ -442,8 +435,8 @@ class Entry_section(Entry):
if not entry:
self._Raise("Unable to set offset/size for unknown entry '%s'" %
name)
- entry.SetOffsetSize(self._skip_at_start + offset if offset is not None
- else None, size)
+ entry.SetOffsetSize(self._skip_at_start + offset if offset else None,
+ size)
def GetEntryOffsets(self):
"""Handle entries that want to set the offset/size of other entries
@@ -542,32 +535,3 @@ class Entry_section(Entry):
def WriteChildData(self, child):
return True
-
- def SetAllowMissing(self, allow_missing):
- """Set whether a section allows missing external blobs
-
- Args:
- allow_missing: True if allowed, False if not allowed
- """
- self._allow_missing = allow_missing
- for entry in self._entries.values():
- entry.SetAllowMissing(allow_missing)
-
- def GetAllowMissing(self):
- """Get whether a section allows missing external blobs
-
- Returns:
- True if allowed, False if not allowed
- """
- return self._allow_missing
-
- def CheckMissing(self, missing_list):
- """Check if any entries in this section have missing external blobs
-
- If there are missing blobs, the entries are added to the list
-
- Args:
- missing_list: List of Entry objects to be added to
- """
- for entry in self._entries.values():
- entry.CheckMissing(missing_list)