diff options
author | Simon Glass <sjg@chromium.org> | 2022-01-09 20:13:58 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2022-01-25 12:36:11 -0700 |
commit | 5417da574e058efc66b471a3286cef5ac3bba1e1 (patch) | |
tree | 890d84ea3971fd2aaab90a4f8fd2734f946f6b3b /tools/binman/cbfs_util.py | |
parent | 56ee85eef11e6162e2626ba644c6de459137dd23 (diff) |
binman: Convert to using the CBFS bintool
Update the CBFS tests to use this bintool, instead of running cbfstool
directly. This simplifies the overall code and provides more consistency,
as well as supporting missing bintools.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/cbfs_util.py')
-rw-r--r-- | tools/binman/cbfs_util.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/tools/binman/cbfs_util.py b/tools/binman/cbfs_util.py index 39973371b93..00664bcf432 100644 --- a/tools/binman/cbfs_util.py +++ b/tools/binman/cbfs_util.py @@ -861,27 +861,3 @@ class CbfsReader(object): val += data[:pos] break return val.decode('utf-8') - - -def cbfstool(fname, *cbfs_args, **kwargs): - """Run cbfstool with provided arguments - - If the tool fails then this function raises an exception and prints out the - output and stderr. - - Args: - fname: Filename of CBFS - *cbfs_args: List of arguments to pass to cbfstool - - Returns: - CommandResult object containing the results - """ - args = ['cbfstool', fname] + list(cbfs_args) - if kwargs.get('base') is not None: - args += ['-b', '%#x' % kwargs['base']] - result = command.RunPipe([args], capture=not VERBOSE, - capture_stderr=not VERBOSE, raise_on_error=False) - if result.return_code: - print(result.stderr, file=sys.stderr) - raise Exception("Failed to run (error %d): '%s'" % - (result.return_code, ' '.join(args))) |