blob: ba8c33b0eb8a6eb9f22c2767f6f7be08f64599d3 [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
15
Alexander Martinzae2138e2021-08-26 17:27:03 +020016#####
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020017
18# Architecture
19TARGET_ARCH := arm64
20TARGET_ARCH_VARIANT := armv8-a
21TARGET_CPU_ABI := arm64-v8a
22TARGET_CPU_ABI2 :=
23TARGET_CPU_VARIANT := generic
24TARGET_CPU_VARIANT_RUNTIME := kryo385
25
26TARGET_2ND_ARCH := arm
27TARGET_2ND_ARCH_VARIANT := armv8-2a
28TARGET_2ND_CPU_ABI := armeabi-v7a
29TARGET_2ND_CPU_ABI2 := armeabi
30TARGET_2ND_CPU_VARIANT := generic
31TARGET_2ND_CPU_VARIANT_RUNTIME := kryo385
32
33# Bootloader
34TARGET_BOOTLOADER_BOARD_NAME := sdm845
35TARGET_NO_BOOTLOADER := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020036
Alexander Martinzae2138e2021-08-26 17:27:03 +020037# Display
38TARGET_SCREEN_DENSITY := 420
39
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020040# Kernel
Alexander Martinz904f9872021-08-05 12:55:04 +020041TARGET_NO_KERNEL := false
42TARGET_NO_KERNEL_OVERRIDE := false
43
Alexander Martinz9b928682022-01-14 09:34:39 +010044ifeq ($(TARGET_BUILD_VARIANT),eng)
45 TARGET_KERNEL_CONFIG := lineage_axolotl_eng_defconfig
46else
47 TARGET_KERNEL_CONFIG := lineage_axolotl_defconfig
48endif
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020049TARGET_KERNEL_SOURCE := kernel/shift/sdm845
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020050
51BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb
52BOARD_KERNEL_BASE := 0x00000000
53BOARD_KERNEL_PAGESIZE := 4096
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020054
Alexander Martinz9b928682022-01-14 09:34:39 +010055BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom
56# Enable console for eng builds
57ifeq ($(TARGET_BUILD_VARIANT),eng)
58 BOARD_KERNEL_CMDLINE += console=ttyMSM0,115200n8 earlycon=msm_geni_serial,0xA84000
59endif
60BOARD_KERNEL_CMDLINE += androidboot.console=ttyMSM0 printk.devkmsg=on
61BOARD_KERNEL_CMDLINE += video=vfb:640x400,bpp=32,memsize=3072000 androidboot.configfs=true loop.max_part=7
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020062BOARD_KERNEL_CMDLINE += msm_rtb.filter=0x237
63BOARD_KERNEL_CMDLINE += ehci-hcd.park=3
64BOARD_KERNEL_CMDLINE += service_locator.enable=1
65BOARD_KERNEL_CMDLINE += androidboot.memcg=1 cgroup.memory=nokmem
66BOARD_KERNEL_CMDLINE += androidboot.usbcontroller=a600000.dwc3 swiotlb=2048
67BOARD_KERNEL_CMDLINE += androidboot.boot_devices=soc/1d84000.ufshc
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020068
Alexander Martinzae2138e2021-08-26 17:27:03 +020069# (BOARD_KERNEL_PAGESIZE * 32)
70BOARD_FLASH_BLOCK_SIZE := 131072
71
72BOARD_KERNEL_SEPARATED_DTBO := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020073BOARD_INCLUDE_DTB_IN_BOOTIMG := true
Alexander Martinzae2138e2021-08-26 17:27:03 +020074BOARD_BOOT_HEADER_VERSION := 2
75BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020076
77# Platform
78TARGET_BOARD_PLATFORM := sdm845
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020079
Alexander Martinzae2138e2021-08-26 17:27:03 +020080#####
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020081
82# AB
83AB_OTA_UPDATER := true
Alexander Martinzae2138e2021-08-26 17:27:03 +020084AB_OTA_PARTITIONS += \
85 boot \
86 dtbo \
87 recovery \
88
89AB_OTA_PARTITIONS += \
90 product \
91 system \
92 system_ext \
93 vendor \
94
95AB_OTA_PARTITIONS += \
96 vbmeta \
97 vbmeta_system \
98 vbmeta_vendor \
99
100# AVB
101BOARD_AVB_VBMETA_SYSTEM := system system_ext
102BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
103BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA4096
104BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
105BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 2
106
107BOARD_AVB_VBMETA_VENDOR := vendor
108BOARD_AVB_VBMETA_VENDOR_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
109BOARD_AVB_VBMETA_VENDOR_ALGORITHM := SHA256_RSA4096
110BOARD_AVB_VBMETA_VENDOR_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
111BOARD_AVB_VBMETA_VENDOR_ROLLBACK_INDEX_LOCATION := 3
112
113# Enable AVB 2.0
114BOARD_AVB_ENABLE := true
115
116# Build the image with verity pre-disabled - https://android.googlesource.com/platform/external/avb/+/58305521295e51cb52a74d8d8bbaed738cf0767a
Nolen Johnson4c0f6842021-05-09 16:04:34 -0400117BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3
Alexander Martinzae2138e2021-08-26 17:27:03 +0200118
119#####
120
121# ANT+
122BOARD_ANT_WIRELESS_DEVICE := "qualcomm-hidl"
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200123
124# APEX
125DEXPREOPT_GENERATE_APEX_IMAGE := true
126
127# Audio
Alexander Martinzae2138e2021-08-26 17:27:03 +0200128AUDIO_FEATURE_ENABLED_AUDIOSPHERE := true
129AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true
Alexander Martinzae2138e2021-08-26 17:27:03 +0200130AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
Alexander Martinzae2138e2021-08-26 17:27:03 +0200131BOARD_SUPPORTS_SOUND_TRIGGER := true
132BOARD_USES_ALSA_AUDIO := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200133
Alexander Martinzae2138e2021-08-26 17:27:03 +0200134# Filesystem
135TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/rootdir/config.fs
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200136
Alexander Martinzae2138e2021-08-26 17:27:03 +0200137# Graphics
138TARGET_USES_GRALLOC1 := true
139TARGET_USES_HWC2 := true
140TARGET_USES_ION := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200141
Alexander Martinzae2138e2021-08-26 17:27:03 +0200142# HIDL
143DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/vintf/manifest.xml
144DEVICE_MATRIX_FILE := $(DEVICE_PATH)/vintf/compatibility_matrix.xml
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200145
Alexander Martinzae2138e2021-08-26 17:27:03 +0200146# Light
147TARGET_PROVIDES_LIBLIGHT := true
148
149# LMKD
150TARGET_LMKD_STATS_LOG := true
151
Alexander Martinzae2138e2021-08-26 17:27:03 +0200152# Power
153TARGET_TAP_TO_WAKE_NODE := "/proc/touchpanel/double_tap_enable"
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200154
155# Qualcomm BSP
156BOARD_USES_QCOM_HARDWARE := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200157
Sal Savage601310e2022-04-15 15:38:17 -0700158# Properties
159TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop
160
Alexander Martinzae2138e2021-08-26 17:27:03 +0200161# Recovery
162BOARD_INCLUDE_RECOVERY_DTBO := true
Alexander Martinz32079de2022-01-07 12:18:10 +0100163TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/etc/fstab.axolotl
Alexander Martinzae2138e2021-08-26 17:27:03 +0200164TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
165TARGET_RECOVERY_UI_LIB := libfstab
Michael Bestas2d668bb2022-10-14 07:09:19 +0300166TARGET_RECOVERY_UI_MARGIN_HEIGHT := 16
167TARGET_RECOVERY_UI_MARGIN_WIDTH := 16
Alexander Martinzae2138e2021-08-26 17:27:03 +0200168
169# RenderScript
170OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
171
172# RIL
173ENABLE_VENDOR_RIL_SERVICE := true
174
175# Security patch level
Alexander Martinzc6983fb2022-06-01 08:32:50 +0200176VENDOR_SECURITY_PATCH := 2022-08-05
Alexander Martinzae2138e2021-08-26 17:27:03 +0200177
Alexander Martinzd0f142d2021-12-20 09:26:53 +0100178# SELinux
Edwin Moquete91512e12022-08-29 01:37:22 +0000179include device/qcom/sepolicy_vndr-legacy-um/SEPolicy.mk
Alexander Martinzae2138e2021-08-26 17:27:03 +0200180BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor
181
182# Treble
183BOARD_VNDK_VERSION := current
184BOARD_SYSTEMSDK_VERSIONS := 29
185
186# WLAN
187BOARD_WLAN_DEVICE := qcwcn
188BOARD_HOSTAPD_DRIVER := NL80211
189BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
190BOARD_WPA_SUPPLICANT_DRIVER := NL80211
191BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
Alexander Martinz424914f2022-10-18 14:48:52 +0200192#WIFI_DRIVER_DEFAULT := qca_cld3
Alexander Martinzae2138e2021-08-26 17:27:03 +0200193WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan"
194WIFI_DRIVER_STATE_OFF := "OFF"
195WIFI_DRIVER_STATE_ON := "ON"
196WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
197WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
198WPA_SUPPLICANT_VERSION := VER_0_8_X
199
200##### Partition handling
201
Alexander Martinzae2138e2021-08-26 17:27:03 +0200202BOARD_DYNAMIC_PARTITION_ENABLE := true
203
204# Define the Dynamic Partition sizes and groups.
205BOARD_SUPER_PARTITION_SIZE := 12884901888
206BOARD_SUPER_PARTITION_GROUPS := axolotl_dynamic_partitions
207BOARD_AXOLOTL_DYNAMIC_PARTITIONS_SIZE := 6438256640
208BOARD_AXOLOTL_DYNAMIC_PARTITIONS_PARTITION_LIST := \
209 product \
210 system \
211 system_ext \
212 vendor \
213
214# Set error limit to BOARD_SUPER_PARTITON_SIZE - 500MB
215BOARD_SUPER_PARTITION_ERROR_LIMIT := 12360613888
216
217# boot.img
218BOARD_BOOTIMAGE_PARTITION_SIZE := 0x04000000
219
220# dtbo.img
221BOARD_DTBOIMG_PARTITION_SIZE := 0x0800000
222
223# metadata.img
224BOARD_METADATAIMAGE_PARTITION_SIZE := 16777216
225BOARD_USES_METADATA_PARTITION := true
226
227# persist.img
228BOARD_PERSISTIMAGE_PARTITION_SIZE := 33554432
229BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4
230
231# product.img
232BOARD_USES_PRODUCTIMAGE := true
233BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
234TARGET_COPY_OUT_PRODUCT := product
235
236# recovery.img
237BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x06000000
238
239# system.img
240BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4
241
242# system_ext.img
243BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
244TARGET_COPY_OUT_SYSTEM_EXT := system_ext
245
246# userdata.img
247TARGET_USERIMAGES_USE_EXT4 := true
248TARGET_USERIMAGES_USE_F2FS := true
249BOARD_USERDATAIMAGE_PARTITION_SIZE := 10737418240
250BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := f2fs
251
252# vendor.img
253BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
254
255# vendor.img - split
Alexander Martinzae2138e2021-08-26 17:27:03 +0200256TARGET_COPY_OUT_VENDOR := vendor
Alexander Martinzae2138e2021-08-26 17:27:03 +0200257
258# Reserve space for gapps installation and other customizations
259# product: 1500 MB
260# system: 500 MB
261# system_ext: 500 MB
262# vendor: 250 MB
Alexander Martinz095c8592022-02-09 19:11:58 +0100263ifneq ($(WITH_GMS),true)
264 BOARD_PRODUCTIMAGE_EXTFS_INODE_COUNT := -1
265 BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE := 1572864000
266 BOARD_SYSTEM_EXTIMAGE_EXTFS_INODE_COUNT := -1
267 BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE := 524288000
268 BOARD_SYSTEMIMAGE_EXTFS_INODE_COUNT := -1
269 BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 524288000
270 BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE := 262144000
271endif
Alexander Martinz245360f2022-04-08 08:48:22 +0200272
273# Include ShiftOS specific BoardConfig if existing
274-include device/shift/axolotl/shiftos/BoardConfig.mk