kernel: Only build dtb.img if prebuilt DTB directory is not set
If the prebuilt directory is set, then the AOSP commands get activated,
which will conflict with ours, so just disable ours if the prebuilt
directory is set.
Change-Id: Ia998ea3d1a2d3403d0261cecae12d8a5c4f689ec
diff --git a/build/tasks/kernel.mk b/build/tasks/kernel.mk
index 270627a..ba70f29 100644
--- a/build/tasks/kernel.mk
+++ b/build/tasks/kernel.mk
@@ -306,11 +306,13 @@
dtboimage: $(INSTALLED_DTBOIMAGE_TARGET)
ifeq ($(BOARD_INCLUDE_DTB_IN_BOOTIMG),true)
+ifeq ($(BOARD_PREBUILT_DTBIMAGE_DIR),)
$(INSTALLED_DTBIMAGE_TARGET):
echo -e ${CL_GRN}"Building DTBs"${CL_RST}
$(call make-dtb-target,$(KERNEL_DEFCONFIG))
$(call make-dtb-target,dtbs)
cat $(shell find $(DTBS_OUT)/arch/$(KERNEL_ARCH)/boot/dts/** -type f -name "*.dtb" | sort) > $@
+endif
.PHONY: dtbimage
dtbimage: $(INSTALLED_DTBIMAGE_TARGET)
endif # BOARD_INCLUDE_DTB_IN_BOOTIMG