From: Lukas Funke Date: Tue, 18 Jul 2023 11:53:10 +0000 (+0200) Subject: binman: Don't decompress data while signing X-Git-Tag: v2025.01-rc5-pxa1908~924^2~89 X-Git-Url: http://git.dujemihanovic.xyz/img/static/gitweb.css?a=commitdiff_plain;h=7a52a45e3a20eb3a8b763ea2f820498b713576d1;p=u-boot.git binman: Don't decompress data while signing 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 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 Reviewed-by: Simon Glass --- diff --git a/tools/binman/control.py b/tools/binman/control.py index 25e6681483..d1ee1d69a9 100644 --- a/tools/binman/control.py +++ b/tools/binman/control.py @@ -308,8 +308,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.