summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetri Gynther <pgynther@google.com>2021-10-01 02:26:57 +0000
committerRobin Peng <robinpeng@google.com>2022-03-24 16:53:48 +0000
commit19c92aa321b844a84cfde3edbf4b6eeaf9e0e9e6 (patch)
tree50ba12a8a6aa36543f1c5ed0fd57609c0546fb68
parent7230a6cbd457d903256327888850e9fbbbb48be7 (diff)
downloadgs201-19c92aa321b844a84cfde3edbf4b6eeaf9e0e9e6.tar.gz
gs201: use prebuilt GKI boot.img for production builds
When $(TARGET_KERNEL_DIR) contains: * boot.img * boot-user.img then use those as prebuilt boot images for the target build. Note that debug kernels (e.g. $(TARGET_KERNEL_DIR)/kasan) only have Image.lz4, so the debug build ends up building boot.img from source Bug: 223663549 Change-Id: If9d2b1041108cec8fc0481e4b633502371d6f987
-rw-r--r--BoardConfig-common.mk11
1 files changed, 10 insertions, 1 deletions
diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk
index 310cbea..eebe31c 100644
--- a/BoardConfig-common.mk
+++ b/BoardConfig-common.mk
@@ -42,8 +42,17 @@ BOARD_KERNEL_CMDLINE += swiotlb=noforce
BOARD_BOOTCONFIG += androidboot.boot_devices=14700000.ufs
TARGET_NO_BOOTLOADER := true
-TARGET_NO_KERNEL := false
TARGET_NO_RADIOIMAGE := true
+ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
+BOARD_PREBUILT_BOOTIMAGE := $(wildcard $(TARGET_KERNEL_DIR)/boot.img)
+else
+BOARD_PREBUILT_BOOTIMAGE := $(wildcard $(TARGET_KERNEL_DIR)/boot-user.img)
+endif
+ifneq (,$(BOARD_PREBUILT_BOOTIMAGE))
+TARGET_NO_KERNEL := true
+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