Blame view
scripts/Makefile.dtbinst
1.24 KB
9fb5e5372 dts, kbuild: Fact... |
1 2 3 4 5 6 7 8 |
# ========================================================================== # Installing dtb files # # Installs all dtb files listed in $(dtb-y) either in the # INSTALL_DTBS_PATH directory or the default location: # # $INSTALL_PATH/dtbs/$KERNELRELEASE # |
323a028d3 dts, kbuild: Impl... |
9 |
# Traverse through subdirectories listed in $(dts-dirs). |
9fb5e5372 dts, kbuild: Fact... |
10 11 12 13 14 15 |
# ========================================================================== src := $(obj) PHONY := __dtbs_install __dtbs_install: |
323a028d3 dts, kbuild: Impl... |
16 |
export dtbinst-root ?= $(obj) |
9fb5e5372 dts, kbuild: Fact... |
17 18 |
include include/config/auto.conf include scripts/Kbuild.include |
5f655c7a4 kbuild: include $... |
19 |
include $(src)/Makefile |
9fb5e5372 dts, kbuild: Fact... |
20 21 22 |
PHONY += __dtbs_install_prep __dtbs_install_prep: |
323a028d3 dts, kbuild: Impl... |
23 |
ifeq ("$(dtbinst-root)", "$(obj)") |
9fb5e5372 dts, kbuild: Fact... |
24 |
$(Q)mkdir -p $(INSTALL_DTBS_PATH) |
323a028d3 dts, kbuild: Impl... |
25 |
endif |
9fb5e5372 dts, kbuild: Fact... |
26 27 |
dtbinst-files := $(dtb-y) |
323a028d3 dts, kbuild: Impl... |
28 |
dtbinst-dirs := $(dts-dirs) |
9fb5e5372 dts, kbuild: Fact... |
29 30 31 |
# Helper targets for Installing DTBs into the boot directory quiet_cmd_dtb_install = INSTALL $< |
323a028d3 dts, kbuild: Impl... |
32 33 34 35 36 37 38 39 |
cmd_dtb_install = mkdir -p $(2); cp $< $(2) install-dir = $(patsubst $(dtbinst-root)%,$(INSTALL_DTBS_PATH)%,$(obj)) $(dtbinst-files) $(dtbinst-dirs): | __dtbs_install_prep $(dtbinst-files): %.dtb: $(obj)/%.dtb $(call cmd,dtb_install,$(install-dir)) |
9fb5e5372 dts, kbuild: Fact... |
40 |
|
323a028d3 dts, kbuild: Impl... |
41 42 |
$(dtbinst-dirs): $(Q)$(MAKE) $(dtbinst)=$(obj)/$@ |
9fb5e5372 dts, kbuild: Fact... |
43 |
|
323a028d3 dts, kbuild: Impl... |
44 45 |
PHONY += $(dtbinst-files) $(dtbinst-dirs) __dtbs_install: $(dtbinst-files) $(dtbinst-dirs) |
9fb5e5372 dts, kbuild: Fact... |
46 47 |
.PHONY: $(PHONY) |