mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
binman: Allow writing a map file when something goes wrong
When we get a problem like overlapping regions it is sometimes hard to figure what what is going on. At present we don't write the map file in this case. However the file does provide useful information. Catch any packing errors and write a map file (if enabled with -m) to aid debugging. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
fe1ae3ecc3
commit
163ed6c342
4 changed files with 46 additions and 8 deletions
|
@ -390,10 +390,17 @@ class Entry(object):
|
|||
"""
|
||||
pass
|
||||
|
||||
@staticmethod
|
||||
def GetStr(value):
|
||||
if value is None:
|
||||
return '<none> '
|
||||
return '%08x' % value
|
||||
|
||||
@staticmethod
|
||||
def WriteMapLine(fd, indent, name, offset, size, image_pos):
|
||||
print('%08x %s%08x %08x %s' % (image_pos, ' ' * indent, offset,
|
||||
size, name), file=fd)
|
||||
print('%s %s%s %s %s' % (Entry.GetStr(image_pos), ' ' * indent,
|
||||
Entry.GetStr(offset), Entry.GetStr(size),
|
||||
name), file=fd)
|
||||
|
||||
def WriteMap(self, fd, indent):
|
||||
"""Write a map of the entry to a .map file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue