blob: 685e3371bc67d791142887e9cbff751c163380e7 [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)))
Jan Kiszkaf9ac68d2024-09-30 12:20:36 +02004dtb-y += $(patsubst %,%.dtbo,$(subst ",,$(CONFIG_OF_OVERLAY_LIST)))
Caleb Connolly90b7b392024-04-18 19:39:58 +01005
6ifeq ($(CONFIG_OF_UPSTREAM_BUILD_VENDOR),y)
7ifeq ($(CONFIG_ARM64),y)
8dt_dir := $(srctree)/dts/upstream/src/arm64
9else
10dt_dir := $(srctree)/dts/upstream/src/$(ARCH)
11endif
12
13dtb-vendor_dts := $(patsubst %.dts,%.dtb,$(wildcard $(dt_dir)/$(subst ",,$(CONFIG_OF_UPSTREAM_VENDOR))/*.dts))
14
15dtb-y += $(subst $(dt_dir)/,,$(dtb-vendor_dts))
16
17endif
Marek Vasut55bd10c2024-10-04 02:10:42 +020018
19targets += $(dtb-y)
20
21PHONY += dtbs
22dtbs: $(addprefix $(obj)/, $(dtb-y))
23 @:
24
Marek Vasutb5abbf82024-10-17 03:08:40 +020025ifneq ($(CONFIG_OF_UPSTREAM_INCLUDE_LOCAL_FALLBACK_DTBOS),)
26PHONY += dtbos
27dtbos: $(addprefix $(obj)/, $(filter-out %.dtb,$(dtb-y)))
28 @:
29endif
30
Marek Vasut55bd10c2024-10-04 02:10:42 +020031clean-files := *.dtb *.dtbo */*.dtb */*.dtbo *_HS