]> git.ipfire.org Git - thirdparty/kernel/stable.git/blame - scripts/Makefile.dtbinst
perf hist: Add missing map__put() in error case
[thirdparty/kernel/stable.git] / scripts / Makefile.dtbinst
CommitLineData
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
9#
323a028d 10# Traverse through subdirectories listed in $(dts-dirs).
9fb5e537
RR
11# ==========================================================================
12
13src := $(obj)
14
15PHONY := __dtbs_install
16__dtbs_install:
17
2bfbe788 18export dtbinst_root ?= $(obj)
323a028d 19
9fb5e537
RR
20include include/config/auto.conf
21include scripts/Kbuild.include
5f655c7a 22include $(src)/Makefile
9fb5e537 23
9fb5e537 24dtbinst-files := $(dtb-y)
323a028d 25dtbinst-dirs := $(dts-dirs)
9fb5e537
RR
26
27# Helper targets for Installing DTBs into the boot directory
28quiet_cmd_dtb_install = INSTALL $<
323a028d
RR
29 cmd_dtb_install = mkdir -p $(2); cp $< $(2)
30
2bfbe788 31install-dir = $(patsubst $(dtbinst_root)%,$(INSTALL_DTBS_PATH)%,$(obj))
323a028d 32
323a028d
RR
33$(dtbinst-files): %.dtb: $(obj)/%.dtb
34 $(call cmd,dtb_install,$(install-dir))
9fb5e537 35
323a028d
RR
36$(dtbinst-dirs):
37 $(Q)$(MAKE) $(dtbinst)=$(obj)/$@
9fb5e537 38
323a028d
RR
39PHONY += $(dtbinst-files) $(dtbinst-dirs)
40__dtbs_install: $(dtbinst-files) $(dtbinst-dirs)
9fb5e537
RR
41
42.PHONY: $(PHONY)