[PATCH v2 4/4] riscv: dts: starfive: don't use a default configuration

Simon Glass sjg at chromium.org
Mon Feb 10 14:08:50 CET 2025


Hi Heinrich,

On Mon, 10 Feb 2025 at 04:18, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> Booting JH7110 systems with a VisionFive 2 device-tree used to kind of
> work without causing harm to the hardware. But there is no guarantee
> that this will hold true in future. So we should not rely on it.
>
> Before the current patch series booting failed on unsupported boards due
> to the lack of a device-tree in the binman generated default configuration
> when reaching main U-Boot.
>
> By setting the default configuration to non-matching value booting will
> now fail on unsupported boards already in SPL. This allows SPL to
> continue with the next boot source for a possible recovery.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
> v2:
>         new patch
> ---
>  arch/riscv/dts/starfive-visionfive2-binman.dtsi | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/arch/riscv/dts/starfive-visionfive2-binman.dtsi b/arch/riscv/dts/starfive-visionfive2-binman.dtsi
> index 05787bdb92d..dd0faca6824 100644
> --- a/arch/riscv/dts/starfive-visionfive2-binman.dtsi
> +++ b/arch/riscv/dts/starfive-visionfive2-binman.dtsi
> @@ -13,6 +13,19 @@
>  };
>
>  &binman {
> +       itb {
> +               fit {
> +                       configurations {
> +                               /*
> +                                * Do not boot if there is no matching
> +                                * configuration. We can't remove the default
> +                                * here. So use a non-matching value.
> +                                */
> +                               default = "none";

The 'default' is optional [1] but the spec is silent on what happens
when the default is missing. What do you think it should do? Perhaps
we should add a property to define the behaviour?

> +                       };
> +               };
> +       };
> +
>         spl-img {
>                 filename = "spl/u-boot-spl.bin.normal.out";
>
> --
> 2.47.1
>

Regards,
SImon

[1] https://fitspec.osfw.foundation/#id4


More information about the U-Boot mailing list