[PATCH v6 08/11] riscv: dts: jh7110: Support multiple DTBs in a Fit image

E Shattow lucent at gmail.com
Tue Nov 26 15:17:40 CET 2024


Hi Hal, this is better than it was before, thank you.

On Sun, Nov 24, 2024 at 4:33 PM Hal Feng <hal.feng at starfivetech.com> wrote:
>
> Support multiple DTBs for JH7110 based boards, so they can
> select the correct DT at runtime.
>
> Tested-by: E Shattow <lucent at gmail.com>
> Signed-off-by: Hal Feng <hal.feng at starfivetech.com>
> ---
>  arch/riscv/dts/jh7110-common-u-boot.dtsi | 66 +++++++++++++++++++++---
>  1 file changed, 60 insertions(+), 6 deletions(-)
>
> diff --git a/arch/riscv/dts/jh7110-common-u-boot.dtsi b/arch/riscv/dts/jh7110-common-u-boot.dtsi
> index c44553455e..64b4d04884 100644
> --- a/arch/riscv/dts/jh7110-common-u-boot.dtsi
> +++ b/arch/riscv/dts/jh7110-common-u-boot.dtsi
> @@ -112,20 +112,74 @@
>         itb {
>                 fit {
>                         images {
> -                               fdt-1 {
> -                                       description = "NAME";
> +                               fdt-jh7110-starfive-visionfive-2-v1.3b {
> +                                       description = "jh7110-starfive-visionfive-2-v1.3b";
>                                         load = <0x40400000>;
>                                         compression = "none";
>
> -                                       uboot_fdt_blob: blob-ext {
> -                                               filename = "u-boot.dtb";
> +                                       blob-ext {
> +                                               filename = "dts/upstream/src/riscv/starfive/jh7110-starfive-visionfive-2-v1.3b.dtb";
> +                                       };
> +                               };
> +
> +                               fdt-jh7110-starfive-visionfive-2-v1.2a {
> +                                       description = "jh7110-starfive-visionfive-2-v1.2a";
> +                                       load = <0x40400000>;
> +                                       compression = "none";
> +
> +                                       blob-ext {
> +                                               filename = "dts/upstream/src/riscv/starfive/jh7110-starfive-visionfive-2-v1.2a.dtb";
> +                                       };
> +                               };
> +
> +                               fdt-jh7110-milkv-mars {
> +                                       description = "jh7110-milkv-mars";
> +                                       load = <0x40400000>;
> +                                       compression = "none";
> +
> +                                       blob-ext {
> +                                               filename = "dts/upstream/src/riscv/starfive/jh7110-milkv-mars.dtb";
> +                                       };
> +                               };
> +
> +                               fdt-jh7110-pine64-star64 {
> +                                       description = "jh7110-pine64-star64";
> +                                       load = <0x40400000>;
> +                                       compression = "none";
> +
> +                                       blob-ext {
> +                                               filename = "dts/upstream/src/riscv/starfive/jh7110-pine64-star64.dtb";
>                                         };
>                                 };
>                         };
>
>                         configurations {
> -                               conf-1 {
> -                                       fdt = "fdt-1";
> +                               conf-jh7110-starfive-visionfive-2-v1.3b {
> +                                       description = "jh7110-starfive-visionfive-2-v1.3b";
> +                                       firmware = "opensbi";
> +                                       loadables = "uboot";
> +                                       fdt = "fdt-jh7110-starfive-visionfive-2-v1.3b";
> +                               };
> +
> +                               conf-jh7110-starfive-visionfive-2-v1.2a {
> +                                       description = "jh7110-starfive-visionfive-2-v1.2a";
> +                                       firmware = "opensbi";
> +                                       loadables = "uboot";
> +                                       fdt = "fdt-jh7110-starfive-visionfive-2-v1.2a";
> +                               };
> +
> +                               conf-jh7110-milkv-mars {
> +                                       description = "jh7110-milkv-mars";
> +                                       firmware = "opensbi";
> +                                       loadables = "uboot";
> +                                       fdt = "fdt-jh7110-milkv-mars";
> +                               };
> +
> +                               conf-jh7110-pine64-star64 {
> +                                       description = "jh7110-pine64-star64";
> +                                       firmware = "opensbi";
> +                                       loadables = "uboot";
> +                                       fdt = "fdt-jh7110-pine64-star64";
>                                 };
>                         };
>                 };
> --
> 2.43.2
>

Referring to the U-Boot documentation

https://docs.u-boot.org/en/v2024.10/usage/fit/howto.html

gives an example as you have it here unsorted with "images" before
"configurations".

However, nodes in images{} and configurations{} should be sorted:

fdt-jh7110-milkv-mars
fdt-jh7110-pine64-star64
fdt-jh7110-starfive-visionfive-2-v1.2a
fdt-jh7110-starfive-visionfive-2-v1.3b

conf-jh7110-milkv-mars
conf-jh7110-pine64-star64
conf-jh7110-starfive-visionfive-2-v1.2a
conf-jh7110-starfive-visionfive-2-v1.3b

With that,

Reviewed-by: E Shattow <lucent at gmail.com>


More information about the U-Boot mailing list