[PATCH v3 4/8] dts: Add alternative location for upstream DTB builds

Sumit Garg sumit.garg at linaro.org
Wed Jan 3 08:06:24 CET 2024


On Tue, 2 Jan 2024 at 21:07, Sumit Garg <sumit.garg at linaro.org> wrote:
>
> On Tue, 2 Jan 2024 at 19:36, Simon Glass <sjg at chromium.org> wrote:
<snip>
>
> > 3. Adjust the build system to use the dts/ directory for .dts files
> > when OF_UPSTREAM is enabled
> >
> > Then it will be easy. People can enable OF_UPSTREAM for an SoC
> > (without changing DEFAULT_DEVICE_TREE)
>
> I am still not sure what we will gain via keeping DEFAULT_DEVICE_TREE
> the same. However, without a per vendor directory Makefile like:
> dts/arch/arm64/<vendor>/Makefile it won't be possible. But to do that
> we won't be able to softlink vendor directories from DT rebasing tree
> but rather have to softlink every board DTS file which is much more
> painful.

Even after this you have to tell <vendor> name via DEFAULT_DEVICE_TREE
because the DTB path is constructed via:

DEVICE_TREE ?= $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%)
ifeq ($(DEVICE_TREE),)
DEVICE_TREE := unset
endif

ifeq ($(CONFIG_OF_UPSTREAM),y)
ifeq ($(CONFIG_ARM64),y)
dt_dir := dts/arch/arm64
else
dt_dir := dts/arch/$(ARCH)
endif
else
dt_dir := arch/$(ARCH)/dts
endif

ifneq ($(EXT_DTB),)
DTB := $(EXT_DTB)
else
DTB := $(dt_dir)/$(DEVICE_TREE).dtb
endif

So with a move to Linux directory structure for dts directory,
DEFAULT_DEVICE_TREE have to specify <vendor>/<name> as DT filename.

-Sumit

>
> > and will get the same behaviour
> > as now, just with upstream .dts files. All the .dts files for an SoC
> > are built, as now, just as Linux does. We can continue cleaning up the
> > DT build rules as time permits.
>
> I will reiterate here, we can decide to add Makefile rules on a case
> by case basis. If there is a need (from packaging perspective or a
> particular SoC supports a generic U-Boot image) then we should be able
> to add them. The cleanup would be automatically part of the process as
> we switch SoCs to OF_UPSTREAM.
>
> -Sumit
>
> >
> > Regards,
> > Simon
> >
> > [1] http://patchwork.ozlabs.org/project/uboot/list/?series=388154
> > [2] https://git.pengutronix.de/cgit/barebox/tree/dts


More information about the U-Boot-Custodians mailing list