blob: cf2e446c6ed8e1a36f63462467310f874a58f1bf [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
Alexander Martinz70a078b2023-11-28 10:18:53 +010035BOARD_AVB_VBMETA_VENDOR := odm vendor
Alexander Martinzcc0b7202022-05-31 10:20:59 +020036BOARD_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 Martinz6c0f3ef2024-06-27 10:48:01 +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
Alexander Martinzcceefc52024-06-27 10:52:34 +020055 TARGET_KERNEL_CONFIG += vendor/debugfs.config
Alexander Martinz6c0f3ef2024-06-27 10:48:01 +020056 else
57 TARGET_KERNEL_CONFIG := axolotl_user_defconfig
Alexander Martinzcceefc52024-06-27 10:52:34 +020058 TARGET_KERNEL_CONFIG += vendor/debugfs.config
Alexander Martinz6c0f3ef2024-06-27 10:48:01 +020059 endif
Alexander Martinze925b6f2022-04-08 08:52:53 +020060endif
Alexander Martinzb801a9b2022-06-01 09:39:48 +020061
62# Security patch level
63VENDOR_SECURITY_PATCH := $(PLATFORM_SECURITY_PATCH)
Alexander Martinza4098922022-12-22 11:13:52 +010064
65# Sepolicy
66BOARD_VENDOR_SEPOLICY_DIRS += device/shift/axolotl/shiftos/sepolicy/vendor/automation_setup
Alexander Martinz03ccc3f2023-09-08 17:59:35 +020067
68# Super
69BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true