Blame view
scripts/Makefile.dtbinst
1.41 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 25 26 |
$(Q)if [ -d $(INSTALL_DTBS_PATH).old ]; then rm -rf $(INSTALL_DTBS_PATH).old; fi $(Q)if [ -d $(INSTALL_DTBS_PATH) ]; then mv $(INSTALL_DTBS_PATH) $(INSTALL_DTBS_PATH).old; fi $(Q)mkdir -p $(INSTALL_DTBS_PATH) |
323a028d3 dts, kbuild: Impl... |
27 |
endif |
9fb5e5372 dts, kbuild: Fact... |
28 29 |
dtbinst-files := $(dtb-y) |
323a028d3 dts, kbuild: Impl... |
30 |
dtbinst-dirs := $(dts-dirs) |
9fb5e5372 dts, kbuild: Fact... |
31 32 33 |
# Helper targets for Installing DTBs into the boot directory quiet_cmd_dtb_install = INSTALL $< |
323a028d3 dts, kbuild: Impl... |
34 35 36 37 38 39 40 41 |
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... |
42 |
|
323a028d3 dts, kbuild: Impl... |
43 44 |
$(dtbinst-dirs): $(Q)$(MAKE) $(dtbinst)=$(obj)/$@ |
9fb5e5372 dts, kbuild: Fact... |
45 |
|
323a028d3 dts, kbuild: Impl... |
46 47 |
PHONY += $(dtbinst-files) $(dtbinst-dirs) __dtbs_install: $(dtbinst-files) $(dtbinst-dirs) |
9fb5e5372 dts, kbuild: Fact... |
48 49 |
.PHONY: $(PHONY) |