summaryrefslogtreecommitdiff
path: root/tools/binman/btool/btool_gzip.py
AgeCommit message (Collapse)Author
2022-11-22Revert "binman: btool: gzip: fix packer name so that binary can be found"Quentin Schulz
This reverts commit daa2da754afe1bac777f6cb0f05233e0de7b325d. This commit is not needed anymore since the btool_ prefix is automatically stripped by bintool. Cc: Quentin Schulz <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-11-22binman: bintool: remove btool_ prefix from btool namesQuentin Schulz
The binary is looked on the system by the suffix of the packer class. This means binman was looking for btool_gzip on the system and not gzip. Since a btool can have its btool_ prefix missing but its module and binary presence on the system appropriately found, there's no need to actually keep this prefix after listing all possible btools, so let's remove it. This fixes gzip btool by letting Bintool.find_bintool_class handle the missing prefix and still return the correct class which is then init with gzip name instead of btool_gzip. Additionally, there was an issue with the cached module global variable. The variable only stores the module and not the associated class name when calling find_bintool_class. This means that when caching the module on the first call to find_bintool_class, class_name would be set to Bintoolbtool_gzip but the module_name gzip only, adding the module in the gzip key in the module dictionary. When hitting the cache on next calls, the gzip key would be found, so its value (the module) is used. However the default class_name (Bintoolgzip) is used, failing the getattr call. Instead, let's enforce the same class name: Bintool<packer>, whatever the filename it is contained in. Cc: Quentin Schulz <[email protected]> Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-09-01binman: btool: gzip: fix packer name so that binary can be foundQuentin Schulz
The binary is looked on the system by the suffix of the packer class. This means binman was looking for btool_gzip on the system and not gzip. Therefore, let's pass "gzip" as the name so that it can be found and used. Fixes: 0f369d79925a ("binman: Add gzip bintool") Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-08-20binman: Add gzip bintoolStefan Herbrechtsmeier
Add gzip bintool to binman to support on-the-fly compression of Linux kernel images and FPGA bitstreams. The SPL basic fitImage implementation supports only gzip decompression. Signed-off-by: Stefan Herbrechtsmeier <[email protected]> Reviewed-by: Simon Glass <[email protected]> Rename the module and support this, since gzip.py is a system module: Signed-off-by: Simon Glass <[email protected]>