binman: Allow for logging information to be displayed

Binman generally operates silently but in some cases it is useful to see
what Binman is actually doing at each step. Enable some logging output
with different logging levels selectable via the -v flag.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2019-07-08 14:25:49 -06:00
parent 61f564d15f
commit eea264ead3
4 changed files with 31 additions and 4 deletions

View file

@ -23,6 +23,7 @@ import sys
import fdt_util
import state
import tools
import tout
modules = {}
@ -272,7 +273,7 @@ class Entry(object):
new_size = len(data)
if state.AllowEntryExpansion():
if new_size > self.contents_size:
print("Entry '%s' size change from %#x to %#x" % (
tout.Debug("Entry '%s' size change from %#x to %#x" % (
self._node.path, self.contents_size, new_size))
# self.data will indicate the new size needed
size_ok = False