blob: 1fe142f2bbf78efb861ec1e3af8c048f4f5967ee [file] [log] [blame]
Rasmus Villemoesc8481ef2022-01-10 14:34:41 +01001# SPDX-License-Identifier: GPL-2.0+
2
Rasmus Villemoes61890e52023-05-04 13:33:08 +02003dtb-y += $(patsubst %,%.dtb,$(subst ",,$(CONFIG_DEFAULT_DEVICE_TREE) $(CONFIG_OF_LIST) $(CONFIG_SPL_OF_LIST)))
Caleb Connolly90b7b392024-04-18 19:39:58 +01004
5ifeq ($(CONFIG_OF_UPSTREAM_BUILD_VENDOR),y)
6ifeq ($(CONFIG_ARM64),y)
7dt_dir := $(srctree)/dts/upstream/src/arm64
8else
9dt_dir := $(srctree)/dts/upstream/src/$(ARCH)
10endif
11
12dtb-vendor_dts := $(patsubst %.dts,%.dtb,$(wildcard $(dt_dir)/$(subst ",,$(CONFIG_OF_UPSTREAM_VENDOR))/*.dts))
13
14dtb-y += $(subst $(dt_dir)/,,$(dtb-vendor_dts))
15
16endif
Marek Vasut55bd10c2024-10-04 02:10:42 +020017
18targets += $(dtb-y)
19
20PHONY += dtbs
21dtbs: $(addprefix $(obj)/, $(dtb-y))
22 @:
23
24clean-files := *.dtb *.dtbo */*.dtb */*.dtbo *_HS