Attributes:
_node: Node object that contains the section definition in device tree
+ _parent_section: Parent Section object which created this Section
_size: Section size in bytes, or None if not known yet
_align_size: Section size alignment, or None
_pad_before: Number of bytes before the first entry starts. This
section
_entries: OrderedDict() of entries
"""
- def __init__(self, name, node, test=False):
+ def __init__(self, name, parent_section, node, image, test=False):
global entry
global Entry
import entry
from entry import Entry
+ self._parent_section = parent_section
self._name = name
self._node = node
+ self._image = image
self._offset = 0
self._size = None
self._align_size = None
"""
def __init__(self, section, etype, node):
Entry.__init__(self, section, etype, node)
- self._section = bsection.Section(node.name, node)
+ self._section = bsection.Section(node.name, section, node,
+ section._image)
def GetFdtSet(self):
return self._section.GetFdtSet()
self._size = None
self._filename = '%s.bin' % self._name
if test:
- self._section = bsection.Section('main-section', self._node, True)
+ self._section = bsection.Section('main-section', None, self._node,
+ self, True)
else:
self._ReadNode()
filename = fdt_util.GetString(self._node, 'filename')
if filename:
self._filename = filename
- self._section = bsection.Section('main-section', self._node)
+ self._section = bsection.Section('main-section', None, self._node, self)
def GetFdtSet(self):
"""Get the set of device tree files used by this image"""