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))) |
Caleb Connolly | 90b7b39 | 2024-04-18 19:39:58 +0100 | [diff] [blame] | 4 | |
| 5 | ifeq ($(CONFIG_OF_UPSTREAM_BUILD_VENDOR),y) |
| 6 | ifeq ($(CONFIG_ARM64),y) |
| 7 | dt_dir := $(srctree)/dts/upstream/src/arm64 |
| 8 | else |
| 9 | dt_dir := $(srctree)/dts/upstream/src/$(ARCH) |
| 10 | endif |
| 11 | |
| 12 | dtb-vendor_dts := $(patsubst %.dts,%.dtb,$(wildcard $(dt_dir)/$(subst ",,$(CONFIG_OF_UPSTREAM_VENDOR))/*.dts)) |
| 13 | |
| 14 | dtb-y += $(subst $(dt_dir)/,,$(dtb-vendor_dts)) |
| 15 | |
| 16 | endif |
Marek Vasut | 55bd10c | 2024-10-04 02:10:42 +0200 | [diff] [blame] | 17 | |
| 18 | targets += $(dtb-y) |
| 19 | |
| 20 | PHONY += dtbs |
| 21 | dtbs: $(addprefix $(obj)/, $(dtb-y)) |
| 22 | @: |
| 23 | |
| 24 | clean-files := *.dtb *.dtbo */*.dtb */*.dtbo *_HS |