diff options
| author | Ingo Molnar <mingo@kernel.org> | 2014-12-12 03:09:03 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2014-12-12 03:09:03 -0500 |
| commit | 3459f0d78ffe27a1b341c22eb158b622eaaea3fc (patch) | |
| tree | 715b0575eec541d0181876ad367ca5480cdcecf3 /scripts | |
| parent | 9fc81d87420d0d3fd62d5e5529972c0ad9eab9cc (diff) | |
| parent | bee2782f30f66898be3f74ad02e4d1f87a969694 (diff) | |
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 | |||
| 179 | # $(Q)$(MAKE) $(modbuiltin)=dir | 179 | # $(Q)$(MAKE) $(modbuiltin)=dir |
| 180 | modbuiltin := -f $(srctree)/scripts/Makefile.modbuiltin obj | 180 | modbuiltin := -f $(srctree)/scripts/Makefile.modbuiltin obj |
| 181 | 181 | ||
| 182 | ### | ||
| 183 | # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.dtbinst obj= | ||
| 184 | # Usage: | ||
| 185 | # $(Q)$(MAKE) $(dtbinst)=dir | ||
| 186 | dtbinst := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.dtbinst obj | ||
| 187 | |||
| 182 | # Prefix -I with $(srctree) if it is not an absolute path. | 188 | # Prefix -I with $(srctree) if it is not an absolute path. |
| 183 | # skip if -I has no parameter | 189 | # skip if -I has no parameter |
| 184 | addtree = $(if $(patsubst -I%,%,$(1)), \ | 190 | 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 @@ | |||
| 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 | # | ||
| 9 | # Traverse through subdirectories listed in $(dts-dirs). | ||
| 10 | # ========================================================================== | ||
| 11 | |||
| 12 | src := $(obj) | ||
| 13 | |||
| 14 | PHONY := __dtbs_install | ||
| 15 | __dtbs_install: | ||
| 16 | |||
| 17 | export dtbinst-root ?= $(obj) | ||
| 18 | |||
| 19 | include include/config/auto.conf | ||
| 20 | include scripts/Kbuild.include | ||
| 21 | include $(srctree)/$(obj)/Makefile | ||
| 22 | |||
| 23 | PHONY += __dtbs_install_prep | ||
| 24 | __dtbs_install_prep: | ||
| 25 | ifeq ("$(dtbinst-root)", "$(obj)") | ||
| 26 | $(Q)if [ -d $(INSTALL_DTBS_PATH).old ]; then rm -rf $(INSTALL_DTBS_PATH).old; fi | ||
| 27 | $(Q)if [ -d $(INSTALL_DTBS_PATH) ]; then mv $(INSTALL_DTBS_PATH) $(INSTALL_DTBS_PATH).old; fi | ||
| 28 | $(Q)mkdir -p $(INSTALL_DTBS_PATH) | ||
| 29 | endif | ||
| 30 | |||
| 31 | dtbinst-files := $(dtb-y) | ||
| 32 | dtbinst-dirs := $(dts-dirs) | ||
| 33 | |||
| 34 | # Helper targets for Installing DTBs into the boot directory | ||
| 35 | quiet_cmd_dtb_install = INSTALL $< | ||
| 36 | cmd_dtb_install = mkdir -p $(2); cp $< $(2) | ||
| 37 | |||
| 38 | install-dir = $(patsubst $(dtbinst-root)%,$(INSTALL_DTBS_PATH)%,$(obj)) | ||
| 39 | |||
| 40 | $(dtbinst-files) $(dtbinst-dirs): | __dtbs_install_prep | ||
| 41 | |||
| 42 | $(dtbinst-files): %.dtb: $(obj)/%.dtb | ||
| 43 | $(call cmd,dtb_install,$(install-dir)) | ||
| 44 | |||
| 45 | $(dtbinst-dirs): | ||
| 46 | $(Q)$(MAKE) $(dtbinst)=$(obj)/$@ | ||
| 47 | |||
| 48 | PHONY += $(dtbinst-files) $(dtbinst-dirs) | ||
| 49 | __dtbs_install: $(dtbinst-files) $(dtbinst-dirs) | ||
| 50 | |||
| 51 | .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 | |||
| 283 | 283 | ||
| 284 | dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp) | 284 | dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp) |
| 285 | 285 | ||
| 286 | # Helper targets for Installing DTBs into the boot directory | ||
| 287 | quiet_cmd_dtb_install = INSTALL $< | ||
| 288 | cmd_dtb_install = cp $< $(2) | ||
| 289 | |||
| 290 | _dtbinst_pre_: | ||
| 291 | $(Q)if [ -d $(INSTALL_DTBS_PATH).old ]; then rm -rf $(INSTALL_DTBS_PATH).old; fi | ||
| 292 | $(Q)if [ -d $(INSTALL_DTBS_PATH) ]; then mv $(INSTALL_DTBS_PATH) $(INSTALL_DTBS_PATH).old; fi | ||
| 293 | $(Q)mkdir -p $(INSTALL_DTBS_PATH) | ||
| 294 | |||
| 295 | %.dtb_dtbinst_: $(obj)/%.dtb _dtbinst_pre_ | ||
| 296 | $(call cmd,dtb_install,$(INSTALL_DTBS_PATH)) | ||
| 297 | |||
| 298 | # Bzip2 | 286 | # Bzip2 |
| 299 | # --------------------------------------------------------------------------- | 287 | # --------------------------------------------------------------------------- |
| 300 | 288 | ||
