tasks: dtbo: Add support for custom dtbo generation rules
Change-Id: I27fdade5eb177a06795fee7cc19066ec161642d9
diff --git a/build/tasks/dtbo.mk b/build/tasks/dtbo.mk
index cbe1214..19e9a7c 100644
--- a/build/tasks/dtbo.mk
+++ b/build/tasks/dtbo.mk
@@ -1,6 +1,10 @@
ifneq ($(TARGET_NO_KERNEL),true)
ifeq ($(strip $(BOARD_KERNEL_SEPARATED_DTBO)),true)
+ifneq ($(BOARD_CUSTOM_DTBOIMG_MK),)
+include $(BOARD_CUSTOM_DTBOIMG_MK)
+else
+
MKDTIMG := $(HOST_OUT_EXECUTABLES)/mkdtimg$(HOST_EXECUTABLE_SUFFIX)
# Most specific paths must come first in possible_dtbo_dirs
@@ -21,5 +25,6 @@
$(BOARD_PREBUILT_DTBOIMAGE): $(MKDTIMG) $(INSTALLED_KERNEL_TARGET)
$(build-dtboimage-target)
+endif # BOARD_CUSTOM_DTBOIMG_MK
endif # BOARD_KERNEL_SEPARATED_DTBO
endif # TARGET_NO_KERNEL