mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 01:02:19 +02: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:
@@ -163,9 +163,15 @@ def Binman(options, args):
|
||||
# completed and written, but that does not seem important.
|
||||
image.GetEntryContents()
|
||||
image.GetEntryOffsets()
|
||||
image.PackEntries()
|
||||
image.CheckSize()
|
||||
image.CheckEntries()
|
||||
try:
|
||||
image.PackEntries()
|
||||
image.CheckSize()
|
||||
image.CheckEntries()
|
||||
except Exception as e:
|
||||
if options.map:
|
||||
fname = image.WriteMap()
|
||||
print "Wrote map file '%s' to show errors" % fname
|
||||
raise
|
||||
image.SetImagePos()
|
||||
if options.update_fdt:
|
||||
image.SetCalculatedProperties()
|
||||
|
Reference in New Issue
Block a user