blob: 153cd679228876a5c659a449b17a1d9be33aedf5 [file] [log] [blame]
Alexander Martinz54fdc2d2021-04-22 14:19:05 +02001#
Alexander Martinzae2138e2021-08-26 17:27:03 +02002# Copyright (C) 2021 SHIFT GmbH
3# Copyright (C) 2021 The LineageOS Project
Alexander Martinz54fdc2d2021-04-22 14:19:05 +02004#
Alexander Martinzae2138e2021-08-26 17:27:03 +02005# SPDX-License-Identifier: Apache-2.0
Alexander Martinz54fdc2d2021-04-22 14:19:05 +02006#
7
Kevin F. Haggertydc80eaa2021-04-09 08:18:37 -06008# Use the non-open-source parts
9include vendor/shift/axolotl/BoardConfigVendor.mk
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020010
11DEVICE_PATH := device/shift/axolotl
12
Alexander Martinzae2138e2021-08-26 17:27:03 +020013#####
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020014
15# Architecture
16TARGET_ARCH := arm64
17TARGET_ARCH_VARIANT := armv8-a
18TARGET_CPU_ABI := arm64-v8a
19TARGET_CPU_ABI2 :=
20TARGET_CPU_VARIANT := generic
21TARGET_CPU_VARIANT_RUNTIME := kryo385
22
23TARGET_2ND_ARCH := arm
24TARGET_2ND_ARCH_VARIANT := armv8-2a
25TARGET_2ND_CPU_ABI := armeabi-v7a
26TARGET_2ND_CPU_ABI2 := armeabi
27TARGET_2ND_CPU_VARIANT := generic
28TARGET_2ND_CPU_VARIANT_RUNTIME := kryo385
29
30# Bootloader
31TARGET_BOOTLOADER_BOARD_NAME := sdm845
32TARGET_NO_BOOTLOADER := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020033
Alexander Martinzae2138e2021-08-26 17:27:03 +020034# Display
35TARGET_SCREEN_DENSITY := 420
36
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020037# Kernel
Alexander Martinz904f9872021-08-05 12:55:04 +020038TARGET_NO_KERNEL := false
39TARGET_NO_KERNEL_OVERRIDE := false
40
Alexander Martinz9b928682022-01-14 09:34:39 +010041ifeq ($(TARGET_BUILD_VARIANT),eng)
42 TARGET_KERNEL_CONFIG := lineage_axolotl_eng_defconfig
43else
44 TARGET_KERNEL_CONFIG := lineage_axolotl_defconfig
45endif
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020046TARGET_KERNEL_SOURCE := kernel/shift/sdm845
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020047
Bruno Martins21da5da2022-09-08 12:03:17 +010048TARGET_KERNEL_LLVM_BINUTILS := false
Michael Bestas964a9222022-10-31 20:39:59 +020049TARGET_KERNEL_CLANG_VERSION := r416183b
50TARGET_KERNEL_CLANG_PATH := $(abspath .)/prebuilts/clang/kernel/$(HOST_PREBUILT_TAG)/clang-$(TARGET_KERNEL_CLANG_VERSION)
Bruno Martins21da5da2022-09-08 12:03:17 +010051
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020052BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb
53BOARD_KERNEL_BASE := 0x00000000
54BOARD_KERNEL_PAGESIZE := 4096
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020055
Alexander Martinz9b928682022-01-14 09:34:39 +010056BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom
57# Enable console for eng builds
58ifeq ($(TARGET_BUILD_VARIANT),eng)
59 BOARD_KERNEL_CMDLINE += console=ttyMSM0,115200n8 earlycon=msm_geni_serial,0xA84000
60endif
61BOARD_KERNEL_CMDLINE += androidboot.console=ttyMSM0 printk.devkmsg=on
Alexander Martinz85f3b2f2022-09-22 17:27:45 +020062BOARD_KERNEL_CMDLINE += androidboot.configfs=true loop.max_part=7
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020063BOARD_KERNEL_CMDLINE += msm_rtb.filter=0x237
64BOARD_KERNEL_CMDLINE += ehci-hcd.park=3
65BOARD_KERNEL_CMDLINE += service_locator.enable=1
66BOARD_KERNEL_CMDLINE += androidboot.memcg=1 cgroup.memory=nokmem
67BOARD_KERNEL_CMDLINE += androidboot.usbcontroller=a600000.dwc3 swiotlb=2048
68BOARD_KERNEL_CMDLINE += androidboot.boot_devices=soc/1d84000.ufshc
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020069
Alexander Martinzae2138e2021-08-26 17:27:03 +020070# (BOARD_KERNEL_PAGESIZE * 32)
71BOARD_FLASH_BLOCK_SIZE := 131072
72
73BOARD_KERNEL_SEPARATED_DTBO := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020074BOARD_INCLUDE_DTB_IN_BOOTIMG := true
Alexander Martinzae2138e2021-08-26 17:27:03 +020075BOARD_BOOT_HEADER_VERSION := 2
76BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020077
78# Platform
79TARGET_BOARD_PLATFORM := sdm845
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020080
Alexander Martinzae2138e2021-08-26 17:27:03 +020081#####
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020082
83# AB
84AB_OTA_UPDATER := true
Alexander Martinzae2138e2021-08-26 17:27:03 +020085AB_OTA_PARTITIONS += \
86 boot \
87 dtbo \
88 recovery \
89
90AB_OTA_PARTITIONS += \
Alexander Martinzcd276832023-11-27 15:24:01 +010091 odm \
Alexander Martinzae2138e2021-08-26 17:27:03 +020092 product \
93 system \
94 system_ext \
95 vendor \
96
97AB_OTA_PARTITIONS += \
98 vbmeta \
99 vbmeta_system \
100 vbmeta_vendor \
101
102# AVB
103BOARD_AVB_VBMETA_SYSTEM := system system_ext
104BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
105BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA4096
106BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
Michael Bestas62028092023-01-31 20:28:46 +0200107BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 1
Alexander Martinzae2138e2021-08-26 17:27:03 +0200108
Alexander Martinzcd276832023-11-27 15:24:01 +0100109BOARD_AVB_VBMETA_VENDOR := odm vendor
Alexander Martinzae2138e2021-08-26 17:27:03 +0200110BOARD_AVB_VBMETA_VENDOR_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
111BOARD_AVB_VBMETA_VENDOR_ALGORITHM := SHA256_RSA4096
112BOARD_AVB_VBMETA_VENDOR_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
Michael Bestas62028092023-01-31 20:28:46 +0200113BOARD_AVB_VBMETA_VENDOR_ROLLBACK_INDEX_LOCATION := 2
Alexander Martinzae2138e2021-08-26 17:27:03 +0200114
115# Enable AVB 2.0
116BOARD_AVB_ENABLE := true
117
118# Build the image with verity pre-disabled - https://android.googlesource.com/platform/external/avb/+/58305521295e51cb52a74d8d8bbaed738cf0767a
Nolen Johnson4c0f6842021-05-09 16:04:34 -0400119BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3
Alexander Martinzae2138e2021-08-26 17:27:03 +0200120
121#####
122
123# ANT+
124BOARD_ANT_WIRELESS_DEVICE := "qualcomm-hidl"
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200125
126# APEX
127DEXPREOPT_GENERATE_APEX_IMAGE := true
128
129# Audio
Alexander Martinzae2138e2021-08-26 17:27:03 +0200130AUDIO_FEATURE_ENABLED_AUDIOSPHERE := true
131AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true
Alexander Martinzae2138e2021-08-26 17:27:03 +0200132AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
Alexander Martinzae2138e2021-08-26 17:27:03 +0200133BOARD_USES_ALSA_AUDIO := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200134
Alexander Martinz3f93efe2022-11-11 16:06:29 +0100135# Audio - Sound Trigger
136BOARD_SUPPORTS_SOUND_TRIGGER := true
137BOARD_SUPPORTS_OPENSOURCE_STHAL := true
138
Alexander Martinzae2138e2021-08-26 17:27:03 +0200139# Filesystem
140TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/rootdir/config.fs
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200141
Michael Bestas39f97cd2023-05-12 04:18:32 +0300142# GPS
143BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default
Michael Bestas39f97cd2023-05-12 04:18:32 +0300144
Alexander Martinzae2138e2021-08-26 17:27:03 +0200145# Graphics
146TARGET_USES_GRALLOC1 := true
147TARGET_USES_HWC2 := true
148TARGET_USES_ION := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200149
Alexander Martinzae2138e2021-08-26 17:27:03 +0200150# HIDL
Bruno Martins3d0f0bf2022-04-05 10:34:38 +0100151DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
Michael Bestas049d8742024-06-15 00:50:24 +0300152 $(DEVICE_PATH)/vintf/framework_compatibility_matrix.xml \
Michael Bestasf3d03362024-06-15 00:46:19 +0300153 hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml \
Michael Bestas7f4f9032024-06-17 10:41:47 +0300154 hardware/qcom-caf/common/vendor_framework_compatibility_matrix_legacy.xml \
Michael Bestasf3d03362024-06-15 00:46:19 +0300155 vendor/lineage/config/device_framework_matrix.xml
Alexander Martinzae2138e2021-08-26 17:27:03 +0200156DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/vintf/manifest.xml
Bruno Martins492b09b2024-02-08 17:05:32 +0000157DEVICE_MATRIX_FILE := hardware/qcom-caf/common/compatibility_matrix.xml
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200158
Alexander Martinzae2138e2021-08-26 17:27:03 +0200159# Light
160TARGET_PROVIDES_LIBLIGHT := true
161
162# LMKD
163TARGET_LMKD_STATS_LOG := true
164
Alexander Martinzae2138e2021-08-26 17:27:03 +0200165# Power
166TARGET_TAP_TO_WAKE_NODE := "/proc/touchpanel/double_tap_enable"
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200167
168# Qualcomm BSP
169BOARD_USES_QCOM_HARDWARE := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200170
Sal Savage601310e2022-04-15 15:38:17 -0700171# Properties
172TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop
173
Alexander Martinzae2138e2021-08-26 17:27:03 +0200174# Recovery
175BOARD_INCLUDE_RECOVERY_DTBO := true
Alexander Martinz32079de2022-01-07 12:18:10 +0100176TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/etc/fstab.axolotl
Alexander Martinzae2138e2021-08-26 17:27:03 +0200177TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
178TARGET_RECOVERY_UI_LIB := libfstab
Michael Bestas2d668bb2022-10-14 07:09:19 +0300179TARGET_RECOVERY_UI_MARGIN_HEIGHT := 16
180TARGET_RECOVERY_UI_MARGIN_WIDTH := 16
Alexander Martinzae2138e2021-08-26 17:27:03 +0200181
Alexander Martinzae2138e2021-08-26 17:27:03 +0200182# RIL
183ENABLE_VENDOR_RIL_SERVICE := true
184
185# Security patch level
Michael Bestas54fd9342024-11-30 22:29:10 +0200186BOOT_SECURITY_PATCH := 2024-07-05
187VENDOR_SECURITY_PATCH := 2024-07-05
Alexander Martinzae2138e2021-08-26 17:27:03 +0200188
Alexander Martinzd0f142d2021-12-20 09:26:53 +0100189# SELinux
Bruno Martinsd3320722023-10-24 18:12:15 +0100190include device/qcom/sepolicy_vndr/SEPolicy.mk
Alexander Martinzae2138e2021-08-26 17:27:03 +0200191BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor
192
193# Treble
194BOARD_VNDK_VERSION := current
195BOARD_SYSTEMSDK_VERSIONS := 29
196
197# WLAN
198BOARD_WLAN_DEVICE := qcwcn
199BOARD_HOSTAPD_DRIVER := NL80211
200BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
201BOARD_WPA_SUPPLICANT_DRIVER := NL80211
202BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
Alexander Martinz424914f2022-10-18 14:48:52 +0200203#WIFI_DRIVER_DEFAULT := qca_cld3
Alexander Martinzae2138e2021-08-26 17:27:03 +0200204WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan"
205WIFI_DRIVER_STATE_OFF := "OFF"
206WIFI_DRIVER_STATE_ON := "ON"
207WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
208WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
209WPA_SUPPLICANT_VERSION := VER_0_8_X
210
211##### Partition handling
212
Alexander Martinzae2138e2021-08-26 17:27:03 +0200213BOARD_DYNAMIC_PARTITION_ENABLE := true
214
215# Define the Dynamic Partition sizes and groups.
216BOARD_SUPER_PARTITION_SIZE := 12884901888
217BOARD_SUPER_PARTITION_GROUPS := axolotl_dynamic_partitions
218BOARD_AXOLOTL_DYNAMIC_PARTITIONS_SIZE := 6438256640
219BOARD_AXOLOTL_DYNAMIC_PARTITIONS_PARTITION_LIST := \
Alexander Martinzcd276832023-11-27 15:24:01 +0100220 odm \
Alexander Martinzae2138e2021-08-26 17:27:03 +0200221 product \
222 system \
223 system_ext \
224 vendor \
225
226# Set error limit to BOARD_SUPER_PARTITON_SIZE - 500MB
227BOARD_SUPER_PARTITION_ERROR_LIMIT := 12360613888
228
229# boot.img
230BOARD_BOOTIMAGE_PARTITION_SIZE := 0x04000000
231
232# dtbo.img
233BOARD_DTBOIMG_PARTITION_SIZE := 0x0800000
234
235# metadata.img
236BOARD_METADATAIMAGE_PARTITION_SIZE := 16777216
237BOARD_USES_METADATA_PARTITION := true
238
Alexander Martinzcd276832023-11-27 15:24:01 +0100239# odm.img
240BOARD_USES_ODMIMAGE := true
241BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
242TARGET_COPY_OUT_ODM := odm
243
Alexander Martinzae2138e2021-08-26 17:27:03 +0200244# persist.img
245BOARD_PERSISTIMAGE_PARTITION_SIZE := 33554432
246BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4
247
248# product.img
249BOARD_USES_PRODUCTIMAGE := true
250BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
251TARGET_COPY_OUT_PRODUCT := product
252
253# recovery.img
254BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x06000000
255
256# system.img
257BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4
258
259# system_ext.img
260BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
261TARGET_COPY_OUT_SYSTEM_EXT := system_ext
262
263# userdata.img
264TARGET_USERIMAGES_USE_EXT4 := true
265TARGET_USERIMAGES_USE_F2FS := true
Alexander Martinzaaa2ec52023-11-27 11:54:49 +0100266BOARD_USERDATAIMAGE_PARTITION_SIZE := 108982120448
Alexander Martinzae2138e2021-08-26 17:27:03 +0200267
268# vendor.img
269BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
270
271# vendor.img - split
Alexander Martinzae2138e2021-08-26 17:27:03 +0200272TARGET_COPY_OUT_VENDOR := vendor
Alexander Martinzae2138e2021-08-26 17:27:03 +0200273
274# Reserve space for gapps installation and other customizations
Michael Bestas336ab8b2023-11-22 15:51:28 +0200275-include vendor/lineage/config/BoardConfigReservedSize.mk
Alexander Martinz245360f2022-04-08 08:48:22 +0200276
277# Include ShiftOS specific BoardConfig if existing
278-include device/shift/axolotl/shiftos/BoardConfig.mk