From 90711737ad68b35219074e681f447d64c05a11ef Mon Sep 17 00:00:00 2001 From: Jeevan Shriram Date: Wed, 15 Feb 2017 01:14:22 -0800 Subject: [PATCH] ARM: build correct dtbs to append to zImage The boot/dts/Makefile and boot/dts/*/Makefile provide DTB_LIST which is equal to dtb-y when CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE=y. Include these Makefiles to build dtbs for dtb appended zImage. Change-Id: Ib8218135dc923d1ba4098d74dbd7da159368a188 Signed-off-by: Joonwoo Park [abhimany: resolve trivial merge conflict] Signed-off-by: Abhimanyu Kapur [sramana: Fixed merge conflicts] Signed-off-by: Srinivas Ramana [jshriram: Fix trivial merge conflicts] Signed-off-by: Jeevan Shriram [akdwived: Fix trivial merge conflicts] Signed-off-by: Avaneesh Kumar Dwivedi --- arch/arm/Makefile | 11 +++++++++++ arch/arm/boot/Makefile | 6 ++++-- arch/arm/boot/dts/Makefile | 6 ++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/arch/arm/Makefile b/arch/arm/Makefile index db857d07114f..d98f977b0162 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -318,6 +318,7 @@ endif all: $(notdir $(KBUILD_IMAGE)) +DTSSUBDIR := qcom archheaders: $(Q)$(MAKE) $(build)=arch/arm/tools uapi @@ -343,12 +344,22 @@ $(BOOT_TARGETS): vmlinux $(INSTALL_TARGETS): $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ +%.dtb: | scripts + $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@ + +dtbs: scripts + $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) dtbs + $(foreach DIR, $(DTSSUBDIR), $(Q)$(MAKE) $(build)=$(boot)/dts/$(DIR) MACHINE=$(MACHINE) dtbs) + PHONY += vdso_install vdso_install: ifeq ($(CONFIG_VDSO),y) $(Q)$(MAKE) $(build)=arch/arm/vdso $@ endif +zImage-dtb: vmlinux scripts dtbs + $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) DTSSUBDIR=$(DTSSUBDIR) $(boot)/$@ + # We use MRPROPER_FILES and CLEAN_FILES now archclean: $(Q)$(MAKE) $(clean)=$(boot) diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index 0b3cd7a33a26..9ac38e172e08 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile @@ -13,8 +13,10 @@ OBJCOPYFLAGS :=-O binary -R .comment -S -ifneq ($(MACHINE),) -include $(MACHINE)/Makefile.boot +include $(srctree)/arch/arm/boot/dts/Makefile +ifneq ($(DTSSUBDIR),) +DTSSUBDIR_INCS=$(foreach DIR, $(DTSSUBDIR), $(addsuffix /Makefile, $(addprefix $(srctree)/arch/arm/boot/dts/, $(DIR)))) +include $(DTSSUBDIR_INCS) endif # Note: the following conditions must always be true: diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index b21b3a64641a..4dbd3e340447 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1303,3 +1303,9 @@ dtb-$(CONFIG_ARCH_ASPEED) += \ aspeed-bmc-opp-zaius.dtb \ aspeed-bmc-portwell-neptune.dtb \ aspeed-bmc-quanta-q71l.dtb + +dtstree := $(srctree)/$(src) +vendor := $(dtstree)/vendor +ifneq "$(wildcard $(vendor)/Makefile)" "" + subdir-y += vendor +endif