summaryrefslogtreecommitdiff
path: root/tools/binman/image.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/binman/image.py')
-rw-r--r--tools/binman/image.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/binman/image.py b/tools/binman/image.py
index 74bc46fd30..835b66c99f 100644
--- a/tools/binman/image.py
+++ b/tools/binman/image.py
@@ -98,3 +98,11 @@ class Image:
def GetEntries(self):
return self._section.GetEntries()
+
+ def WriteMap(self):
+ """Write a map of the image to a .map file"""
+ filename = '%s.map' % self._name
+ fname = tools.GetOutputFilename(filename)
+ with open(fname, 'w') as fd:
+ print('%8s %8s %s' % ('Position', 'Size', 'Name'), file=fd)
+ self._section.WriteMap(fd, 0)