blob: f7f3d895864870c9d4e4a4bc49badeb08133c617 [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
Bruno Martins21da5da2022-09-08 12:03:17 +010051TARGET_KERNEL_LLVM_BINUTILS := false
Michael Bestas964a9222022-10-31 20:39:59 +020052TARGET_KERNEL_CLANG_VERSION := r416183b
53TARGET_KERNEL_CLANG_PATH := $(abspath .)/prebuilts/clang/kernel/$(HOST_PREBUILT_TAG)/clang-$(TARGET_KERNEL_CLANG_VERSION)
Bruno Martins21da5da2022-09-08 12:03:17 +010054
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020055BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb
56BOARD_KERNEL_BASE := 0x00000000
57BOARD_KERNEL_PAGESIZE := 4096
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020058
Alexander Martinz9b928682022-01-14 09:34:39 +010059BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom
60# Enable console for eng builds
61ifeq ($(TARGET_BUILD_VARIANT),eng)
62 BOARD_KERNEL_CMDLINE += console=ttyMSM0,115200n8 earlycon=msm_geni_serial,0xA84000
63endif
64BOARD_KERNEL_CMDLINE += androidboot.console=ttyMSM0 printk.devkmsg=on
Alexander Martinz85f3b2f2022-09-22 17:27:45 +020065BOARD_KERNEL_CMDLINE += androidboot.configfs=true loop.max_part=7
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020066BOARD_KERNEL_CMDLINE += msm_rtb.filter=0x237
67BOARD_KERNEL_CMDLINE += ehci-hcd.park=3
68BOARD_KERNEL_CMDLINE += service_locator.enable=1
69BOARD_KERNEL_CMDLINE += androidboot.memcg=1 cgroup.memory=nokmem
70BOARD_KERNEL_CMDLINE += androidboot.usbcontroller=a600000.dwc3 swiotlb=2048
71BOARD_KERNEL_CMDLINE += androidboot.boot_devices=soc/1d84000.ufshc
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020072
Alexander Martinzae2138e2021-08-26 17:27:03 +020073# (BOARD_KERNEL_PAGESIZE * 32)
74BOARD_FLASH_BLOCK_SIZE := 131072
75
76BOARD_KERNEL_SEPARATED_DTBO := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020077BOARD_INCLUDE_DTB_IN_BOOTIMG := true
Alexander Martinzae2138e2021-08-26 17:27:03 +020078BOARD_BOOT_HEADER_VERSION := 2
79BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020080
81# Platform
82TARGET_BOARD_PLATFORM := sdm845
Alexander Martinz54fdc2d2021-04-22 14:19:05 +020083
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)
Michael Bestas62028092023-01-31 20:28:46 +0200109BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 1
Alexander Martinzae2138e2021-08-26 17:27:03 +0200110
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)
Michael Bestas62028092023-01-31 20:28:46 +0200115BOARD_AVB_VBMETA_VENDOR_ROLLBACK_INDEX_LOCATION := 2
Alexander Martinzae2138e2021-08-26 17:27:03 +0200116
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
Nolen Johnson4c0f6842021-05-09 16:04:34 -0400121BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3
Alexander Martinzae2138e2021-08-26 17:27:03 +0200122
123#####
124
125# ANT+
126BOARD_ANT_WIRELESS_DEVICE := "qualcomm-hidl"
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200127
128# APEX
129DEXPREOPT_GENERATE_APEX_IMAGE := true
130
131# Audio
Alexander Martinzae2138e2021-08-26 17:27:03 +0200132AUDIO_FEATURE_ENABLED_AUDIOSPHERE := true
133AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true
Alexander Martinzae2138e2021-08-26 17:27:03 +0200134AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
Alexander Martinzae2138e2021-08-26 17:27:03 +0200135BOARD_USES_ALSA_AUDIO := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200136
Alexander Martinz3f93efe2022-11-11 16:06:29 +0100137# Audio - Sound Trigger
138BOARD_SUPPORTS_SOUND_TRIGGER := true
139BOARD_SUPPORTS_OPENSOURCE_STHAL := true
140
Alexander Martinzae2138e2021-08-26 17:27:03 +0200141# Filesystem
142TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/rootdir/config.fs
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200143
Alexander Martinzae2138e2021-08-26 17:27:03 +0200144# Graphics
145TARGET_USES_GRALLOC1 := true
146TARGET_USES_HWC2 := true
147TARGET_USES_ION := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200148
Alexander Martinzae2138e2021-08-26 17:27:03 +0200149# HIDL
150DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/vintf/manifest.xml
151DEVICE_MATRIX_FILE := $(DEVICE_PATH)/vintf/compatibility_matrix.xml
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200152
Alexander Martinzae2138e2021-08-26 17:27:03 +0200153# Light
154TARGET_PROVIDES_LIBLIGHT := true
155
156# LMKD
157TARGET_LMKD_STATS_LOG := true
158
Alexander Martinzae2138e2021-08-26 17:27:03 +0200159# Power
160TARGET_TAP_TO_WAKE_NODE := "/proc/touchpanel/double_tap_enable"
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200161
162# Qualcomm BSP
163BOARD_USES_QCOM_HARDWARE := true
Alexander Martinz54fdc2d2021-04-22 14:19:05 +0200164
Sal Savage601310e2022-04-15 15:38:17 -0700165# Properties
166TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop
167
Alexander Martinzae2138e2021-08-26 17:27:03 +0200168# Recovery
169BOARD_INCLUDE_RECOVERY_DTBO := true
Alexander Martinz32079de2022-01-07 12:18:10 +0100170TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/etc/fstab.axolotl
Alexander Martinzae2138e2021-08-26 17:27:03 +0200171TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
172TARGET_RECOVERY_UI_LIB := libfstab
Michael Bestas2d668bb2022-10-14 07:09:19 +0300173TARGET_RECOVERY_UI_MARGIN_HEIGHT := 16
174TARGET_RECOVERY_UI_MARGIN_WIDTH := 16
Alexander Martinzae2138e2021-08-26 17:27:03 +0200175
176# RenderScript
177OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
178
179# RIL
180ENABLE_VENDOR_RIL_SERVICE := true
181
182# Security patch level
Alexander Martinzc6983fb2022-06-01 08:32:50 +0200183VENDOR_SECURITY_PATCH := 2022-08-05
Alexander Martinzae2138e2021-08-26 17:27:03 +0200184
Alexander Martinzd0f142d2021-12-20 09:26:53 +0100185# SELinux
Edwin Moquete91512e12022-08-29 01:37:22 +0000186include device/qcom/sepolicy_vndr-legacy-um/SEPolicy.mk
Alexander Martinzae2138e2021-08-26 17:27:03 +0200187BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor
188
189# Treble
190BOARD_VNDK_VERSION := current
191BOARD_SYSTEMSDK_VERSIONS := 29
192
LuK13370fbcf182022-03-23 20:42:28 +0100193# Trust
194TARGET_TRUST_USB_CONTROL_PATH := /sys/devices/platform/soc/a600000.ssusb/usb_data_enabled
195TARGET_TRUST_USB_CONTROL_ENABLE := 0
196TARGET_TRUST_USB_CONTROL_DISABLE := 1
197
Alexander Martinzae2138e2021-08-26 17:27:03 +0200198# WLAN
199BOARD_WLAN_DEVICE := qcwcn
200BOARD_HOSTAPD_DRIVER := NL80211
201BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
202BOARD_WPA_SUPPLICANT_DRIVER := NL80211
203BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
Alexander Martinz424914f2022-10-18 14:48:52 +0200204#WIFI_DRIVER_DEFAULT := qca_cld3
Alexander Martinzae2138e2021-08-26 17:27:03 +0200205WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan"
206WIFI_DRIVER_STATE_OFF := "OFF"
207WIFI_DRIVER_STATE_ON := "ON"
208WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
209WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
210WPA_SUPPLICANT_VERSION := VER_0_8_X
211
212##### Partition handling
213
Alexander Martinzae2138e2021-08-26 17:27:03 +0200214BOARD_DYNAMIC_PARTITION_ENABLE := true
215
216# Define the Dynamic Partition sizes and groups.
217BOARD_SUPER_PARTITION_SIZE := 12884901888
218BOARD_SUPER_PARTITION_GROUPS := axolotl_dynamic_partitions
219BOARD_AXOLOTL_DYNAMIC_PARTITIONS_SIZE := 6438256640
220BOARD_AXOLOTL_DYNAMIC_PARTITIONS_PARTITION_LIST := \
221 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
239# persist.img
240BOARD_PERSISTIMAGE_PARTITION_SIZE := 33554432
241BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4
242
243# product.img
244BOARD_USES_PRODUCTIMAGE := true
245BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
246TARGET_COPY_OUT_PRODUCT := product
247
248# recovery.img
249BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x06000000
250
251# system.img
252BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4
253
254# system_ext.img
255BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
256TARGET_COPY_OUT_SYSTEM_EXT := system_ext
257
258# userdata.img
259TARGET_USERIMAGES_USE_EXT4 := true
260TARGET_USERIMAGES_USE_F2FS := true
261BOARD_USERDATAIMAGE_PARTITION_SIZE := 10737418240
262BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := f2fs
263
264# vendor.img
265BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
266
267# vendor.img - split
Alexander Martinzae2138e2021-08-26 17:27:03 +0200268TARGET_COPY_OUT_VENDOR := vendor
Alexander Martinzae2138e2021-08-26 17:27:03 +0200269
270# Reserve space for gapps installation and other customizations
271# product: 1500 MB
272# system: 500 MB
273# system_ext: 500 MB
274# vendor: 250 MB
Alexander Martinz095c8592022-02-09 19:11:58 +0100275ifneq ($(WITH_GMS),true)
276 BOARD_PRODUCTIMAGE_EXTFS_INODE_COUNT := -1
277 BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE := 1572864000
278 BOARD_SYSTEM_EXTIMAGE_EXTFS_INODE_COUNT := -1
279 BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE := 524288000
280 BOARD_SYSTEMIMAGE_EXTFS_INODE_COUNT := -1
281 BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 524288000
282 BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE := 262144000
283endif
Alexander Martinz245360f2022-04-08 08:48:22 +0200284
285# Include ShiftOS specific BoardConfig if existing
286-include device/shift/axolotl/shiftos/BoardConfig.mk