Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
Robert Richter | 9fb5e53 | 2014-09-03 15:29:24 +0200 | [diff] [blame] | 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 |
Robert Richter | 9fb5e53 | 2014-09-03 15:29:24 +0200 | [diff] [blame] | 9 | # ========================================================================== |
| 10 | |
| 11 | src := $(obj) |
| 12 | |
| 13 | PHONY := __dtbs_install |
| 14 | __dtbs_install: |
| 15 | |
| 16 | include include/config/auto.conf |
| 17 | include scripts/Kbuild.include |
Masahiro Yamada | 5f655c7 | 2015-03-27 20:43:37 +0900 | [diff] [blame] | 18 | include $(src)/Makefile |
Robert Richter | 9fb5e53 | 2014-09-03 15:29:24 +0200 | [diff] [blame] | 19 | |
Masahiro Yamada | aefd803 | 2020-03-07 02:08:52 +0900 | [diff] [blame] | 20 | dtbs := $(addprefix $(dst)/, $(dtb-y) $(if $(CONFIG_OF_ALL_DTBS),$(dtb-))) |
| 21 | subdirs := $(addprefix $(obj)/, $(subdir-y) $(subdir-m)) |
Robert Richter | 9fb5e53 | 2014-09-03 15:29:24 +0200 | [diff] [blame] | 22 | |
Masahiro Yamada | aefd803 | 2020-03-07 02:08:52 +0900 | [diff] [blame] | 23 | __dtbs_install: $(dtbs) $(subdirs) |
| 24 | @: |
Robert Richter | 9fb5e53 | 2014-09-03 15:29:24 +0200 | [diff] [blame] | 25 | |
Masahiro Yamada | aefd803 | 2020-03-07 02:08:52 +0900 | [diff] [blame] | 26 | quiet_cmd_dtb_install = INSTALL $@ |
| 27 | cmd_dtb_install = install -D $< $@ |
Robert Richter | 323a028 | 2014-09-03 16:17:02 +0200 | [diff] [blame] | 28 | |
Masahiro Yamada | aefd803 | 2020-03-07 02:08:52 +0900 | [diff] [blame] | 29 | $(dst)/%.dtb: $(obj)/%.dtb |
| 30 | $(call cmd,dtb_install) |
Robert Richter | 323a028 | 2014-09-03 16:17:02 +0200 | [diff] [blame] | 31 | |
Masahiro Yamada | aefd803 | 2020-03-07 02:08:52 +0900 | [diff] [blame] | 32 | PHONY += $(subdirs) |
| 33 | $(subdirs): |
| 34 | $(Q)$(MAKE) $(dtbinst)=$@ dst=$(patsubst $(obj)/%,$(dst)/%,$@) |
Robert Richter | 9fb5e53 | 2014-09-03 15:29:24 +0200 | [diff] [blame] | 35 | |
| 36 | .PHONY: $(PHONY) |