[PATCH 07/20] binman: Write the compressed output to a file

Neha Malcom Francis n-francis at ti.com
Tue Jul 30 06:32:01 CEST 2024


On 20/07/24 16:19, Simon Glass wrote:
> 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 at chromium.org>
> ---
> 
>   tools/binman/entry.py | 3 +++
>   1 file changed, 3 insertions(+)
> 
> 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)

Reviewed-by: Neha Malcom Francis <n-francis at ti.com>

-- 
Thanking You
Neha Malcom Francis


More information about the U-Boot mailing list