check PLATFORM_SECURITY_PATCH value in product Makefile

On devices that no longer receive vendor updates (e.g. Pixel 4 / 4 XL), PLATFORM_SECURITY_PATCH
should be overriden to correctly indicate that.
This commit is contained in:
Dmitry Muhomor 2023-08-26 15:07:56 +03:00 committed by Daniel Micay
parent 70129836eb
commit 8d8604dbe7
3 changed files with 10 additions and 0 deletions

View file

@ -8,6 +8,7 @@ includes:
device: device:
build_id: TP1A.221005.002.B2 build_id: TP1A.221005.002.B2
prev_build_id: TP1A.221005.002 prev_build_id: TP1A.221005.002
platform_security_patch_level_override: 2022-11-01
filters: filters:
files: files:

View file

@ -246,6 +246,13 @@ PRODUCT_MANUFACTURER := ${mk.manufacturer}`)
endif`) endif`)
} }
let splOverride = config?.device?.platform_security_patch_level_override
if (splOverride !== undefined) {
blocks.push(`ifneq ($(PLATFORM_SECURITY_PATCH),${splOverride})
$(error PLATFORM_SECURITY_PATCH: expected ${splOverride}, got $(PLATFORM_SECURITY_PATCH))
endif`)
}
return finishBlocks(blocks) return finishBlocks(blocks)
} }

View file

@ -29,6 +29,8 @@ export interface DeviceConfig {
system_fs_type: FsType system_fs_type: FsType
build_id: string build_id: string
prev_build_id: string prev_build_id: string
// ignored when undefined
platform_security_patch_level_override?: string
} }
platform: { platform: {