aboutsummaryrefslogtreecommitdiff
path: root/tools/binman/entry.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-07-17 13:25:49 -0600
committerSimon Glass <sjg@chromium.org>2018-08-01 16:30:48 -0600
commit1be70d20d8466c287cd1dc6f590171794ba67f07 (patch)
treea323c2b411d8f721403d99bb48c036d456419ae6 /tools/binman/entry.py
parentb8ef5b6bc871e12d036869172aa3599f5be7ee09 (diff)
downloadu-boot-1be70d20d8466c287cd1dc6f590171794ba67f07.zip
u-boot-1be70d20d8466c287cd1dc6f590171794ba67f07.tar.gz
u-boot-1be70d20d8466c287cd1dc6f590171794ba67f07.tar.bz2
binman: Show the image position in the map
At present the map only shows the offset and size for each region. The image position provides the actual position of each entry in the image, regardless of the section hierarchy. Add the image position to the map. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/entry.py')
-rw-r--r--tools/binman/entry.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index 996f03e..6ce5dbd 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -349,8 +349,9 @@ class Entry(object):
pass
@staticmethod
- def WriteMapLine(fd, indent, name, offset, size):
- print('%s%08x %08x %s' % (' ' * indent, offset, size, name), file=fd)
+ def WriteMapLine(fd, indent, name, offset, size, image_pos):
+ print('%08x %s%08x %08x %s' % (image_pos, ' ' * indent, offset,
+ size, name), file=fd)
def WriteMap(self, fd, indent):
"""Write a map of the entry to a .map file
@@ -359,7 +360,8 @@ class Entry(object):
fd: File to write the map to
indent: Curent indent level of map (0=none, 1=one level, etc.)
"""
- self.WriteMapLine(fd, indent, self.name, self.offset, self.size)
+ self.WriteMapLine(fd, indent, self.name, self.offset, self.size,
+ self.image_pos)
def GetEntries(self):
"""Return a list of entries contained by this entry