diff options
author | Jonas Karlman | 2023-07-18 20:34:35 +0000 |
---|---|---|
committer | Simon Glass | 2023-08-02 12:05:57 -0600 |
commit | d92c4dd27dd0f155040fce5ba96f8f2d93c4fa24 (patch) | |
tree | 44fe95a8cbfc0c33b08a9568eb9024784211e5e5 /tools | |
parent | 05dec37488e27da292c8ff51e936b46eac708bd4 (diff) |
binman: Report missing external blobs using error level
Print missing external blobs using error level and missing optional
external blobs using warning level. Also change to only print the header
line in color, red for missing and yellow for optional.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/binman/control.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/binman/control.py b/tools/binman/control.py index 8bc666a0c7c..af679475e52 100644 --- a/tools/binman/control.py +++ b/tools/binman/control.py @@ -112,12 +112,12 @@ def _ReadMissingBlobHelp(): _FinishTag(tag, msg, result) return result -def _ShowBlobHelp(path, text): - tout.warning('\n%s:' % path) +def _ShowBlobHelp(level, path, text): + tout.do_output(level, '\n%s:' % path) for line in text.splitlines(): - tout.warning(' %s' % line) + tout.do_output(level, ' %s' % line) -def _ShowHelpForMissingBlobs(missing_list): +def _ShowHelpForMissingBlobs(level, missing_list): """Show help for each missing blob to help the user take action Args: @@ -134,7 +134,7 @@ def _ShowHelpForMissingBlobs(missing_list): # Show the first match help message for tag in tags: if tag in missing_blob_help: - _ShowBlobHelp(entry._node.path, missing_blob_help[tag]) + _ShowBlobHelp(level, entry._node.path, missing_blob_help[tag]) break def GetEntryModules(include_testing=True): @@ -658,9 +658,9 @@ def ProcessImage(image, update_fdt, write_map, get_contents=True, missing_list = [] image.CheckMissing(missing_list) if missing_list: - tout.warning("Image '%s' is missing external blobs and is non-functional: %s" % - (image.name, ' '.join([e.name for e in missing_list]))) - _ShowHelpForMissingBlobs(missing_list) + tout.error("Image '%s' is missing external blobs and is non-functional: %s" % + (image.name, ' '.join([e.name for e in missing_list]))) + _ShowHelpForMissingBlobs(tout.ERROR, missing_list) faked_list = [] image.CheckFakedBlobs(faked_list) @@ -676,7 +676,7 @@ def ProcessImage(image, update_fdt, write_map, get_contents=True, tout.warning( "Image '%s' is missing optional external blobs but is still functional: %s" % (image.name, ' '.join([e.name for e in optional_list]))) - _ShowHelpForMissingBlobs(optional_list) + _ShowHelpForMissingBlobs(tout.WARNING, optional_list) missing_bintool_list = [] image.check_missing_bintools(missing_bintool_list) |