]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
binman: Write the compressed output to a file
authorSimon Glass <sjg@chromium.org>
Sat, 20 Jul 2024 10:49:37 +0000 (11:49 +0100)
committerSimon Glass <sjg@chromium.org>
Mon, 29 Jul 2024 14:42:18 +0000 (08:42 -0600)
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>
tools/binman/entry.py

index 219d5dcecab75b65b7e2a18de837c0796f880029..752c584c9a3cbd6e429042fe8da97d5d09590268 100644 (file)
@@ -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)