]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blame - scripts/Makefile.dtbinst
UBUNTU: Start new release
[mirror_ubuntu-zesty-kernel.git] / scripts / Makefile.dtbinst
CommitLineData
9fb5e537
RR
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#
323a028d 9# Traverse through subdirectories listed in $(dts-dirs).
9fb5e537
RR
10# ==========================================================================
11
12src := $(obj)
13
14PHONY := __dtbs_install
15__dtbs_install:
16
323a028d
RR
17export dtbinst-root ?= $(obj)
18
9fb5e537
RR
19include include/config/auto.conf
20include scripts/Kbuild.include
5f655c7a 21include $(src)/Makefile
9fb5e537
RR
22
23PHONY += __dtbs_install_prep
24__dtbs_install_prep:
323a028d 25ifeq ("$(dtbinst-root)", "$(obj)")
9fb5e537 26 $(Q)mkdir -p $(INSTALL_DTBS_PATH)
323a028d 27endif
9fb5e537
RR
28
29dtbinst-files := $(dtb-y)
0a7ba7e9 30dtboinst-files := $(dtbo-y)
323a028d 31dtbinst-dirs := $(dts-dirs)
9fb5e537
RR
32
33# Helper targets for Installing DTBs into the boot directory
34quiet_cmd_dtb_install = INSTALL $<
323a028d
RR
35 cmd_dtb_install = mkdir -p $(2); cp $< $(2)
36
37install-dir = $(patsubst $(dtbinst-root)%,$(INSTALL_DTBS_PATH)%,$(obj))
38
0a7ba7e9 39$(dtbinst-files) $(dtboinst-files) $(dtbinst-dirs): | __dtbs_install_prep
323a028d
RR
40
41$(dtbinst-files): %.dtb: $(obj)/%.dtb
42 $(call cmd,dtb_install,$(install-dir))
9fb5e537 43
0a7ba7e9 44$(dtboinst-files): %.dtbo: $(obj)/%.dtbo
45 $(call cmd,dtb_install,$(install-dir))
46
323a028d
RR
47$(dtbinst-dirs):
48 $(Q)$(MAKE) $(dtbinst)=$(obj)/$@
9fb5e537 49
0a7ba7e9 50PHONY += $(dtbinst-files) $(dtboinst-files) $(dtbinst-dirs)
51__dtbs_install: $(dtbinst-files) $(dtboinst-files) $(dtbinst-dirs)
9fb5e537
RR
52
53.PHONY: $(PHONY)