Alexander Martinz | e925b6f | 2022-04-08 08:52:53 +0200 | [diff] [blame] | 1 | # |
Alexander Martinz | 338f76d | 2023-01-18 08:44:45 +0100 | [diff] [blame] | 2 | # Copyright (C) 2022-2023 SHIFT GmbH |
Alexander Martinz | e925b6f | 2022-04-08 08:52:53 +0200 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: Apache-2.0 |
| 5 | # |
| 6 | |
Alexander Martinz | cc0b720 | 2022-05-31 10:20:59 +0200 | [diff] [blame] | 7 | ### AVB |
| 8 | |
Alexander Martinz | 338f76d | 2023-01-18 08:44:45 +0100 | [diff] [blame] | 9 | # Enable AVB 2.0 |
| 10 | BOARD_AVB_ENABLE := true |
| 11 | |
Alexander Martinz | d197474 | 2023-01-04 22:34:09 +0100 | [diff] [blame] | 12 | #ifeq ($(WITH_GMS_MAINLINE),true) |
| 13 | # PRIVATE_KEY_PATH := vendor/shiftos/private/keys/mainline/avb-4096.pem |
| 14 | #else |
Alexander Martinz | cc0b720 | 2022-05-31 10:20:59 +0200 | [diff] [blame] | 15 | PRIVATE_KEY_PATH := vendor/shiftos/private/keys/stock/avb-4096.pem |
Alexander Martinz | d197474 | 2023-01-04 22:34:09 +0100 | [diff] [blame] | 16 | #endif |
Alexander Martinz | cc0b720 | 2022-05-31 10:20:59 +0200 | [diff] [blame] | 17 | |
| 18 | # If private key does not exist, fallback to testkey |
| 19 | ifeq ($(wildcard $(PRIVATE_KEY_PATH)),) |
| 20 | PRIVATE_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem |
| 21 | endif |
| 22 | |
| 23 | # AVB - vbmeta |
| 24 | BOARD_AVB_ALGORITHM := SHA256_RSA4096 |
| 25 | BOARD_AVB_KEY_PATH := $(PRIVATE_KEY_PATH) |
| 26 | |
| 27 | # AVB - vbmeta_system |
| 28 | BOARD_AVB_VBMETA_SYSTEM := system system_ext |
| 29 | BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := $(PRIVATE_KEY_PATH) |
| 30 | BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA4096 |
| 31 | BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) |
| 32 | BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 11 |
| 33 | |
| 34 | # AVB - vbmeta_vendor |
| 35 | BOARD_AVB_VBMETA_VENDOR := vendor |
| 36 | BOARD_AVB_VBMETA_VENDOR_KEY_PATH := $(PRIVATE_KEY_PATH) |
| 37 | BOARD_AVB_VBMETA_VENDOR_ALGORITHM := SHA256_RSA4096 |
| 38 | BOARD_AVB_VBMETA_VENDOR_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) |
| 39 | BOARD_AVB_VBMETA_VENDOR_ROLLBACK_INDEX_LOCATION := 12 |
| 40 | |
| 41 | # AVB - clear any set flags |
| 42 | BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS := |
| 43 | |
| 44 | ############################################################# |
| 45 | |
Alexander Martinz | b6fc418 | 2022-12-22 00:04:56 +0100 | [diff] [blame] | 46 | # DRM |
| 47 | TARGET_ENABLE_MEDIADRM_64 := true |
| 48 | |
Alexander Martinz | 97f727f | 2022-04-08 10:01:35 +0200 | [diff] [blame] | 49 | # Kernel |
Alexander Martinz | e925b6f | 2022-04-08 08:52:53 +0200 | [diff] [blame] | 50 | ifeq ($(TARGET_BUILD_VARIANT),eng) |
| 51 | TARGET_KERNEL_CONFIG := axolotl_eng_defconfig |
| 52 | else |
| 53 | ifeq ($(TARGET_BUILD_VARIANT),userdebug) |
| 54 | TARGET_KERNEL_CONFIG := axolotl_userdebug_defconfig |
| 55 | else |
| 56 | TARGET_KERNEL_CONFIG := axolotl_user_defconfig |
| 57 | endif |
| 58 | endif |
Alexander Martinz | b801a9b | 2022-06-01 09:39:48 +0200 | [diff] [blame] | 59 | |
| 60 | # Security patch level |
| 61 | VENDOR_SECURITY_PATCH := $(PLATFORM_SECURITY_PATCH) |
Alexander Martinz | a409892 | 2022-12-22 11:13:52 +0100 | [diff] [blame] | 62 | |
| 63 | # Sepolicy |
| 64 | BOARD_VENDOR_SEPOLICY_DIRS += device/shift/axolotl/shiftos/sepolicy/vendor/automation_setup |