[PATCH 1/2] tools: binman: fit: support engine override via argument

Simon Glass sjg at chromium.org
Thu May 7 15:30:15 CEST 2026


Hi Julian,

On 2026-05-04T17:27:31, None <jhaller.oss at gmail.com> wrote:
> tools: binman: fit: support engine override via argument
>
> Allow overriding fit,engine and fit,engine-keydir via arguments,
> enabling engine selection at build time without modifying the device
> tree.
>
> Signed-off-by: Julian Haller <julian.haller at philips.com>
>
> Makefile                  |  2 ++
>  tools/binman/etype/fit.py | 13 +++----------
>  2 files changed, 5 insertions(+), 10 deletions(-)

> diff --git a/Makefile b/Makefile
> @@ -1701,6 +1701,8 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
>               -a vpl-dtb=$(CONFIG_VPL_OF_REAL) \
>               -a pre-load-key-path=${PRE_LOAD_KEY_PATH} \
>               -a of-spl-remove-props=$(CONFIG_OF_SPL_REMOVE_PROPS) \
> +             $(if $(FIT_ENGINE),-a fit$(comma)engine=$(FIT_ENGINE)) \
> +             $(if $(FIT_ENGINE_KEYDIR),-a fit$(comma)engine-keydir=$(FIT_ENGINE_KEYDIR)) \

Please mention these new make variables in the docs (e.g.
doc/usage/fit/signature.rst) so users can discover them - also how
about an example invocation in the commit message?

> diff --git a/tools/binman/etype/fit.py b/tools/binman/etype/fit.py
> @@ -646,17 +646,10 @@ class Entry_fit(Entry_section):
>                               OpenSSL API, as second element of the Tuple. None
>                               if no keydir to pass.
>          """
> -        engine = None
> +        engine = self.GetArg('fit,engine', str)
>          engine_keydir = None
> -
> -        prop = self._fit_props.get('fit,engine')
> -        if prop is not None:
> -            engine = prop.value
> -
> -            prop = self._fit_props.get('fit,engine-keydir')
> -            if prop is not None:
> -                engine_keydir = prop.value
> -
> +        if engine is not None:
> +            engine_keydir = self.GetArg('fit,engine-keydir', str)
>          return engine, engine_keydir

The fit,engine and fit,engine-keydir blocks in the class docstring
describe these only as devicetree properties, but these can also be
entry args.

> diff --git a/tools/binman/etype/fit.py b/tools/binman/etype/fit.py
> @@ -646,17 +646,10 @@ class Entry_fit(Entry_section):
> +        engine = self.GetArg('fit,engine', str)

Can you check 'binman test -T' and confirm that you have coverage for
the new code?

Regards,
Simon


More information about the U-Boot mailing list