linux-stable/scripts/Makefile.dtbinst
Viresh Kumar ce88c9c794 kbuild: Add support to build overlays (%.dtbo)
Add support for building DT overlays (%.dtbo). The overlay's source file
will have the usual extension, i.e. .dts, though the blob will have
.dtbo extension to distinguish it from normal blobs.

Acked-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/434ba2467dd0cd011565625aeb3450650afe0aae.1611904394.git.viresh.kumar@linaro.org
2021-02-04 09:00:04 -06:00

39 lines
988 B
Makefile

# SPDX-License-Identifier: GPL-2.0
# ==========================================================================
# 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
# ==========================================================================
src := $(obj)
PHONY := __dtbs_install
__dtbs_install:
include include/config/auto.conf
include scripts/Kbuild.include
include $(src)/Makefile
dtbs := $(addprefix $(dst)/, $(dtb-y) $(if $(CONFIG_OF_ALL_DTBS),$(dtb-)))
subdirs := $(addprefix $(obj)/, $(subdir-y) $(subdir-m))
__dtbs_install: $(dtbs) $(subdirs)
@:
quiet_cmd_dtb_install = INSTALL $@
cmd_dtb_install = install -D $< $@
$(dst)/%.dtb: $(obj)/%.dtb
$(call cmd,dtb_install)
$(dst)/%.dtbo: $(obj)/%.dtbo
$(call cmd,dtb_install)
PHONY += $(subdirs)
$(subdirs):
$(Q)$(MAKE) $(dtbinst)=$@ dst=$(patsubst $(obj)/%,$(dst)/%,$@)
.PHONY: $(PHONY)