Commit | Line | Data |
---|---|---|
b2441318 | 1 | # SPDX-License-Identifier: GPL-2.0 |
9fb5e537 RR |
2 | # ========================================================================== |
3 | # Installing dtb files | |
4 | # | |
5 | # Installs all dtb files listed in $(dtb-y) either in the | |
6 | # INSTALL_DTBS_PATH directory or the default location: | |
7 | # | |
8 | # $INSTALL_PATH/dtbs/$KERNELRELEASE | |
9fb5e537 RR |
9 | # ========================================================================== |
10 | ||
11 | src := $(obj) | |
12 | ||
13 | PHONY := __dtbs_install | |
14 | __dtbs_install: | |
15 | ||
16 | include include/config/auto.conf | |
3204a7fb | 17 | include $(srctree)/scripts/Kbuild.include |
a2430b25 | 18 | include $(kbuild-file) |
9fb5e537 | 19 | |
aefd8030 MY |
20 | dtbs := $(addprefix $(dst)/, $(dtb-y) $(if $(CONFIG_OF_ALL_DTBS),$(dtb-))) |
21 | subdirs := $(addprefix $(obj)/, $(subdir-y) $(subdir-m)) | |
9fb5e537 | 22 | |
aefd8030 MY |
23 | __dtbs_install: $(dtbs) $(subdirs) |
24 | @: | |
323a028d | 25 | |
aefd8030 MY |
26 | quiet_cmd_dtb_install = INSTALL $@ |
27 | cmd_dtb_install = install -D $< $@ | |
9fb5e537 | 28 | |
aefd8030 MY |
29 | $(dst)/%.dtb: $(obj)/%.dtb |
30 | $(call cmd,dtb_install) | |
9fb5e537 | 31 | |
ce88c9c7 VK |
32 | $(dst)/%.dtbo: $(obj)/%.dtbo |
33 | $(call cmd,dtb_install) | |
34 | ||
aefd8030 MY |
35 | PHONY += $(subdirs) |
36 | $(subdirs): | |
37 | $(Q)$(MAKE) $(dtbinst)=$@ dst=$(patsubst $(obj)/%,$(dst)/%,$@) | |
9fb5e537 RR |
38 | |
39 | .PHONY: $(PHONY) |