[PATCH 03/12] binman: Don't decompress data while signing
Simon Glass
sjg at chromium.org
Thu Jun 29 21:10:10 CEST 2023
Hi,
On Thu, 29 Jun 2023 at 15:59, <lukas.funke-oss at weidmueller.com> wrote:
>
> From: Lukas Funke <lukas.funke at weidmueller.com>
>
> While signing a fit compressed data (i.e. 'blob-ext') is decompressed,
> but never compressed again. When compressed data was wrapped in a
> section, decompression leads to an error because the outer section had
> the original compressed size but the inner entry has the
> uncompressed size now.
>
> While singing there is no reason to decompress data. Thus, decompression
signing ?
> should be disabled.
>
> Furthermore, bintools should be collected before loading the data. This
> way bintools are available if processing is required on a node.
>
> Signed-off-by: Lukas Funke <lukas.funke at weidmueller.com>
> ---
>
> tools/binman/control.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
>
> diff --git a/tools/binman/control.py b/tools/binman/control.py
> index 68597c4e77..affc33ff3d 100644
> --- a/tools/binman/control.py
> +++ b/tools/binman/control.py
> @@ -306,8 +306,8 @@ def BeforeReplace(image, allow_resize):
> image: Image to prepare
> """
> state.PrepareFromLoadedData(image)
> - image.LoadData()
> image.CollectBintools()
> + image.LoadData(decomp=False)
>
> # If repacking, drop the old offset/size values except for the original
> # ones, so we are only left with the constraints.
> --
> 2.30.2
>
More information about the U-Boot
mailing list