blob: 3ab67b3c247808ae1c603a0c16a98e6c7a64e4a1 [file] [log] [blame]
Rasmus Villemoes3609e1d2022-01-10 14:34:41 +01001# SPDX-License-Identifier: GPL-2.0+
2
Rasmus Villemoes6923f492023-05-04 13:33:08 +02003dtb-y += $(patsubst %,%.dtb,$(subst ",,$(CONFIG_DEFAULT_DEVICE_TREE) $(CONFIG_OF_LIST) $(CONFIG_SPL_OF_LIST)))
Caleb Connolly0525cb22024-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 Vasutd2061822024-10-04 02:10:42 +020017
18targets += $(dtb-y)
19
20PHONY += dtbs
21dtbs: $(addprefix $(obj)/, $(dtb-y))
22 @:
23
Marek Vasuta55c4832024-10-17 03:08:40 +020024ifneq ($(CONFIG_OF_UPSTREAM_INCLUDE_LOCAL_FALLBACK_DTBOS),)
25PHONY += dtbos
26dtbos: $(addprefix $(obj)/, $(filter-out %.dtb,$(dtb-y)))
27 @:
28endif
29
Marek Vasutd2061822024-10-04 02:10:42 +020030clean-files := *.dtb *.dtbo */*.dtb */*.dtbo *_HS