Linux Audio

Check our new training course

Loading...
v4.6
 
 1# ==========================================================================
 2# Installing dtb files
 3#
 4# Installs all dtb files listed in $(dtb-y) either in the
 5# INSTALL_DTBS_PATH directory or the default location:
 6#
 7#   $INSTALL_PATH/dtbs/$KERNELRELEASE
 8#
 9# Traverse through subdirectories listed in $(dts-dirs).
10# ==========================================================================
11
12src := $(obj)
13
14PHONY := __dtbs_install
15__dtbs_install:
16
17export dtbinst-root ?= $(obj)
18
19include include/config/auto.conf
20include scripts/Kbuild.include
21include $(src)/Makefile
22
23PHONY += __dtbs_install_prep
24__dtbs_install_prep:
25ifeq ("$(dtbinst-root)", "$(obj)")
26	$(Q)mkdir -p $(INSTALL_DTBS_PATH)
27endif
28
29dtbinst-files	:= $(dtb-y)
30dtbinst-dirs	:= $(dts-dirs)
31
32# Helper targets for Installing DTBs into the boot directory
33quiet_cmd_dtb_install =	INSTALL $<
34      cmd_dtb_install =	mkdir -p $(2); cp $< $(2)
35
36install-dir = $(patsubst $(dtbinst-root)%,$(INSTALL_DTBS_PATH)%,$(obj))
 
37
38$(dtbinst-files) $(dtbinst-dirs): | __dtbs_install_prep
 
39
40$(dtbinst-files): %.dtb: $(obj)/%.dtb
41	$(call cmd,dtb_install,$(install-dir))
42
43$(dtbinst-dirs):
44	$(Q)$(MAKE) $(dtbinst)=$(obj)/$@
45
46PHONY += $(dtbinst-files) $(dtbinst-dirs)
47__dtbs_install: $(dtbinst-files) $(dtbinst-dirs)
 
48
49.PHONY: $(PHONY)
v6.8
 1# SPDX-License-Identifier: GPL-2.0
 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
 
 
 9# ==========================================================================
10
11src := $(obj)
12
13PHONY := __dtbs_install
14__dtbs_install:
15
 
 
16include include/config/auto.conf
17include $(srctree)/scripts/Kbuild.include
18include $(kbuild-file)
 
 
 
 
 
 
 
 
 
19
20dtbs    := $(addprefix $(dst)/, $(dtb-y) $(if $(CONFIG_OF_ALL_DTBS),$(dtb-)))
21subdirs := $(addprefix $(obj)/, $(subdir-y) $(subdir-m))
 
22
23__dtbs_install: $(dtbs) $(subdirs)
24	@:
25
26quiet_cmd_dtb_install = INSTALL $@
27      cmd_dtb_install = install -D $< $@
28
29$(dst)/%.dtb: $(obj)/%.dtb
30	$(call cmd,dtb_install)
31
32$(dst)/%.dtbo: $(obj)/%.dtbo
33	$(call cmd,dtb_install)
34
35PHONY += $(subdirs)
36$(subdirs):
37	$(Q)$(MAKE) $(dtbinst)=$@ dst=$(if $(CONFIG_ARCH_WANT_FLAT_DTB_INSTALL),$(dst),$(patsubst $(obj)/%,$(dst)/%,$@))
38
39.PHONY: $(PHONY)