blob: fb234f25f9c1157f6abd7ad34207fe8b6cedb957 [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
8# Use the non-open-source parts, if they're present
9-include vendor/shift/axolotl/BoardConfigVendor.mk
10
11DEVICE_PATH := device/shift/axolotl
12
13BOARD_VENDOR := shift
14
Alexander Martinzae2138e2021-08-26 17:27:03 +020015# We ship prebuilt files, which override source built components, eg "audio.primary.sdm845.so"
16BUILD_BROKEN_DUP_RULES := true
17
18#####
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020019
20# Architecture
21TARGET_ARCH := arm64
22TARGET_ARCH_VARIANT := armv8-a
23TARGET_CPU_ABI := arm64-v8a
24TARGET_CPU_ABI2 :=
25TARGET_CPU_VARIANT := generic
26TARGET_CPU_VARIANT_RUNTIME := kryo385
27
28TARGET_2ND_ARCH := arm
29TARGET_2ND_ARCH_VARIANT := armv8-2a
30TARGET_2ND_CPU_ABI := armeabi-v7a
31TARGET_2ND_CPU_ABI2 := armeabi
32TARGET_2ND_CPU_VARIANT := generic
33TARGET_2ND_CPU_VARIANT_RUNTIME := kryo385
34
35# Bootloader
36TARGET_BOOTLOADER_BOARD_NAME := sdm845
37TARGET_NO_BOOTLOADER := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020038
Alexander Martinzae2138e2021-08-26 17:27:03 +020039# Display
40TARGET_SCREEN_DENSITY := 420
41
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020042# Kernel
Alexander Martinz904f9872021-08-05 12:55:04 +020043TARGET_NO_KERNEL := false
44TARGET_NO_KERNEL_OVERRIDE := false
45
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020046TARGET_KERNEL_ARCH := arm64
47TARGET_KERNEL_HEADER_ARCH := arm64
48TARGET_KERNEL_CLANG_COMPILE := true
49TARGET_KERNEL_CONFIG := lineage_axolotl_defconfig
50TARGET_KERNEL_SOURCE := kernel/shift/sdm845
Alexander Martinzae2138e2021-08-26 17:27:03 +020051TARGET_KERNEL_APPEND_DTB := false
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020052TARGET_USES_UNCOMPRESSED_KERNEL := false
53
Alexander Martinzae2138e2021-08-26 17:27:03 +020054TARGET_KERNEL_ADDITIONAL_FLAGS := \
55 MKDTIMG=$(shell pwd)/prebuilts/misc/$(HOST_OS)-x86/libufdt/mkdtimg \
Alexander Martinzae2138e2021-08-26 17:27:03 +020056
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020057BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb
58BOARD_KERNEL_BASE := 0x00000000
59BOARD_KERNEL_PAGESIZE := 4096
60BOARD_KERNEL_TAGS_OFFSET := 0x01E00000
61BOARD_RAMDISK_OFFSET := 0x02000000
62
Alexander Martinz6c8576c2021-09-23 20:14:05 +020063BOARD_KERNEL_CMDLINE := androidboot.console=ttyMSM0 printk.devkmsg=on
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020064BOARD_KERNEL_CMDLINE += androidboot.hardware=qcom video=vfb:640x400,bpp=32,memsize=3072000 androidboot.configfs=true loop.max_part=7
65BOARD_KERNEL_CMDLINE += msm_rtb.filter=0x237
66BOARD_KERNEL_CMDLINE += ehci-hcd.park=3
67BOARD_KERNEL_CMDLINE += service_locator.enable=1
68BOARD_KERNEL_CMDLINE += androidboot.memcg=1 cgroup.memory=nokmem
69BOARD_KERNEL_CMDLINE += androidboot.usbcontroller=a600000.dwc3 swiotlb=2048
70BOARD_KERNEL_CMDLINE += androidboot.boot_devices=soc/1d84000.ufshc
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020071
Alexander Martinzae2138e2021-08-26 17:27:03 +020072# (BOARD_KERNEL_PAGESIZE * 32)
73BOARD_FLASH_BLOCK_SIZE := 131072
74
75BOARD_KERNEL_SEPARATED_DTBO := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020076BOARD_INCLUDE_DTB_IN_BOOTIMG := true
Alexander Martinzae2138e2021-08-26 17:27:03 +020077BOARD_BOOT_HEADER_VERSION := 2
78BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020079
80# Platform
81TARGET_BOARD_PLATFORM := sdm845
82TARGET_BOARD_PLATFORM_GPU := qcom-adreno630
83
Alexander Martinzae2138e2021-08-26 17:27:03 +020084#####
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020085
86# AB
87AB_OTA_UPDATER := true
Alexander Martinzae2138e2021-08-26 17:27:03 +020088AB_OTA_PARTITIONS += \
89 boot \
90 dtbo \
91 recovery \
92
93AB_OTA_PARTITIONS += \
94 product \
95 system \
96 system_ext \
97 vendor \
98
99AB_OTA_PARTITIONS += \
100 vbmeta \
101 vbmeta_system \
102 vbmeta_vendor \
103
104# AVB
105BOARD_AVB_VBMETA_SYSTEM := system system_ext
106BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
107BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA4096
108BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
109BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 2
110
111BOARD_AVB_VBMETA_VENDOR := vendor
112BOARD_AVB_VBMETA_VENDOR_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
113BOARD_AVB_VBMETA_VENDOR_ALGORITHM := SHA256_RSA4096
114BOARD_AVB_VBMETA_VENDOR_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
115BOARD_AVB_VBMETA_VENDOR_ROLLBACK_INDEX_LOCATION := 3
116
117# Enable AVB 2.0
118BOARD_AVB_ENABLE := true
119
120# Build the image with verity pre-disabled - https://android.googlesource.com/platform/external/avb/+/58305521295e51cb52a74d8d8bbaed738cf0767a
121BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --set_hashtree_disabled_flag
122BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 2
123
124#####
125
126# ANT+
127BOARD_ANT_WIRELESS_DEVICE := "qualcomm-hidl"
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200128
129# APEX
130DEXPREOPT_GENERATE_APEX_IMAGE := true
131
132# Audio
Alexander Martinzae2138e2021-08-26 17:27:03 +0200133#AUDIO_FEATURE_ENABLED_AAC_ADTS_OFFLOAD := true
134#AUDIO_FEATURE_ENABLED_AHAL_EXT := true
135AUDIO_FEATURE_ENABLED_AUDIOSPHERE := true
136AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true
137AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true
138AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true
139AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
140AUDIO_FEATURE_ENABLED_HDMI_SPK := true
141AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
142BOARD_SUPPORTS_SOUND_TRIGGER := true
143BOARD_USES_ALSA_AUDIO := true
144TARGET_PROVIDES_AUDIO_EXTNS := true
145USE_CUSTOM_AUDIO_POLICY := 1
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200146USE_XML_AUDIO_POLICY_CONF := 1
147
148# Bluetooth
149BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(DEVICE_PATH)/bluetooth
Alexander Martinzae2138e2021-08-26 17:27:03 +0200150BOARD_HAVE_BLUETOOTH_QCOM := true
151TARGET_USE_QTI_BT_STACK := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200152
Alexander Martinzae2138e2021-08-26 17:27:03 +0200153# Camera
154TARGET_USES_QTI_CAMERA_DEVICE := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200155
Alexander Martinzae2138e2021-08-26 17:27:03 +0200156# DRM
157TARGET_ENABLE_MEDIADRM_64 := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200158
Alexander Martinzae2138e2021-08-26 17:27:03 +0200159# Filesystem
160TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/rootdir/config.fs
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200161
Alexander Martinzae2138e2021-08-26 17:27:03 +0200162# FM
163BOARD_HAVE_QCOM_FM := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200164
Alexander Martinzae2138e2021-08-26 17:27:03 +0200165# GPS
166TARGET_NO_RPC := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200167
Alexander Martinzae2138e2021-08-26 17:27:03 +0200168# Graphics
169TARGET_USES_GRALLOC1 := true
170TARGET_USES_HWC2 := true
171TARGET_USES_ION := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200172
Alexander Martinzae2138e2021-08-26 17:27:03 +0200173# HIDL
174DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/vintf/manifest.xml
175DEVICE_MATRIX_FILE := $(DEVICE_PATH)/vintf/compatibility_matrix.xml
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200176
Alexander Martinzae2138e2021-08-26 17:27:03 +0200177# Init
178TARGET_PLATFORM_DEVICE_BASE := /devices/soc.0/
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200179
Alexander Martinzae2138e2021-08-26 17:27:03 +0200180# Light
181TARGET_PROVIDES_LIBLIGHT := true
182
183# LMKD
184TARGET_LMKD_STATS_LOG := true
185
186# Media
187TARGET_USES_MEDIA_EXTENSIONS := true
188
189# Power
190TARGET_TAP_TO_WAKE_NODE := "/proc/touchpanel/double_tap_enable"
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200191
192# Qualcomm BSP
193BOARD_USES_QCOM_HARDWARE := true
Alexander Martinzae2138e2021-08-26 17:27:03 +0200194TARGET_FWK_SUPPORTS_FULL_VALUEADDS := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200195
Alexander Martinzae2138e2021-08-26 17:27:03 +0200196# Recovery
197BOARD_INCLUDE_RECOVERY_DTBO := true
Alexander Martinz32079de2022-01-07 12:18:10 +0100198TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/etc/fstab.axolotl
Alexander Martinzae2138e2021-08-26 17:27:03 +0200199TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
200TARGET_RECOVERY_UI_LIB := libfstab
201
202# RenderScript
203OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
204
205# RIL
206ENABLE_VENDOR_RIL_SERVICE := true
207
208# Security patch level
209VENDOR_SECURITY_PATCH := 2021-08-05
210
211# SELinux - TODO
212include device/qcom/sepolicy_vndr/SEPolicy.mk
213#BOARD_PLAT_PRIVATE_SEPOLICY_DIR += $(DEVICE_PATH)/sepolicy/private
214#BOARD_PLAT_PUBLIC_SEPOLICY_DIR += $(DEVICE_PATH)/sepolicy/public
215BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor
216
217# Treble
218BOARD_VNDK_VERSION := current
219BOARD_SYSTEMSDK_VERSIONS := 29
220
221# WLAN
222BOARD_WLAN_DEVICE := qcwcn
223BOARD_HOSTAPD_DRIVER := NL80211
224BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
225BOARD_WPA_SUPPLICANT_DRIVER := NL80211
226BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
Alexander Martinzc61256d2021-11-02 18:58:27 +0100227WIFI_DRIVER_DEFAULT := wlan
Alexander Martinzae2138e2021-08-26 17:27:03 +0200228WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan"
229WIFI_DRIVER_STATE_OFF := "OFF"
230WIFI_DRIVER_STATE_ON := "ON"
231WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
232WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
233WPA_SUPPLICANT_VERSION := VER_0_8_X
234
235##### Partition handling
236
Alexander Martinzae2138e2021-08-26 17:27:03 +0200237BOARD_DYNAMIC_PARTITION_ENABLE := true
238
239# Define the Dynamic Partition sizes and groups.
240BOARD_SUPER_PARTITION_SIZE := 12884901888
241BOARD_SUPER_PARTITION_GROUPS := axolotl_dynamic_partitions
242BOARD_AXOLOTL_DYNAMIC_PARTITIONS_SIZE := 6438256640
243BOARD_AXOLOTL_DYNAMIC_PARTITIONS_PARTITION_LIST := \
244 product \
245 system \
246 system_ext \
247 vendor \
248
249# Set error limit to BOARD_SUPER_PARTITON_SIZE - 500MB
250BOARD_SUPER_PARTITION_ERROR_LIMIT := 12360613888
251
252# boot.img
253BOARD_BOOTIMAGE_PARTITION_SIZE := 0x04000000
254
255# dtbo.img
256BOARD_DTBOIMG_PARTITION_SIZE := 0x0800000
257
258# metadata.img
259BOARD_METADATAIMAGE_PARTITION_SIZE := 16777216
260BOARD_USES_METADATA_PARTITION := true
261
262# persist.img
263BOARD_PERSISTIMAGE_PARTITION_SIZE := 33554432
264BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4
265
266# product.img
267BOARD_USES_PRODUCTIMAGE := true
268BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
269TARGET_COPY_OUT_PRODUCT := product
270
271# recovery.img
272BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x06000000
273
274# system.img
275BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4
276
277# system_ext.img
278BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
279TARGET_COPY_OUT_SYSTEM_EXT := system_ext
280
281# userdata.img
282TARGET_USERIMAGES_USE_EXT4 := true
283TARGET_USERIMAGES_USE_F2FS := true
284BOARD_USERDATAIMAGE_PARTITION_SIZE := 10737418240
285BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := f2fs
286
287# vendor.img
288BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
289
290# vendor.img - split
Alexander Martinzae2138e2021-08-26 17:27:03 +0200291TARGET_COPY_OUT_VENDOR := vendor
292BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
293
294# Reserve space for gapps installation and other customizations
295# product: 1500 MB
296# system: 500 MB
297# system_ext: 500 MB
298# vendor: 250 MB
299BOARD_PRODUCTIMAGE_EXTFS_INODE_COUNT := -1
300BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE := 1572864000
301BOARD_SYSTEM_EXTIMAGE_EXTFS_INODE_COUNT := -1
302BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE := 524288000
303BOARD_SYSTEMIMAGE_EXTFS_INODE_COUNT := -1
304BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 524288000
305BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE := 262144000