[PATCH v2] binman: bintool: remove btool_ prefix from btool names

Quentin Schulz foss at 0leil.net
Sat Sep 3 10:48:02 CEST 2022


Hi Simon,

On September 2, 2022 10:00:18 PM GMT+02:00, Simon Glass <sjg at chromium.org> wrote:
>Hi Quentin,
>
>On Thu, 1 Sept 2022 at 08:44, Quentin Schulz <foss+uboot at 0leil.net> wrote:
>>
>> 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(+)
>
>Do we still need this patch? Please see u-boot-dm/testing
>

Since you took the V1, no. Either version  is fine IMO though the second version would have been a cleaner approach when a second btool prefixed with btool_ will appear (if that ever happens).

I might carve some time to rename all btools to have btool_ as prefix and remove the prefix as done in this patch before use, so that we simplify things a bit.

Cheers,
Quentin

>Regards,
>Simon


More information about the U-Boot mailing list