mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-19 21:51:25 +02:00
binman: Adjust mkimage etype node reading
Since this is implemented as a section, it should really be split into several functions, one to read the node and one to read the entries. Do this so that it matches how Entry_section works. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
cdadadab7d
commit
1c65a54d6d
@ -45,11 +45,21 @@ class Entry_mkimage(Entry):
|
|||||||
"""
|
"""
|
||||||
def __init__(self, section, etype, node):
|
def __init__(self, section, etype, node):
|
||||||
super().__init__(section, etype, node)
|
super().__init__(section, etype, node)
|
||||||
self._args = fdt_util.GetArgs(self._node, 'args')
|
|
||||||
self._mkimage_entries = OrderedDict()
|
self._mkimage_entries = OrderedDict()
|
||||||
self.align_default = None
|
self.align_default = None
|
||||||
|
|
||||||
|
def ReadNode(self):
|
||||||
|
super().ReadNode()
|
||||||
|
self._args = fdt_util.GetArgs(self._node, 'args')
|
||||||
self.ReadEntries()
|
self.ReadEntries()
|
||||||
|
|
||||||
|
def ReadEntries(self):
|
||||||
|
"""Read the subnodes to find out what should go in this image"""
|
||||||
|
for node in self._node.subnodes:
|
||||||
|
entry = Entry.Create(self, node)
|
||||||
|
entry.ReadNode()
|
||||||
|
self._mkimage_entries[entry.name] = entry
|
||||||
|
|
||||||
def ObtainContents(self):
|
def ObtainContents(self):
|
||||||
# Use a non-zero size for any fake files to keep mkimage happy
|
# Use a non-zero size for any fake files to keep mkimage happy
|
||||||
data, input_fname, uniq = self.collect_contents_to_file(
|
data, input_fname, uniq = self.collect_contents_to_file(
|
||||||
@ -67,13 +77,6 @@ class Entry_mkimage(Entry):
|
|||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def ReadEntries(self):
|
|
||||||
"""Read the subnodes to find out what should go in this image"""
|
|
||||||
for node in self._node.subnodes:
|
|
||||||
entry = Entry.Create(self, node)
|
|
||||||
entry.ReadNode()
|
|
||||||
self._mkimage_entries[entry.name] = entry
|
|
||||||
|
|
||||||
def SetAllowMissing(self, allow_missing):
|
def SetAllowMissing(self, allow_missing):
|
||||||
"""Set whether a section allows missing external blobs
|
"""Set whether a section allows missing external blobs
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user