[PATCH RFC 26/26] dts: support building all dtb files for a specific vendor
Caleb Connolly
caleb.connolly at linaro.org
Tue Mar 5 15:15:25 CET 2024
[trimmed CC list a bit as this is getting offtopic for the original thread]
On 05/03/2024 13:14, Sumit Garg wrote:
> 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.
Well the "ideal" goal is that every SoC in upstream is supported. All of
the changes I've introduced so far work towards that end, so this is
just another step in that direction. Obviously it's a lofty one, but I
see no reason to intentionally make things harder for ourselves by
gatekeeping what DTB files we build.
I have additional features planned that help here, and plenty more
ideas... But I can confirm that most of the phones (which are pretty
much identical to the reference boards) do indeed "just work" provided
the SoC is supported.
It makes sense to use board/qualcomm/<soc-codename>/MAINTAINERS for this
imo, there we can reference the specific dts files so device maintainers
can be CC'd if there are relevant changes when deviceree-rebasing is
updated.
I would like to update the Qualcomm docs to describe the general
approach here and help guide new contributors. But (as is hopefully
obvious by this email) I'm still very much learning as I go. What do you
think?
>
>>
>> $ 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
--
// Caleb (they/them)
More information about the U-Boot
mailing list