summaryrefslogtreecommitdiff
path: root/tools/binman/image.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-09-14 04:57:33 -0600
committerSimon Glass <sjg@chromium.org>2018-09-29 11:49:35 -0600
commit08723a7abbc7e28b22d18684faf5142fc6f155e8 (patch)
tree92d53765f4f7704cae0e030122deee1f2cf92ea0 /tools/binman/image.py
parentf025363543636191cfc6d277733317cb0198189f (diff)
binman: Record the parent section of each section
At present sections have no record of their parent so it is not possible to traverse up the tree to the root and figure out the position of a section within the image. Change the constructor to record this information. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/image.py')
-rw-r--r--tools/binman/image.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/binman/image.py b/tools/binman/image.py
index 4b922b51c4..e113a60ac9 100644
--- a/tools/binman/image.py
+++ b/tools/binman/image.py
@@ -42,7 +42,8 @@ class Image:
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()
@@ -52,7 +53,7 @@ class Image:
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"""