build: make: Separate built and A/B OTA partitions

This commit is contained in:
Danny Lin 2021-12-13 19:03:03 -08:00
parent d1a2c403c0
commit ff79f64a6e

View file

@ -37,6 +37,7 @@ export interface ModulesMakefile {
} }
export interface BoardMakefile { export interface BoardMakefile {
buildPartitions?: Array<string>
abOtaPartitions?: Array<string> abOtaPartitions?: Array<string>
boardInfo?: string boardInfo?: string
@ -143,17 +144,17 @@ export function serializeBoardMakefile(mk: BoardMakefile) {
blocks.push('BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true') blocks.push('BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true')
// Build vendor? // Build vendor?
if (mk.abOtaPartitions?.includes('vendor')) { if (mk.buildPartitions?.includes('vendor')) {
blocks.push('BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4') blocks.push('BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4')
} }
// Build DLKM partitions? // Build DLKM partitions?
if (mk.abOtaPartitions?.includes('vendor_dlkm')) { if (mk.buildPartitions?.includes('vendor_dlkm')) {
blocks.push(`BOARD_USES_VENDOR_DLKMIMAGE := true blocks.push(`BOARD_USES_VENDOR_DLKMIMAGE := true
BOARD_VENDOR_DLKMIMAGE_FILE_SYSTEM_TYPE := ext4 BOARD_VENDOR_DLKMIMAGE_FILE_SYSTEM_TYPE := ext4
TARGET_COPY_OUT_VENDOR_DLKM := vendor_dlkm`) TARGET_COPY_OUT_VENDOR_DLKM := vendor_dlkm`)
} }
if (mk.abOtaPartitions?.includes('odm_dlkm')) { if (mk.buildPartitions?.includes('odm_dlkm')) {
blocks.push(`BOARD_USES_ODM_DLKIMAGE := true blocks.push(`BOARD_USES_ODM_DLKIMAGE := true
BOARD_ODM_DLKIMAGE_FILE_SYSTEM_TYPE := ext4 BOARD_ODM_DLKIMAGE_FILE_SYSTEM_TYPE := ext4
TARGET_COPY_OUT_ODM_DLKM := odm_dlkm`) TARGET_COPY_OUT_ODM_DLKM := odm_dlkm`)