blob: 1e9305bb7464bf9af9f278c5501191e8faf7b076 [file] [log] [blame]
Alexander Martinze925b6f2022-04-08 08:52:53 +02001#
2# Copyright (C) 2022 SHIFT GmbH
3#
4# SPDX-License-Identifier: Apache-2.0
5#
6
Alexander Martinzcc0b7202022-05-31 10:20:59 +02007### AVB
8
9ifeq ($(WITH_GMS_MAINLINE),true)
10 PRIVATE_KEY_PATH := vendor/shiftos/private/keys/mainline/avb-4096.pem
11else
12 PRIVATE_KEY_PATH := vendor/shiftos/private/keys/stock/avb-4096.pem
13endif
14
15# If private key does not exist, fallback to testkey
16ifeq ($(wildcard $(PRIVATE_KEY_PATH)),)
17 PRIVATE_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
18endif
19
20# AVB - vbmeta
21BOARD_AVB_ALGORITHM := SHA256_RSA4096
22BOARD_AVB_KEY_PATH := $(PRIVATE_KEY_PATH)
23
24# AVB - vbmeta_system
25BOARD_AVB_VBMETA_SYSTEM := system system_ext
26BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := $(PRIVATE_KEY_PATH)
27BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA4096
28BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
29BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 11
30
31# AVB - vbmeta_vendor
32BOARD_AVB_VBMETA_VENDOR := vendor
33BOARD_AVB_VBMETA_VENDOR_KEY_PATH := $(PRIVATE_KEY_PATH)
34BOARD_AVB_VBMETA_VENDOR_ALGORITHM := SHA256_RSA4096
35BOARD_AVB_VBMETA_VENDOR_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
36BOARD_AVB_VBMETA_VENDOR_ROLLBACK_INDEX_LOCATION := 12
37
38# AVB - clear any set flags
39BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS :=
40
41#############################################################
42
Alexander Martinz97f727f2022-04-08 10:01:35 +020043# Kernel
Alexander Martinze925b6f2022-04-08 08:52:53 +020044ifeq ($(TARGET_BUILD_VARIANT),eng)
45 TARGET_KERNEL_CONFIG := axolotl_eng_defconfig
46else
47 ifeq ($(TARGET_BUILD_VARIANT),userdebug)
48 TARGET_KERNEL_CONFIG := axolotl_userdebug_defconfig
49 else
50 TARGET_KERNEL_CONFIG := axolotl_user_defconfig
51 endif
52endif
Alexander Martinzb801a9b2022-06-01 09:39:48 +020053
54# Security patch level
55VENDOR_SECURITY_PATCH := $(PLATFORM_SECURITY_PATCH)