1 # SPDX-License-Identifier: GPL-2.0
2 # ==========================================================================
5 # Installs all dtb files listed in $(dtb-y) either in the
6 # INSTALL_DTBS_PATH directory or the default location:
8 # $INSTALL_PATH/dtbs/$KERNELRELEASE
9 # ==========================================================================
13 PHONY := __dtbs_install
16 include include/config/auto.conf
17 include scripts/Kbuild.include
18 include $(src)/Makefile
20 dtbs := $(addprefix $(dst)/, $(dtb-y) $(if $(CONFIG_OF_ALL_DTBS),$(dtb-)))
21 subdirs := $(addprefix $(obj)/, $(subdir-y) $(subdir-m))
23 __dtbs_install: $(dtbs) $(subdirs)
26 quiet_cmd_dtb_install = INSTALL $@
27 cmd_dtb_install = install -D $< $@
29 $(dst)/%.dtb: $(obj)/%.dtb
30 $(call cmd,dtb_install)
32 $(dst)/%.dtbo: $(obj)/%.dtbo
33 $(call cmd,dtb_install)
37 $(Q)$(MAKE) $(dtbinst)=$@ dst=$(patsubst $(obj)/%,$(dst)/%,$@)