diff options
author | Simon Glass <sjg@chromium.org> | 2019-07-20 12:23:36 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-07-29 09:38:05 -0600 |
commit | 9f297b09c06f2212cb59dac5950ae61de5fe3a9f (patch) | |
tree | 2f63132f9076b2a41511bd0e72fafcf1fe5d5680 /tools/patman | |
parent | fd07336211c3b3088dce20b1c22a99e6303c68c2 (diff) | |
download | u-boot-9f297b09c06f2212cb59dac5950ae61de5fe3a9f.tar.gz |
binman: Add a bit of logging in entries when packing
Use the new logging feature to log information about progress with
packing. This is useful to see how binman is figuring things out.
Also update elf.py to use the same feature.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman')
-rw-r--r-- | tools/patman/tools.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/patman/tools.py b/tools/patman/tools.py index e945b54fa2..f492dc8f8e 100644 --- a/tools/patman/tools.py +++ b/tools/patman/tools.py @@ -473,3 +473,19 @@ def RunIfwiTool(ifwi_file, cmd, fname=None, subpart=None, entry_name=None): if entry_name: args += ['-d', '-e', entry_name] Run(*args) + +def ToHex(val): + """Convert an integer value (or None) to a string + + Returns: + hex value, or 'None' if the value is None + """ + return 'None' if val is None else '%#x' % val + +def ToHexSize(val): + """Return the size of an object in hex + + Returns: + hex value of size, or 'None' if the value is None + """ + return 'None' if val is None else '%#x' % len(val) |