blob: f52b9eb3524315f431c23ff03dd017ee24d211a3 [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 Martinz88e692b2022-02-09 15:33:36 +010013# We copy prebuilt binaries and libs instead of packaging them
14BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
Cole Faust1ccb74a2023-10-03 15:51:10 -070015BUILD_BROKEN_INCORRECT_PARTITION_IMAGES := true
Alexander Martinz88e692b2022-02-09 15:33:36 +010016
Alexander Martinzae2138e2021-08-26 17:27:03 +020017#####
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020018
19# Architecture
20TARGET_ARCH := arm64
21TARGET_ARCH_VARIANT := armv8-a
22TARGET_CPU_ABI := arm64-v8a
23TARGET_CPU_ABI2 :=
24TARGET_CPU_VARIANT := generic
25TARGET_CPU_VARIANT_RUNTIME := kryo385
26
27TARGET_2ND_ARCH := arm
28TARGET_2ND_ARCH_VARIANT := armv8-2a
29TARGET_2ND_CPU_ABI := armeabi-v7a
30TARGET_2ND_CPU_ABI2 := armeabi
31TARGET_2ND_CPU_VARIANT := generic
32TARGET_2ND_CPU_VARIANT_RUNTIME := kryo385
33
34# Bootloader
35TARGET_BOOTLOADER_BOARD_NAME := sdm845
36TARGET_NO_BOOTLOADER := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020037
Alexander Martinzae2138e2021-08-26 17:27:03 +020038# Display
39TARGET_SCREEN_DENSITY := 420
40
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020041# Kernel
Alexander Martinz904f9872021-08-05 12:55:04 +020042TARGET_NO_KERNEL := false
43TARGET_NO_KERNEL_OVERRIDE := false
44
Alexander Martinz9b928682022-01-14 09:34:39 +010045ifeq ($(TARGET_BUILD_VARIANT),eng)
46 TARGET_KERNEL_CONFIG := lineage_axolotl_eng_defconfig
47else
48 TARGET_KERNEL_CONFIG := lineage_axolotl_defconfig
49endif
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020050TARGET_KERNEL_SOURCE := kernel/shift/sdm845
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020051
Bruno Martins21da5da2022-09-08 12:03:17 +010052TARGET_KERNEL_LLVM_BINUTILS := false
Michael Bestas964a9222022-10-31 20:39:59 +020053TARGET_KERNEL_CLANG_VERSION := r416183b
54TARGET_KERNEL_CLANG_PATH := $(abspath .)/prebuilts/clang/kernel/$(HOST_PREBUILT_TAG)/clang-$(TARGET_KERNEL_CLANG_VERSION)
Bruno Martins21da5da2022-09-08 12:03:17 +010055
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020056BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb
57BOARD_KERNEL_BASE := 0x00000000
58BOARD_KERNEL_PAGESIZE := 4096
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020059
Alexander Martinz9b928682022-01-14 09:34:39 +010060BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom
61# Enable console for eng builds
62ifeq ($(TARGET_BUILD_VARIANT),eng)
63 BOARD_KERNEL_CMDLINE += console=ttyMSM0,115200n8 earlycon=msm_geni_serial,0xA84000
64endif
65BOARD_KERNEL_CMDLINE += androidboot.console=ttyMSM0 printk.devkmsg=on
Alexander Martinz85f3b2f2022-09-22 17:27:45 +020066BOARD_KERNEL_CMDLINE += androidboot.configfs=true loop.max_part=7
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020067BOARD_KERNEL_CMDLINE += msm_rtb.filter=0x237
68BOARD_KERNEL_CMDLINE += ehci-hcd.park=3
69BOARD_KERNEL_CMDLINE += service_locator.enable=1
70BOARD_KERNEL_CMDLINE += androidboot.memcg=1 cgroup.memory=nokmem
71BOARD_KERNEL_CMDLINE += androidboot.usbcontroller=a600000.dwc3 swiotlb=2048
72BOARD_KERNEL_CMDLINE += androidboot.boot_devices=soc/1d84000.ufshc
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020073
Alexander Martinzae2138e2021-08-26 17:27:03 +020074# (BOARD_KERNEL_PAGESIZE * 32)
75BOARD_FLASH_BLOCK_SIZE := 131072
76
77BOARD_KERNEL_SEPARATED_DTBO := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020078BOARD_INCLUDE_DTB_IN_BOOTIMG := true
Alexander Martinzae2138e2021-08-26 17:27:03 +020079BOARD_BOOT_HEADER_VERSION := 2
80BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020081
82# Platform
83TARGET_BOARD_PLATFORM := sdm845
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020084
Alexander Martinzae2138e2021-08-26 17:27:03 +020085#####
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020086
87# AB
88AB_OTA_UPDATER := true
Alexander Martinzae2138e2021-08-26 17:27:03 +020089AB_OTA_PARTITIONS += \
90 boot \
91 dtbo \
92 recovery \
93
94AB_OTA_PARTITIONS += \
Alexander Martinzcd276832023-11-27 15:24:01 +010095 odm \
Alexander Martinzae2138e2021-08-26 17:27:03 +020096 product \
97 system \
98 system_ext \
99 vendor \
100
101AB_OTA_PARTITIONS += \
102 vbmeta \
103 vbmeta_system \
104 vbmeta_vendor \
105
106# AVB
107BOARD_AVB_VBMETA_SYSTEM := system system_ext
108BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
109BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA4096
110BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
Michael Bestas62028092023-01-31 20:28:46 +0200111BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 1
Alexander Martinzae2138e2021-08-26 17:27:03 +0200112
Alexander Martinzcd276832023-11-27 15:24:01 +0100113BOARD_AVB_VBMETA_VENDOR := odm vendor
Alexander Martinzae2138e2021-08-26 17:27:03 +0200114BOARD_AVB_VBMETA_VENDOR_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
115BOARD_AVB_VBMETA_VENDOR_ALGORITHM := SHA256_RSA4096
116BOARD_AVB_VBMETA_VENDOR_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
Michael Bestas62028092023-01-31 20:28:46 +0200117BOARD_AVB_VBMETA_VENDOR_ROLLBACK_INDEX_LOCATION := 2
Alexander Martinzae2138e2021-08-26 17:27:03 +0200118
119# Enable AVB 2.0
120BOARD_AVB_ENABLE := true
121
122# Build the image with verity pre-disabled - https://android.googlesource.com/platform/external/avb/+/58305521295e51cb52a74d8d8bbaed738cf0767a
Nolen Johnson4c0f6842021-05-09 16:04:34 -0400123BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3
Alexander Martinzae2138e2021-08-26 17:27:03 +0200124
125#####
126
127# ANT+
128BOARD_ANT_WIRELESS_DEVICE := "qualcomm-hidl"
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200129
130# APEX
131DEXPREOPT_GENERATE_APEX_IMAGE := true
132
133# Audio
Alexander Martinzae2138e2021-08-26 17:27:03 +0200134AUDIO_FEATURE_ENABLED_AUDIOSPHERE := true
135AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true
Alexander Martinzae2138e2021-08-26 17:27:03 +0200136AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
Alexander Martinzae2138e2021-08-26 17:27:03 +0200137BOARD_USES_ALSA_AUDIO := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200138
Alexander Martinz3f93efe2022-11-11 16:06:29 +0100139# Audio - Sound Trigger
140BOARD_SUPPORTS_SOUND_TRIGGER := true
141BOARD_SUPPORTS_OPENSOURCE_STHAL := true
142
Alexander Martinzae2138e2021-08-26 17:27:03 +0200143# Filesystem
144TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/rootdir/config.fs
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200145
Michael Bestas39f97cd2023-05-12 04:18:32 +0300146# GPS
147BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default
148LOC_HIDL_VERSION := 3.0
149
Alexander Martinzae2138e2021-08-26 17:27:03 +0200150# Graphics
151TARGET_USES_GRALLOC1 := true
152TARGET_USES_HWC2 := true
153TARGET_USES_ION := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200154
Alexander Martinzae2138e2021-08-26 17:27:03 +0200155# HIDL
Bruno Martins3d0f0bf2022-04-05 10:34:38 +0100156DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
157 hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml
Alexander Martinzae2138e2021-08-26 17:27:03 +0200158DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/vintf/manifest.xml
Bruno Martins492b09b2024-02-08 17:05:32 +0000159DEVICE_MATRIX_FILE := hardware/qcom-caf/common/compatibility_matrix.xml
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200160
Alexander Martinzae2138e2021-08-26 17:27:03 +0200161# Light
162TARGET_PROVIDES_LIBLIGHT := true
163
164# LMKD
165TARGET_LMKD_STATS_LOG := true
166
Alexander Martinzae2138e2021-08-26 17:27:03 +0200167# Power
168TARGET_TAP_TO_WAKE_NODE := "/proc/touchpanel/double_tap_enable"
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200169
170# Qualcomm BSP
171BOARD_USES_QCOM_HARDWARE := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200172
Sal Savage601310e2022-04-15 15:38:17 -0700173# Properties
174TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop
175
Alexander Martinzae2138e2021-08-26 17:27:03 +0200176# Recovery
177BOARD_INCLUDE_RECOVERY_DTBO := true
Alexander Martinz32079de2022-01-07 12:18:10 +0100178TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/etc/fstab.axolotl
Alexander Martinzae2138e2021-08-26 17:27:03 +0200179TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
180TARGET_RECOVERY_UI_LIB := libfstab
Michael Bestas2d668bb2022-10-14 07:09:19 +0300181TARGET_RECOVERY_UI_MARGIN_HEIGHT := 16
182TARGET_RECOVERY_UI_MARGIN_WIDTH := 16
Alexander Martinzae2138e2021-08-26 17:27:03 +0200183
Alexander Martinzae2138e2021-08-26 17:27:03 +0200184# RIL
185ENABLE_VENDOR_RIL_SERVICE := true
186
187# Security patch level
Chirayu Desaif2391722022-09-20 04:09:01 +0530188BOOT_SECURITY_PATCH := 2023-10-05
Alexander Martinz3fd2fd02023-11-27 17:38:58 +0100189VENDOR_SECURITY_PATCH := 2023-10-05
Alexander Martinzae2138e2021-08-26 17:27:03 +0200190
Alexander Martinzd0f142d2021-12-20 09:26:53 +0100191# SELinux
Bruno Martinsd3320722023-10-24 18:12:15 +0100192include device/qcom/sepolicy_vndr/SEPolicy.mk
Alexander Martinzae2138e2021-08-26 17:27:03 +0200193BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor
194
195# Treble
196BOARD_VNDK_VERSION := current
197BOARD_SYSTEMSDK_VERSIONS := 29
198
199# WLAN
200BOARD_WLAN_DEVICE := qcwcn
201BOARD_HOSTAPD_DRIVER := NL80211
202BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
203BOARD_WPA_SUPPLICANT_DRIVER := NL80211
204BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
Alexander Martinz424914f2022-10-18 14:48:52 +0200205#WIFI_DRIVER_DEFAULT := qca_cld3
Alexander Martinzae2138e2021-08-26 17:27:03 +0200206WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan"
207WIFI_DRIVER_STATE_OFF := "OFF"
208WIFI_DRIVER_STATE_ON := "ON"
209WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
210WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
211WPA_SUPPLICANT_VERSION := VER_0_8_X
212
213##### Partition handling
214
Alexander Martinzae2138e2021-08-26 17:27:03 +0200215BOARD_DYNAMIC_PARTITION_ENABLE := true
216
217# Define the Dynamic Partition sizes and groups.
218BOARD_SUPER_PARTITION_SIZE := 12884901888
219BOARD_SUPER_PARTITION_GROUPS := axolotl_dynamic_partitions
220BOARD_AXOLOTL_DYNAMIC_PARTITIONS_SIZE := 6438256640
221BOARD_AXOLOTL_DYNAMIC_PARTITIONS_PARTITION_LIST := \
Alexander Martinzcd276832023-11-27 15:24:01 +0100222 odm \
Alexander Martinzae2138e2021-08-26 17:27:03 +0200223 product \
224 system \
225 system_ext \
226 vendor \
227
228# Set error limit to BOARD_SUPER_PARTITON_SIZE - 500MB
229BOARD_SUPER_PARTITION_ERROR_LIMIT := 12360613888
230
231# boot.img
232BOARD_BOOTIMAGE_PARTITION_SIZE := 0x04000000
233
234# dtbo.img
235BOARD_DTBOIMG_PARTITION_SIZE := 0x0800000
236
237# metadata.img
238BOARD_METADATAIMAGE_PARTITION_SIZE := 16777216
239BOARD_USES_METADATA_PARTITION := true
240
Alexander Martinzcd276832023-11-27 15:24:01 +0100241# odm.img
242BOARD_USES_ODMIMAGE := true
243BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
244TARGET_COPY_OUT_ODM := odm
245
Alexander Martinzae2138e2021-08-26 17:27:03 +0200246# persist.img
247BOARD_PERSISTIMAGE_PARTITION_SIZE := 33554432
248BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4
249
250# product.img
251BOARD_USES_PRODUCTIMAGE := true
252BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
253TARGET_COPY_OUT_PRODUCT := product
254
255# recovery.img
256BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x06000000
257
258# system.img
259BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4
260
261# system_ext.img
262BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
263TARGET_COPY_OUT_SYSTEM_EXT := system_ext
264
265# userdata.img
266TARGET_USERIMAGES_USE_EXT4 := true
267TARGET_USERIMAGES_USE_F2FS := true
Alexander Martinzaaa2ec52023-11-27 11:54:49 +0100268BOARD_USERDATAIMAGE_PARTITION_SIZE := 108982120448
Alexander Martinzae2138e2021-08-26 17:27:03 +0200269BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := f2fs
270
271# vendor.img
272BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
273
274# vendor.img - split
Alexander Martinzae2138e2021-08-26 17:27:03 +0200275TARGET_COPY_OUT_VENDOR := vendor
Alexander Martinzae2138e2021-08-26 17:27:03 +0200276
277# Reserve space for gapps installation and other customizations
Michael Bestas336ab8b2023-11-22 15:51:28 +0200278-include vendor/lineage/config/BoardConfigReservedSize.mk
Alexander Martinz245360f2022-04-08 08:48:22 +0200279
280# Include ShiftOS specific BoardConfig if existing
281-include device/shift/axolotl/shiftos/BoardConfig.mk