[PATCH] fit: prefer the default configuration on best-match ties

Tom Rini trini at konsulko.com
Wed Jul 8 19:19:59 CEST 2026


On Tue, Jul 07, 2026 at 10:54:11PM +0200, Carlo Caione wrote:

> 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 <ccaione at baylibre.com>

This seems appropriate, so:

Reviewed-by: Tom Rini <trini at konsulko.com>

Did you look around under doc/ to see if anything there needs a note as
well? Thanks.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260708/6e063249/attachment.sig>


More information about the U-Boot mailing list