Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 # ==========================================================================
0003 # Installing dtb files
0004 #
0005 # Installs all dtb files listed in $(dtb-y) either in the
0006 # INSTALL_DTBS_PATH directory or the default location:
0007 #
0008 #   $INSTALL_PATH/dtbs/$KERNELRELEASE
0009 # ==========================================================================
0010 
0011 src := $(obj)
0012 
0013 PHONY := __dtbs_install
0014 __dtbs_install:
0015 
0016 include include/config/auto.conf
0017 include $(srctree)/scripts/Kbuild.include
0018 include $(src)/Makefile
0019 
0020 dtbs    := $(addprefix $(dst)/, $(dtb-y) $(if $(CONFIG_OF_ALL_DTBS),$(dtb-)))
0021 subdirs := $(addprefix $(obj)/, $(subdir-y) $(subdir-m))
0022 
0023 __dtbs_install: $(dtbs) $(subdirs)
0024         @:
0025 
0026 quiet_cmd_dtb_install = INSTALL $@
0027       cmd_dtb_install = install -D $< $@
0028 
0029 $(dst)/%.dtb: $(obj)/%.dtb
0030         $(call cmd,dtb_install)
0031 
0032 $(dst)/%.dtbo: $(obj)/%.dtbo
0033         $(call cmd,dtb_install)
0034 
0035 PHONY += $(subdirs)
0036 $(subdirs):
0037         $(Q)$(MAKE) $(dtbinst)=$@ dst=$(patsubst $(obj)/%,$(dst)/%,$@)
0038 
0039 .PHONY: $(PHONY)