Rasmus Villemoes | c8481ef | 2022-01-10 14:34:41 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
Rasmus Villemoes | 61890e5 | 2023-05-04 13:33:08 +0200 | [diff] [blame] | 3 | dtb-y += $(patsubst %,%.dtb,$(subst ",,$(CONFIG_DEFAULT_DEVICE_TREE) $(CONFIG_OF_LIST) $(CONFIG_SPL_OF_LIST))) |
Jan Kiszka | f9ac68d | 2024-09-30 12:20:36 +0200 | [diff] [blame] | 4 | dtb-y += $(patsubst %,%.dtbo,$(subst ",,$(CONFIG_OF_OVERLAY_LIST))) |
Caleb Connolly | 90b7b39 | 2024-04-18 19:39:58 +0100 | [diff] [blame] | 5 | |
| 6 | ifeq ($(CONFIG_OF_UPSTREAM_BUILD_VENDOR),y) |
| 7 | ifeq ($(CONFIG_ARM64),y) |
| 8 | dt_dir := $(srctree)/dts/upstream/src/arm64 |
| 9 | else |
| 10 | dt_dir := $(srctree)/dts/upstream/src/$(ARCH) |
| 11 | endif |
| 12 | |
| 13 | dtb-vendor_dts := $(patsubst %.dts,%.dtb,$(wildcard $(dt_dir)/$(subst ",,$(CONFIG_OF_UPSTREAM_VENDOR))/*.dts)) |
| 14 | |
| 15 | dtb-y += $(subst $(dt_dir)/,,$(dtb-vendor_dts)) |
| 16 | |
| 17 | endif |
Marek Vasut | 55bd10c | 2024-10-04 02:10:42 +0200 | [diff] [blame] | 18 | |
| 19 | targets += $(dtb-y) |
| 20 | |
| 21 | PHONY += dtbs |
| 22 | dtbs: $(addprefix $(obj)/, $(dtb-y)) |
| 23 | @: |
| 24 | |
Marek Vasut | b5abbf8 | 2024-10-17 03:08:40 +0200 | [diff] [blame] | 25 | ifneq ($(CONFIG_OF_UPSTREAM_INCLUDE_LOCAL_FALLBACK_DTBOS),) |
| 26 | PHONY += dtbos |
| 27 | dtbos: $(addprefix $(obj)/, $(filter-out %.dtb,$(dtb-y))) |
| 28 | @: |
| 29 | endif |
| 30 | |
Marek Vasut | 55bd10c | 2024-10-04 02:10:42 +0200 | [diff] [blame] | 31 | clean-files := *.dtb *.dtbo */*.dtb */*.dtbo *_HS |