gs101: use prebuilt GKI boot.img for production builds
Use:
* boot-user.img for -user builds
* boot.img for -userdebug and -eng builds
Bug: 188095549
Test: make dist (oriole-user)
Test: make dist (oriole-userdebug)
Change-Id: Ic4df227f2b4c261297272f17e6645b7ce1f5d4f3
diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk
index ba119b9..de1b989 100644
--- a/BoardConfig-common.mk
+++ b/BoardConfig-common.mk
@@ -53,8 +53,17 @@
BOARD_BOOTCONFIG += androidboot.boot_devices=14700000.ufs
TARGET_NO_BOOTLOADER := true
-TARGET_NO_KERNEL := false
TARGET_NO_RADIOIMAGE := true
+ifeq (,$(TARGET_PREBUILT_KERNEL))
+TARGET_NO_KERNEL := true
+ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
+BOARD_PREBUILT_BOOTIMAGE := $(TARGET_KERNEL_DIR)/boot.img
+else
+BOARD_PREBUILT_BOOTIMAGE := $(TARGET_KERNEL_DIR)/boot-user.img
+endif
+else
+TARGET_NO_KERNEL := false
+endif
BOARD_USES_GENERIC_KERNEL_IMAGE := true
BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT := true
BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT := true