[PATCH RFC 26/26] dts: support building all dtb files for a specific vendor

Sumit Garg sumit.garg at linaro.org
Tue Mar 5 14:14:59 CET 2024


On Tue, 5 Mar 2024 at 18:21, Caleb Connolly <caleb.connolly at linaro.org> wrote:
>
>
>
> On 05/03/2024 12:35, Sumit Garg wrote:
> > Hi Caleb,
> >
> > On Mon, 4 Mar 2024 at 22:22, Caleb Connolly <caleb.connolly at linaro.org> wrote:
> >>
> >> This adjusts OF_UPSTREAM to behave more like the kernel by allowing for
> >> all the devicetree files for a given vendor to be compiled. This is
> >> useful for Qualcomm in particular as most boards are supported by a
> >> single U-Boot build just provided with a different DT.
> >>
> >> Signed-off-by: Caleb Connolly <caleb.connolly at linaro.org>
> >> ---
> >>  dts/Kconfig          | 24 ++++++++++++++++++++++++
> >>  scripts/Makefile.dts | 17 ++++++++++++++++-
> >>  2 files changed, 40 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/dts/Kconfig b/dts/Kconfig
> >> index b9b6367154ef..67d9dc489856 100644
> >> --- a/dts/Kconfig
> >> +++ b/dts/Kconfig
> >> @@ -100,8 +100,32 @@ config OF_UPSTREAM
> >>           However, newer boards whose devicetree source files haven't landed in
> >>           the dts/upstream subtree, they can override this option to have the
> >>           DT build from existing U-Boot tree location instead.
> >>
> >> +config OF_UPSTREAM_BUILD_VENDOR
> >> +       bool "Build all devicetree files for a particular vendor"
> >> +       depends on OF_UPSTREAM
> >> +       help
> >> +         Enable building all devicetree files for a particular vendor. This
> >
> > Do we really want to build all the DTBs even if many of those aren't
> > supported by U-Boot at all? I would have rather added Makefile targets
> > for boards which really supports a single defconfig eg.
> > qcom_defconfig.
>
> Yes, for the 4 Qualcomm SoCs currently supported there are 51 dts
> targets that ought to be able to run U-Boot to some extent

Have you tested U-Boot on all of them? IMO, it would be good to make
people aware about supported boards via listing their DTs at least.

>
> $ ls -l dts/upstream/src/arm6/qcom/{msm8916,sdm845,msm8996,qcs404}*.dts\
>         | wc -l
> 51
>

qcom_defconfig currently only supports sdm845 and qcs404.

> What do you mean by a "makefile target"? Like copying
> arch/arm64/boot/dts/qcom/Makefile from Linux? I guess my concern here
> would be keeping it in sync, and introducing additional busywork when
> porting.

See following diff:

diff --git a/dts/upstream/src/arm64/Makefile b/dts/upstream/src/arm64/Makefile
index 9a8f6aa35846..ecc15021cb08 100644
--- a/dts/upstream/src/arm64/Makefile
+++ b/dts/upstream/src/arm64/Makefile
@@ -2,6 +2,10 @@

 include $(srctree)/scripts/Makefile.dts

+dtb-$(CONFIG_ARCH_SNAPDRAGON) += qcom/sdm845-db845c.dtb \
+       qcom/sdm845-samsung-starqltechn.dtb \
+       qcom/qcs404-evb-4000.dtb
+
 targets += $(dtb-y)

>
> We do have a lot of Qualcomm DTS files, it takes maybe 10 seconds to
> compile them all on my machine, but that's only once. With incremental
> builds this becomes largely irrelevant.

Maybe someone cares about build time too but that's not my primary
concern. We shouldn't be giving the false impression that all the DTs
present in the vendor directory are supported by U-Boot.

-Sumit


More information about the U-Boot mailing list