blob: c1ec479fe364bc17c6212c398f2f11c98b1cf24b [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 Martinze75923c2023-10-17 18:55:34 +020050ifeq ($(TARGET_BUILD_VARIANT),userdebug)
51 TARGET_KERNEL_CONFIG += vendor/shift/debug.config
52
53 # Enable console for userdebug
54 BOARD_KERNEL_CMDLINE += console=ttyMSM0,115200n8 earlycon=msm_geni_serial,0xA84000
Alexander Martinze925b6f2022-04-08 08:52:53 +020055endif
Alexander Martinzb801a9b2022-06-01 09:39:48 +020056
57# Security patch level
58VENDOR_SECURITY_PATCH := $(PLATFORM_SECURITY_PATCH)
Alexander Martinza4098922022-12-22 11:13:52 +010059
60# Sepolicy
61BOARD_VENDOR_SEPOLICY_DIRS += device/shift/axolotl/shiftos/sepolicy/vendor/automation_setup
Alexander Martinz03ccc3f2023-09-08 17:59:35 +020062
63# Super
64BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true