U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Carlo Caione via U-Boot <u-boot@lists.u-boot-project.org>
To: "Carlo Caione" <ccaione@baylibre.com>, <trini@konsulko.com>,
	<sjg@chromium.org>, <quentin.schulz@cherry.de>,
	<u-boot@lists.denx.de>, <dlechner@baylibre.com>,
	<jstephan@baylibre.com>, <GSS_MTK_Uboot_upstream@mediatek.com>
Subject: Re: [PATCH v2] fit: prefer the default configuration on best-match ties
Date: Wed, 22 Jul 2026 10:21:02 +0200	[thread overview]
Message-ID: <DK4YCL8ZC0DS.2FCC2V5ZDBKO1@baylibre.com> (raw)
In-Reply-To: <20260709104940.75514-1-ccaione@baylibre.com>

On Thu Jul 9, 2026 at 12:48 PM CEST, 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.
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> Signed-off-by: Carlo Caione <ccaione@baylibre.com>
> ---
>  boot/Kconfig                       |  2 +
>  boot/image-fit.c                   | 20 ++++++++-
>  doc/usage/fit/overlay-fdt-boot.rst |  6 +++
>  include/image.h                    |  4 ++
>  test/boot/image.c                  | 68 ++++++++++++++++++++++++++++++
>  5 files changed, 98 insertions(+), 2 deletions(-)

FWIW this is the link to the PR changing the spec [0]

[0] https://github.com/open-source-firmware/flat-image-tree/pull/59

Cheers,

--
Carlo Caione

  reply	other threads:[~2026-07-22  8:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09 10:48 [PATCH v2] fit: prefer the default configuration on best-match ties Carlo Caione
2026-07-22  8:21 ` Carlo Caione via U-Boot [this message]
2026-07-24 15:30 ` Carlo Caione
2026-07-24 15:53   ` Tom Rini
2026-07-24 19:58 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DK4YCL8ZC0DS.2FCC2V5ZDBKO1@baylibre.com \
    --to=u-boot@lists.u-boot-project.org \
    --cc=GSS_MTK_Uboot_upstream@mediatek.com \
    --cc=ccaione@baylibre.com \
    --cc=dlechner@baylibre.com \
    --cc=jstephan@baylibre.com \
    --cc=quentin.schulz@cherry.de \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox