diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-12-12 09:09:03 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-12-12 09:09:03 +0100 |
commit | 3459f0d78ffe27a1b341c22eb158b622eaaea3fc (patch) | |
tree | 715b0575eec541d0181876ad367ca5480cdcecf3 /scripts | |
parent | 9fc81d87420d0d3fd62d5e5529972c0ad9eab9cc (diff) | |
parent | bee2782f30f66898be3f74ad02e4d1f87a969694 (diff) | |
download | linux-3459f0d78ffe27a1b341c22eb158b622eaaea3fc.tar.gz linux-3459f0d78ffe27a1b341c22eb158b622eaaea3fc.tar.bz2 linux-3459f0d78ffe27a1b341c22eb158b622eaaea3fc.zip |
Merge branch 'linus' into perf/urgent, to pick up the upstream merged bits
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Kbuild.include | 6 | ||||
-rw-r--r-- | scripts/Makefile.dtbinst | 51 | ||||
-rw-r--r-- | scripts/Makefile.lib | 12 |
3 files changed, 57 insertions, 12 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 65e7b08bb2cc..5374b1bdf02f 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -179,6 +179,12 @@ build := -f $(srctree)/scripts/Makefile.build obj # $(Q)$(MAKE) $(modbuiltin)=dir modbuiltin := -f $(srctree)/scripts/Makefile.modbuiltin obj +### +# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.dtbinst obj= +# Usage: +# $(Q)$(MAKE) $(dtbinst)=dir +dtbinst := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.dtbinst obj + # Prefix -I with $(srctree) if it is not an absolute path. # skip if -I has no parameter addtree = $(if $(patsubst -I%,%,$(1)), \ diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst new file mode 100644 index 000000000000..909ed7a2ac61 --- /dev/null +++ b/scripts/Makefile.dtbinst @@ -0,0 +1,51 @@ +# ========================================================================== +# 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 +# +# Traverse through subdirectories listed in $(dts-dirs). +# ========================================================================== + +src := $(obj) + +PHONY := __dtbs_install +__dtbs_install: + +export dtbinst-root ?= $(obj) + +include include/config/auto.conf +include scripts/Kbuild.include +include $(srctree)/$(obj)/Makefile + +PHONY += __dtbs_install_prep +__dtbs_install_prep: +ifeq ("$(dtbinst-root)", "$(obj)") + $(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) +endif + +dtbinst-files := $(dtb-y) +dtbinst-dirs := $(dts-dirs) + +# Helper targets for Installing DTBs into the boot directory +quiet_cmd_dtb_install = INSTALL $< + 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)) + +$(dtbinst-dirs): + $(Q)$(MAKE) $(dtbinst)=$(obj)/$@ + +PHONY += $(dtbinst-files) $(dtbinst-dirs) +__dtbs_install: $(dtbinst-files) $(dtbinst-dirs) + +.PHONY: $(PHONY) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 54be19a0fa51..511755200634 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -283,18 +283,6 @@ $(obj)/%.dtb: $(src)/%.dts FORCE dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp) -# Helper targets for Installing DTBs into the boot directory -quiet_cmd_dtb_install = INSTALL $< - cmd_dtb_install = cp $< $(2) - -_dtbinst_pre_: - $(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) - -%.dtb_dtbinst_: $(obj)/%.dtb _dtbinst_pre_ - $(call cmd,dtb_install,$(INSTALL_DTBS_PATH)) - # Bzip2 # --------------------------------------------------------------------------- |