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 | ff3dd8e | 2023-02-07 12:27:53 +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 | ff3dd8e | 2023-02-07 12:27:53 +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 |
Alexander Martinz | 70a078b | 2023-11-28 10:18:53 +0100 | [diff] [blame] | 35 | BOARD_AVB_VBMETA_VENDOR := odm vendor |
Alexander Martinz | cc0b720 | 2022-05-31 10:20:59 +0200 | [diff] [blame] | 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 | 6c0f3ef | 2024-06-27 10:48:01 +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 |
Alexander Martinz | cceefc5 | 2024-06-27 10:52:34 +0200 | [diff] [blame] | 55 | TARGET_KERNEL_CONFIG += vendor/debugfs.config |
Alexander Martinz | 6c0f3ef | 2024-06-27 10:48:01 +0200 | [diff] [blame] | 56 | else |
| 57 | TARGET_KERNEL_CONFIG := axolotl_user_defconfig |
Alexander Martinz | cceefc5 | 2024-06-27 10:52:34 +0200 | [diff] [blame] | 58 | TARGET_KERNEL_CONFIG += vendor/debugfs.config |
Alexander Martinz | 6c0f3ef | 2024-06-27 10:48:01 +0200 | [diff] [blame] | 59 | endif |
Alexander Martinz | e925b6f | 2022-04-08 08:52:53 +0200 | [diff] [blame] | 60 | endif |
Alexander Martinz | b801a9b | 2022-06-01 09:39:48 +0200 | [diff] [blame] | 61 | |
Alexander Martinz | 7466c00 | 2024-09-10 09:04:13 +0200 | [diff] [blame^] | 62 | # Enable console for non-user builds |
| 63 | ifneq ($(TARGET_BUILD_VARIANT),user) |
| 64 | BOARD_KERNEL_CMDLINE += console=ttyMSM0,115200n8 earlycon=msm_geni_serial,0xA84000 |
| 65 | endif |
| 66 | |
Alexander Martinz | b801a9b | 2022-06-01 09:39:48 +0200 | [diff] [blame] | 67 | # Security patch level |
| 68 | VENDOR_SECURITY_PATCH := $(PLATFORM_SECURITY_PATCH) |
Alexander Martinz | a409892 | 2022-12-22 11:13:52 +0100 | [diff] [blame] | 69 | |
| 70 | # Sepolicy |
| 71 | BOARD_VENDOR_SEPOLICY_DIRS += device/shift/axolotl/shiftos/sepolicy/vendor/automation_setup |
Alexander Martinz | 03ccc3f | 2023-09-08 17:59:35 +0200 | [diff] [blame] | 72 | |
| 73 | # Super |
| 74 | BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true |