aboutsummaryrefslogtreecommitdiff
path: root/tools/binman/entry.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-07-17 13:25:28 -0600
committerSimon Glass <sjg@chromium.org>2018-08-01 16:30:07 -0600
commit8122f3967f6eaab7134051d1d8c9b1bfc3babadb (patch)
tree370eb5697e7f8f2d0613c407d86c546eecc66280 /tools/binman/entry.py
parentea6922e3d6a1b6b73d7baef4998f8bef0fe332ad (diff)
downloadu-boot-8122f3967f6eaab7134051d1d8c9b1bfc3babadb.zip
u-boot-8122f3967f6eaab7134051d1d8c9b1bfc3babadb.tar.gz
u-boot-8122f3967f6eaab7134051d1d8c9b1bfc3babadb.tar.bz2
binman: Enhance the map and fdt-update output
At present the .map file produced for each image does not include the overall image size. This is useful information. Update the code to generate it in the .map file as well as the updated FDT. Also fix a few comments while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/entry.py')
-rw-r--r--tools/binman/entry.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index c9529d8..cb693c9 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -36,7 +36,7 @@ class Entry(object):
Entry.
Attributes:
- section: The section containing this entry
+ section: Section object containing this entry
node: The node that created this entry
offset: Offset of entry within the section, None if not known yet (in
which case it will be calculated by Pack())
@@ -72,7 +72,7 @@ class Entry(object):
"""Create a new entry for a node.
Args:
- section: Image object containing this node
+ section: Section object containing this node
node: Node object containing information about the entry to create
etype: Entry type to use, or None to work it out (used for tests)
@@ -133,7 +133,7 @@ class Entry(object):
def AddMissingProperties(self):
"""Add new properties to the device tree as needed for this entry"""
- for prop in ['offset', 'size', 'global-pos']:
+ for prop in ['offset', 'size']:
if not prop in self._node.props:
self._node.AddZeroProp(prop)
@@ -285,6 +285,10 @@ class Entry(object):
"""
pass
+ @staticmethod
+ def WriteMapLine(fd, indent, name, offset, size):
+ print('%s%08x %08x %s' % (' ' * indent, offset, size, name), file=fd)
+
def WriteMap(self, fd, indent):
"""Write a map of the entry to a .map file
@@ -292,5 +296,4 @@ class Entry(object):
fd: File to write the map to
indent: Curent indent level of map (0=none, 1=one level, etc.)
"""
- print('%s%08x %08x %s' % (' ' * indent, self.offset, self.size,
- self.name), file=fd)
+ self.WriteMapLine(fd, indent, self.name, self.offset, self.size)