summaryrefslogtreecommitdiff
path: root/tools/binman/control.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/binman/control.py')
-rw-r--r--tools/binman/control.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/binman/control.py b/tools/binman/control.py
index caa194c899..3446e2e79c 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -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()