vendor: kernel: Add back support for custom dtboimg makefile
It was removed accidentally in commit fe00ea9.
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Change-Id: Icadd7b17b3a732fc2c8aa14f1e4dbd4bc66eb7f9
diff --git a/build/tasks/kernel.mk b/build/tasks/kernel.mk
index 9d82f96..c1bf023 100644
--- a/build/tasks/kernel.mk
+++ b/build/tasks/kernel.mk
@@ -43,6 +43,8 @@
#
# BOARD_DTBO_CFG = Path to a mkdtboimg.py config file
#
+# BOARD_CUSTOM_DTBOIMG_MK = Path to a custom dtboimage makefile
+#
# KERNEL_CC = The C Compiler used. This is automatically set based
# on whether the clang version is set, optional.
#
@@ -284,6 +286,9 @@
$(call make-kernel-target,alldefconfig)
ifeq (true,$(filter true, $(TARGET_NEEDS_DTBOIMAGE) $(BOARD_KERNEL_SEPARATED_DTBO)))
+ifneq ($(BOARD_CUSTOM_DTBOIMG_MK),)
+include $(BOARD_CUSTOM_DTBOIMG_MK)
+else
MKDTIMG := $(HOST_OUT_EXECUTABLES)/mkdtimg$(HOST_EXECUTABLE_SUFFIX)
MKDTBOIMG := $(HOST_OUT_EXECUTABLES)/mkdtboimg.py$(HOST_EXECUTABLE_SUFFIX)
$(BOARD_PREBUILT_DTBOIMAGE): $(DTC) $(MKDTIMG) $(MKDTBOIMG)
@@ -303,6 +308,7 @@
$(call make-dtbo-target,$(KERNEL_DEFCONFIG))
$(call make-dtbo-target,dtbo.img)
endif # BOARD_KERNEL_SEPARATED_DTBO
+endif # BOARD_CUSTOM_DTBOIMG_MK
endif # TARGET_NEEDS_DTBOIMAGE/BOARD_KERNEL_SEPARATED_DTBO
ifeq ($(BOARD_INCLUDE_DTB_IN_BOOTIMG),true)