kernel: Allow overriding dtbo target name
gs101 kernel uses google/dtbo.img target for dtbo.img
Change-Id: Ib03f35c0035f56d303771de9399bcce3d02c0775
diff --git a/build/tasks/kernel.mk b/build/tasks/kernel.mk
index 55387e7..5ea7962 100644
--- a/build/tasks/kernel.mk
+++ b/build/tasks/kernel.mk
@@ -466,7 +466,7 @@
$(MKDTBOIMG) create $@ --page_size=$(BOARD_KERNEL_PAGESIZE) $(shell find $(DTBO_OUT)/arch/$(KERNEL_ARCH)/boot/dts -type f -name "*.dtbo" | sort)
endif # BOARD_DTBO_CFG
else
- $(call make-dtbo-target,dtbo.img)
+ $(call make-dtbo-target,$(TARGET_KERNEL_DTBO))
endif # BOARD_KERNEL_SEPARATED_DTBO
$(hide) touch -c $(DTBO_OUT)
endif # BOARD_CUSTOM_DTBOIMG_MK
diff --git a/config/BoardConfigKernel.mk b/config/BoardConfigKernel.mk
index ccf8986..6111a9b 100644
--- a/config/BoardConfigKernel.mk
+++ b/config/BoardConfigKernel.mk
@@ -31,6 +31,9 @@
# makefile. Can be overriden in device trees
# in the event of prebuilt kernel.
#
+# TARGET_KERNEL_DTBO = Name of the kernel Makefile target that
+# generates dtbo.img. Defaults to dtbo.img
+#
# KERNEL_TOOLCHAIN_PREFIX = Overrides TARGET_KERNEL_CROSS_COMPILE_PREFIX,
# Set this var in shell to override
# toolchain specified in BoardConfig.mk
@@ -143,7 +146,8 @@
# Set DTBO image locations so the build system knows to build them
ifeq (true,$(filter true, $(TARGET_NEEDS_DTBOIMAGE) $(BOARD_KERNEL_SEPARATED_DTBO)))
-BOARD_PREBUILT_DTBOIMAGE ?= $(TARGET_OUT_INTERMEDIATES)/DTBO_OBJ/arch/$(KERNEL_ARCH)/boot/dtbo.img
+TARGET_KERNEL_DTBO ?= dtbo.img
+BOARD_PREBUILT_DTBOIMAGE ?= $(TARGET_OUT_INTERMEDIATES)/DTBO_OBJ/arch/$(KERNEL_ARCH)/boot/$(TARGET_KERNEL_DTBO)
endif
# Set use the full path to the make command