[PATCH v2] binman: bintool: remove btool_ prefix from btool names
Quentin Schulz
foss+uboot at 0leil.net
Thu Sep 1 16:43:48 CEST 2022
From: Quentin Schulz <quentin.schulz at theobroma-systems.com>
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.
Fixes: 0f369d79925a ("binman: Add gzip bintool")
Cc: Quentin Schulz <foss+u-boot at 0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz at theobroma-systems.com>
---
tools/binman/bintool.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/binman/bintool.py b/tools/binman/bintool.py
index ec30ceff74..81a314f6f1 100644
--- a/tools/binman/bintool.py
+++ b/tools/binman/bintool.py
@@ -135,6 +135,8 @@ class Bintool:
names = [os.path.splitext(os.path.basename(fname))[0]
for fname in files]
names = [name for name in names if name[0] != '_']
+ names = [name[6:] if name.startswith('btool_') else name
+ for name in names]
if include_testing:
names.append('_testing')
return sorted(names)
--
2.37.2
More information about the U-Boot
mailing list