Hi,

On 2026-07-07T20:54:11, Carlo Caione <[email protected]> wrote:
> fit: prefer the default configuration on best-match ties
>
> With CONFIG_FIT_BEST_MATCH, fit_conf_find_compat() selects the
> configuration matching the most specific U-Boot compatible string; on
> equal matches the first listed configuration wins and the configurations
> node 'default' property is never consulted.
>
> A FIT whose configurations all share the same base devicetree compatible
> (e.g. one manifest carrying a base tree plus overlay combinations for a
> single board) therefore always boots the first configuration, silently
> ignoring the default chosen by the manifest author.
>
> Break score ties in favour of the default configuration. A strictly
> better compatible match still wins over it, and FITs without a default
> keep the current first-listed behaviour.
>
> Signed-off-by: Carlo Caione <[email protected]>
>
> boot/Kconfig      |  2 ++
>  boot/image-fit.c  | 20 ++++++++++++++--
>  include/image.h   |  4 ++++
>  test/boot/image.c | 68 
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 92 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <[email protected]>

This could use a spec tweak, perhaps?

Regards,
Simon

Reply via email to