mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-21 20:34:38 +00:00
dts: support building all dtb files for a specific vendor
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@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on Amlogic boards builds
This commit is contained in:
parent
1ef61c338d
commit
0525cb2ae0
2 changed files with 37 additions and 0 deletions
24
dts/Kconfig
24
dts/Kconfig
|
@ -101,6 +101,30 @@ config OF_UPSTREAM
|
||||||
the dts/upstream subtree, they can override this option to have the
|
the dts/upstream subtree, they can override this option to have the
|
||||||
DT build from existing U-Boot tree location instead.
|
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
|
||||||
|
is useful for generic U-Boot configurations where many boards can
|
||||||
|
be supported with a single binary.
|
||||||
|
|
||||||
|
This is only available for platforms using upstream devicetree.
|
||||||
|
|
||||||
|
config OF_UPSTREAM_VENDOR
|
||||||
|
string "Vendor to build all upstream devicetree files for"
|
||||||
|
depends on OF_UPSTREAM_BUILD_VENDOR
|
||||||
|
default "qcom" if ARCH_SNAPDRAGON
|
||||||
|
default "rockchip" if ARCH_ROCKCHIP
|
||||||
|
default "amlogic" if ARCH_MESON
|
||||||
|
default "allwinner" if ARCH_SUNXI
|
||||||
|
default "mediatek" if ARCH_MEDIATEK
|
||||||
|
default "marvell" if ARCH_MVEBU || ARCH_KIRKWOOD
|
||||||
|
default "xilinx" if ARCH_VERSAL || ARCH_ZYNQ
|
||||||
|
default "nvidia" if ARCH_TEGRA
|
||||||
|
help
|
||||||
|
Select the vendor to build all devicetree files for.
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Provider of DTB for DT control"
|
prompt "Provider of DTB for DT control"
|
||||||
depends on OF_CONTROL
|
depends on OF_CONTROL
|
||||||
|
|
|
@ -1,3 +1,16 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0+
|
# SPDX-License-Identifier: GPL-2.0+
|
||||||
|
|
||||||
dtb-y += $(patsubst %,%.dtb,$(subst ",,$(CONFIG_DEFAULT_DEVICE_TREE) $(CONFIG_OF_LIST) $(CONFIG_SPL_OF_LIST)))
|
dtb-y += $(patsubst %,%.dtb,$(subst ",,$(CONFIG_DEFAULT_DEVICE_TREE) $(CONFIG_OF_LIST) $(CONFIG_SPL_OF_LIST)))
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_OF_UPSTREAM_BUILD_VENDOR),y)
|
||||||
|
ifeq ($(CONFIG_ARM64),y)
|
||||||
|
dt_dir := $(srctree)/dts/upstream/src/arm64
|
||||||
|
else
|
||||||
|
dt_dir := $(srctree)/dts/upstream/src/$(ARCH)
|
||||||
|
endif
|
||||||
|
|
||||||
|
dtb-vendor_dts := $(patsubst %.dts,%.dtb,$(wildcard $(dt_dir)/$(subst ",,$(CONFIG_OF_UPSTREAM_VENDOR))/*.dts))
|
||||||
|
|
||||||
|
dtb-y += $(subst $(dt_dir)/,,$(dtb-vendor_dts))
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue