diff options
| author | Simon Glass <sjg@chromium.org> | 2024-07-20 11:49:37 +0100 |
|---|---|---|
| committer | Simon Glass <sjg@chromium.org> | 2024-07-29 08:42:18 -0600 |
| commit | d720be4766e91459e92197d9b112958e943d66c3 (patch) | |
| tree | 60bf8612c096bb4c85d6067a13b7af4105f21f3b | |
| parent | 9b37db6b770fa0e001d9526edd43f23b8b4c6368 (diff) | |
binman: Write the compressed output to a file
When an entry is compressed, write the compressed contents to a file so
that it is possible to see what was produced. This aids debugging with
new images.
Signed-off-by: Simon Glass <sjg@chromium.org>
| -rw-r--r-- | tools/binman/entry.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py index 219d5dcecab..752c584c9a3 100644 --- a/tools/binman/entry.py +++ b/tools/binman/entry.py @@ -1199,6 +1199,9 @@ features to produce new behaviours. self.uncomp_size = len(indata) if self.comp_bintool.is_present(): data = self.comp_bintool.compress(indata) + uniq = self.GetUniqueName() + fname = tools.get_output_filename(f'comp.{uniq}') + tools.write_file(fname, data) else: self.record_missing_bintool(self.comp_bintool) data = tools.get_bytes(0, 1024) |
