blob: 1e4ffe27ef4a07be986b9fcdf762b6257631b1b2 [file] [log] [blame]
Alexander Martinze925b6f2022-04-08 08:52:53 +02001#
Alexander Martinz338f76d2023-01-18 08:44:45 +01002# Copyright (C) 2022-2023 SHIFT GmbH
Alexander Martinze925b6f2022-04-08 08:52:53 +02003#
4# SPDX-License-Identifier: Apache-2.0
5#
6
Alexander Martinzcc0b7202022-05-31 10:20:59 +02007### AVB
8
Alexander Martinz338f76d2023-01-18 08:44:45 +01009# Enable AVB 2.0
10BOARD_AVB_ENABLE := true
11
Alexander Martinzff3dd8e2023-02-07 12:27:53 +010012ifeq ($(WITH_GMS_MAINLINE),true)
13 PRIVATE_KEY_PATH := vendor/shiftos/private/keys/mainline/avb-4096.pem
14else
Alexander Martinzcc0b7202022-05-31 10:20:59 +020015 PRIVATE_KEY_PATH := vendor/shiftos/private/keys/stock/avb-4096.pem
Alexander Martinzff3dd8e2023-02-07 12:27:53 +010016endif
Alexander Martinzcc0b7202022-05-31 10:20:59 +020017
18# If private key does not exist, fallback to testkey
19ifeq ($(wildcard $(PRIVATE_KEY_PATH)),)
20 PRIVATE_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
21endif
22
23# AVB - vbmeta
24BOARD_AVB_ALGORITHM := SHA256_RSA4096
25BOARD_AVB_KEY_PATH := $(PRIVATE_KEY_PATH)
26
27# AVB - vbmeta_system
28BOARD_AVB_VBMETA_SYSTEM := system system_ext
29BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := $(PRIVATE_KEY_PATH)
30BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA4096
31BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
32BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 11
33
34# AVB - vbmeta_vendor
35BOARD_AVB_VBMETA_VENDOR := vendor
36BOARD_AVB_VBMETA_VENDOR_KEY_PATH := $(PRIVATE_KEY_PATH)
37BOARD_AVB_VBMETA_VENDOR_ALGORITHM := SHA256_RSA4096
38BOARD_AVB_VBMETA_VENDOR_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
39BOARD_AVB_VBMETA_VENDOR_ROLLBACK_INDEX_LOCATION := 12
40
41# AVB - clear any set flags
42BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS :=
43
44#############################################################
45
Alexander Martinzb6fc4182022-12-22 00:04:56 +010046# DRM
47TARGET_ENABLE_MEDIADRM_64 := true
48
Alexander Martinz97f727f2022-04-08 10:01:35 +020049# Kernel
Alexander Martinze925b6f2022-04-08 08:52:53 +020050ifeq ($(TARGET_BUILD_VARIANT),eng)
51 TARGET_KERNEL_CONFIG := axolotl_eng_defconfig
52else
53 ifeq ($(TARGET_BUILD_VARIANT),userdebug)
54 TARGET_KERNEL_CONFIG := axolotl_userdebug_defconfig
55 else
56 TARGET_KERNEL_CONFIG := axolotl_user_defconfig
57 endif
58endif
Alexander Martinzb801a9b2022-06-01 09:39:48 +020059
60# Security patch level
61VENDOR_SECURITY_PATCH := $(PLATFORM_SECURITY_PATCH)
Alexander Martinza4098922022-12-22 11:13:52 +010062
63# Sepolicy
64BOARD_VENDOR_SEPOLICY_DIRS += device/shift/axolotl/shiftos/sepolicy/vendor/automation_setup