Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8456bd7c authored by Robert Richter's avatar Robert Richter Committed by Kevin Hilman
Browse files

dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst



Move dtbs install rules to Makefile.dtbinst. This change is needed to
implement support for dts vendor subdirs. The change makes Makefiles
easier and smaller as no longer the dtbs_install rule needs to be
defined. Another advantage is that install goals are not encoded in
targets anymore (%.dtb_dtbinst_).

Signed-off-by: default avatarRobert Richter <rrichter@cavium.com>
(cherry picked from commit 9fb5e5372208973984a23ee6f5f025c05d364633)
Signed-off-by: default avatarKevin Hilman <khilman@linaro.org>
parent aee1c7f3
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -312,9 +312,13 @@ $(INSTALL_TARGETS):
	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@

PHONY += dtbs dtbs_install
dtbs dtbs_install: prepare scripts

dtbs: prepare scripts
	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $@

dtbs_install:
	$(Q)$(MAKE) $(dtbinst)=$(boot)/dts MACHINE=$(MACHINE)

# We use MRPROPER_FILES and CLEAN_FILES now
archclean:
	$(Q)$(MAKE) $(clean)=$(boot)
+0 −2
Original line number Diff line number Diff line
@@ -527,5 +527,3 @@ dtbs: $(addprefix $(obj)/, $(dtb-y))
	$(Q)rm -f $(obj)/../*.dtb

clean-files := *.dtb

dtbs_install: $(addsuffix _dtbinst_, $(dtb-y))
+5 −1
Original line number Diff line number Diff line
@@ -71,9 +71,13 @@ zinstall install: vmlinux
	$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@

PHONY += dtbs dtbs_install
dtbs dtbs_install: prepare scripts

dtbs: prepare scripts
	$(Q)$(MAKE) $(build)=$(boot)/dts $@

dtbs_install:
	$(Q)$(MAKE) $(dtbinst)=$(boot)/dts

PHONY += vdso_install
vdso_install:
	$(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso $@
+0 −2
Original line number Diff line number Diff line
@@ -8,5 +8,3 @@ targets += $(dtb-y)
dtbs: $(addprefix $(obj)/, $(dtb-y))

clean-files := *.dtb

dtbs_install: $(addsuffix _dtbinst_, $(dtb-y))
+6 −0
Original line number Diff line number Diff line
@@ -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)), \
Loading