blob: 93bee3bfae25f80e30b9a38c67fc59b44e6b6ce6 [file] [log] [blame]
Bharath831e6d32021-08-07 20:19:03 +05301# config.mk
2#
3# Product-specific compile-time definitions.
4#
5
6FP_PATH := device/fairphone/FP3
7
8# Architecture
9TARGET_ARCH := arm64
10TARGET_ARCH_VARIANT := armv8-a
11TARGET_CPU_ABI := arm64-v8a
12TARGET_CPU_ABI2 :=
13TARGET_CPU_VARIANT := generic
14TARGET_CPU_VARIANT_RUNTIME := kryo
15
16TARGET_2ND_ARCH := arm
17TARGET_2ND_ARCH_VARIANT := armv8-a
18TARGET_2ND_CPU_ABI := armeabi-v7a
19TARGET_2ND_CPU_ABI2 := armeabi
20TARGET_2ND_CPU_VARIANT := generic
21TARGET_2ND_CPU_VARIANT_RUNTIME := cortex-a53
22TARGET_CPU_CORTEX_A53 := true
23
24
25# Adreno
26BOARD_USES_ADRENO := true
27
28
29# Audio
30# QC Audio
31#AUDIO_FEATURE_ENABLED_MULTIPLE_TUNNEL := true
32#AUDIO_FEATURE_ENABLED_VOICE_CONCURRENCY := true
33AUDIO_FEATURE_ENABLED_AAC_ADTS_OFFLOAD := true
34AUDIO_FEATURE_ENABLED_ALAC_OFFLOAD := true
35AUDIO_FEATURE_ENABLED_APE_OFFLOAD := true
36AUDIO_FEATURE_ENABLED_AUDIOSPHERE := true
37AUDIO_FEATURE_ENABLED_COMPRESS_CAPTURE := false
38AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := false
39AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := false
40AUDIO_FEATURE_ENABLED_DTS_EAGLE := false
41AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER := true
42AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true
43AUDIO_FEATURE_ENABLED_EXTN_RESAMPLER := true
44AUDIO_FEATURE_ENABLED_FLAC_OFFLOAD := true
45AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true
46AUDIO_FEATURE_ENABLED_HW_ACCELERATED_EFFECTS := false
47AUDIO_FEATURE_ENABLED_PCM_OFFLOAD := true
48AUDIO_FEATURE_ENABLED_PCM_OFFLOAD_24 := true
49AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
50AUDIO_FEATURE_ENABLED_SSR := true
51AUDIO_FEATURE_ENABLED_VORBIS_OFFLOAD := true
52AUDIO_FEATURE_ENABLED_WMA_OFFLOAD := true
53AUDIO_FEATURE_QSSI_COMPLIANCE := true
54BOARD_USES_ALSA_AUDIO := true
55BOARD_USES_SRS_TRUEMEDIA := false
56DOLBY_ENABLE := false
57DTS_CODEC_M_ := true
58MM_AUDIO_ENABLED_SAFX := true
59USE_CUSTOM_AUDIO_POLICY := 1
60
61AUDIO_FEATURE_ENABLED_ACDB_LICENSE := true
62AUDIO_FEATURE_ENABLED_ANC_HEADSET := true
63AUDIO_FEATURE_ENABLED_CUSTOMSTEREO := true
64AUDIO_FEATURE_ENABLED_DEV_ARBI := false
65AUDIO_FEATURE_ENABLED_DLKM := true
66AUDIO_FEATURE_ENABLED_DYNAMIC_LOG := false # TODO: Check if this is required, has proprietary depepndency
67AUDIO_FEATURE_ENABLED_EXT_HDMI := false # TODO: Check if this is required, has proprietary depepndency
68AUDIO_FEATURE_ENABLED_FLUENCE := true
69AUDIO_FEATURE_ENABLED_HDMI_EDID := true
70AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH := true
71AUDIO_FEATURE_ENABLED_HDMI_SPK := true
72AUDIO_FEATURE_ENABLED_HFP := true
73AUDIO_FEATURE_ENABLED_HIFI_AUDIO := true
74AUDIO_FEATURE_ENABLED_INCALL_MUSIC := true
75AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE := true
76AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
77AUDIO_FEATURE_ENABLED_NT_PAUSE_TIMEOUT := true
78AUDIO_FEATURE_ENABLED_SND_MONITOR := true
79AUDIO_FEATURE_ENABLED_SOURCE_TRACKING := true
80AUDIO_FEATURE_ENABLED_SPKR_PROTECTION := true
81AUDIO_FEATURE_ENABLED_SVA_MULTI_STAGE := true
82AUDIO_FEATURE_ENABLED_VBAT_MONITOR := true
83AUDIO_USE_LL_AS_PRIMARY_OUTPUT := true
84BOARD_SUPPORTS_QAHW := false
85BOARD_SUPPORTS_SOUND_TRIGGER := true
86MM_AUDIO_ENABLED_FTM := true
87TARGET_USES_QCOM_MM_AUDIO := true
88USE_XML_AUDIO_POLICY_CONF := 1
89
90
91# Bluetooth
Bharatha3224922021-08-16 18:53:43 +053092BLUETOOTH_HCI_USE_MCT := true
93BOARD_ANT_WIRELESS_DEVICE := "vfs-prerelease"
94BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/qcom/common
95BOARD_HAVE_BLUETOOTH := true
Bharath831e6d32021-08-07 20:19:03 +053096
97
98#Board
99BOOTLOADER_PLATFORM := msm8953 # use msm8953 LK configuration
100TARGET_BOARD_PLATFORM := msm8953
101TARGET_BOOTLOADER_BOARD_NAME := FP3
102TARGET_BOOTLOADER_PLATFORM_OVERRIDE := $(TARGET_DEVICE)
103TARGET_NO_BOOTLOADER := false
104
105
106# Broken flags
107BUILD_BROKEN_NINJA_USES_ENV_VARS := SDCLANG_AE_CONFIG SDCLANG_CONFIG SDCLANG_SA_ENABLED SDCLANG_CONFIG_AOSP
108BUILD_BROKEN_NINJA_USES_ENV_VARS += TEMPORARY_DISABLE_PATH_RESTRICTIONS
109BUILD_BROKEN_NINJA_USES_ENV_VARS += RTIC_MPGEN
110
111
112# Camera
113BOARD_QTI_CAMERA_32BIT_ONLY := true
Bharath82796e82021-08-19 21:09:05 +0530114USE_CAMERA_STUB := false
Bharath831e6d32021-08-07 20:19:03 +0530115
116
Bharath831e6d32021-08-07 20:19:03 +0530117# Dexpreopt
118# Enable dex pre-opt to speed up initial boot
119ifeq ($(HOST_OS),linux)
120 ifeq ($(WITH_DEXPREOPT),)
121 WITH_DEXPREOPT := true
122 WITH_DEXPREOPT_PIC := true
123 ifneq ($(TARGET_BUILD_VARIANT),user)
124 # Retain classes.dex in APK's for non-user builds
125 DEX_PREOPT_DEFAULT := nostripping
126 endif
127 endif
128endif
129
130
131# File systems and Partitions
132BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
133BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4
134BOARD_USES_METADATA_PARTITION := true
135BOARD_USES_RECOVERY_AS_BOOT := true
136BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
137TARGET_COPY_OUT_VENDOR := vendor
138TARGET_NO_RECOVERY := true
139TARGET_USERIMAGES_USE_EXT4 := true
140
141# Note: Support for Product partition is intentionally removed
142# because of the limited size of the partition(125MB).
143# It will be system/product/ instead.
144
145BOARD_BOOTIMAGE_PARTITION_SIZE := 0x04000000
146BOARD_DTBOIMG_PARTITION_SIZE := 8388608
147BOARD_FLASH_BLOCK_SIZE := 131072
148BOARD_METADATAIMAGE_PARTITION_SIZE := 16777216
149BOARD_OEMIMAGE_PARTITION_SIZE := 268435456
150BOARD_PERSISTIMAGE_PARTITION_SIZE := 33554432
151BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3221225472
152BOARD_USERDATAIMAGE_PARTITION_SIZE := 51808043008
153BOARD_VENDORIMAGE_PARTITION_SIZE := 1073741824
154
155
156# Filesystem
157TARGET_FS_CONFIG_GEN := $(FP_PATH)/configs/config.fs
158
159
Bharath831e6d32021-08-07 20:19:03 +0530160# Graphics
161# MAX_VIRTUAL_DISPLAY_DIMENSION := 4096
162MAX_EGL_CACHE_KEY_SIZE := 12*1024
163MAX_EGL_CACHE_SIZE := 2048*1024
164NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
165OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
166TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS := true
167TARGET_USES_C2D_COMPOSITION := true
168TARGET_USES_COLOR_METADATA := true
169TARGET_USES_GRALLOC1 := true
170TARGET_USES_HWC2 := true
171TARGET_USES_ION := true
172
173
174# HIDL
175DEVICE_FRAMEWORK_MANIFEST_FILE := $(FP_PATH)/framework_manifest.xml
176DEVICE_MANIFEST_FILE := $(FP_PATH)/manifest.xml
177DEVICE_MATRIX_FILE := $(FP_PATH)/compatibility_matrix.xml
178DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
179 vendor/qcom/opensource/core-utils/vendor_framework_compatibility_matrix.xml
180
181
182# Kernel
183BOARD_KERNEL_BASE := 0x80000000
184BOARD_KERNEL_PAGESIZE := 2048
185BOARD_KERNEL_OFFSET := 0x00008000
186BOARD_KERNEL_TAGS_OFFSET := 0x00000100
187BOARD_RAMDISK_OFFSET := 0x01000000
188TARGET_COMPILE_WITH_MSM_KERNEL := true
189TARGET_KERNEL_VERSION ?= 4.9
190TARGET_KERNEL_SOURCE ?= kernel/msm-$(TARGET_KERNEL_VERSION)
191TARGET_KERNEL_ARCH := arm64
192TARGET_KERNEL_HEADER_ARCH := arm64
193TARGET_KERNEL_APPEND_DTB := true
194TARGET_USES_UNCOMPRESSED_KERNEL := false
195BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb
196BOARD_KERNEL_SEPARATED_DTBO := true
197
198BOARD_KERNEL_CMDLINE := androidboot.console=ttyMSM0
199BOARD_KERNEL_CMDLINE += androidboot.hardware=qcom
200BOARD_KERNEL_CMDLINE += msm_rtb.filter=0x237
201BOARD_KERNEL_CMDLINE += ehci-hcd.park=3
202BOARD_KERNEL_CMDLINE += lpm_levels.sleep_disabled=1
203BOARD_KERNEL_CMDLINE += androidboot.bootdevice=7824900.sdhci
204BOARD_KERNEL_CMDLINE += earlycon=msm_serial_dm,0x78af000
205BOARD_KERNEL_CMDLINE += androidboot.usbconfigfs=true
206BOARD_KERNEL_CMDLINE += loop.max_part=7
207ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
208BOARD_KERNEL_CMDLINE += console=ttyMSM0,115200,n8
209BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
210endif
211
212# Declare boot header
213BOARD_BOOT_HEADER_VERSION := 1
214BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
215
216
217# Kernel modules
218BOARD_VENDOR_KERNEL_MODULES := \
219 $(KERNEL_MODULES_OUT)/audio_apr.ko \
220 $(KERNEL_MODULES_OUT)/audio_q6_notifier.ko \
221 $(KERNEL_MODULES_OUT)/audio_adsp_loader.ko \
222 $(KERNEL_MODULES_OUT)/audio_q6.ko \
223 $(KERNEL_MODULES_OUT)/audio_usf.ko \
224 $(KERNEL_MODULES_OUT)/audio_pinctrl_wcd.ko \
225 $(KERNEL_MODULES_OUT)/audio_swr.ko \
226 $(KERNEL_MODULES_OUT)/audio_wcd_core.ko \
227 $(KERNEL_MODULES_OUT)/audio_swr_ctrl.ko \
228 $(KERNEL_MODULES_OUT)/audio_wsa881x.ko \
229 $(KERNEL_MODULES_OUT)/audio_wsa881x_analog.ko \
230 $(KERNEL_MODULES_OUT)/audio_platform.ko \
231 $(KERNEL_MODULES_OUT)/audio_cpe_lsm.ko \
232 $(KERNEL_MODULES_OUT)/audio_hdmi.ko \
233 $(KERNEL_MODULES_OUT)/audio_stub.ko \
234 $(KERNEL_MODULES_OUT)/audio_wcd9xxx.ko \
235 $(KERNEL_MODULES_OUT)/audio_mbhc.ko \
236 $(KERNEL_MODULES_OUT)/audio_wcd9335.ko \
237 $(KERNEL_MODULES_OUT)/audio_wcd_cpe.ko \
238 $(KERNEL_MODULES_OUT)/audio_digital_cdc.ko \
239 $(KERNEL_MODULES_OUT)/audio_analog_cdc.ko \
240 $(KERNEL_MODULES_OUT)/audio_native.ko \
241 $(KERNEL_MODULES_OUT)/audio_machine_sdm450.ko \
242 $(KERNEL_MODULES_OUT)/audio_machine_ext_sdm450.ko
243
Bharath177fda82021-08-14 20:30:27 +0530244BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/pronto_wlan.ko
245
Bharath831e6d32021-08-07 20:19:03 +0530246
247# Lights
248TARGET_PROVIDES_LIBLIGHT := true
249
250
251# NFC
Bharathe53322f2021-08-20 18:17:49 +0530252BOARD_NFC_CHIPSET := pn553
Bharath831e6d32021-08-07 20:19:03 +0530253
254
255# Others
256BOARD_CHARGER_DISABLE_INIT_BLANK := true # Disable the init blank to avoid flicker
257BOARD_CHARGER_ENABLE_SUSPEND := true # Enable suspend during charger mode
258BOARD_DO_NOT_STRIP_VENDOR_MODULES := true
259BOARD_USES_GENERIC_AUDIO := true
260KASLRSEED_SUPPORT := true # Enable kaslr seed support
261TARGET_USES_AOSP := false
262TARGET_USES_AOSP_FOR_AUDIO := false
263TARGET_USE_MDTP := true # Enable MDTP during recovery
264TARGET_USES_QCOM_BSP := false
265TARGET_USES_MEDIA_EXTENSIONS := true
266
267
268# QCOM hardware
269BOARD_USES_QCOM_HARDWARE := true
270
271
272# Recovery
273TARGET_RECOVERY_FSTAB := $(FP_PATH)/fstabs-4.9/recovery_AB_split_variant.fstab
274
275
276# SELinux
277include device/qcom/sepolicy/SEPolicy.mk
278BOARD_VENDOR_SEPOLICY_DIRS += $(FP_PATH)/sepolicy/vendor
Bharath8f1d1802021-08-20 00:37:40 +0530279#TODO: clean up elan policies
280BOARD_VENDOR_SEPOLICY_DIRS += $(FP_PATH)/elan_lib/fingerprint/sepolicy
Luca Weiss883f9882021-10-05 12:01:05 +0200281BOARD_VENDOR_SEPOLICY_DIRS += $(FP_PATH)/sepolicy/vendor/automation_setup
Bharath831e6d32021-08-07 20:19:03 +0530282
283
284# Seccomp
285BOARD_SECCOMP_POLICY := $(FP_PATH)/seccomp
286
287
288# Sensors
Bharath00a0ca22021-08-19 09:43:30 +0530289USE_SENSOR_MULTI_HAL := true
Bharath831e6d32021-08-07 20:19:03 +0530290
291
292# Treble
293BOARD_SYSTEMSDK_VERSIONS := 28
294BOARD_VNDK_VERSION := current
295
296
297# WiFi
Bharath177fda82021-08-14 20:30:27 +0530298BOARD_HAS_QCOM_WLAN := true
299BOARD_HOSTAPD_DRIVER := NL80211
300BOARD_WLAN_DEVICE := qcwcn
301BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
302BOARD_WPA_SUPPLICANT_DRIVER := NL80211
303BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
304WIFI_DRIVER_MODULE_NAME := "wlan"
305WIFI_DRIVER_MODULE_PATH := "vendor/lib/modules/pronto_wlan.ko"
306WIFI_DRIVER_FW_PATH_AP := "ap"
307WIFI_DRIVER_FW_PATH_P2P := "p2p"
308WIFI_DRIVER_FW_PATH_STA := "sta"
309WIFI_DRIVER_INSTALL_TO_KERNEL_OUT := true# Part of proprietary code
310WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
311WPA_SUPPLICANT_VERSION := VER_0_8_X
Bharath831e6d32021-08-07 20:19:03 +0530312
313# Vendor-specific definitions
314-include vendor/fairphone/fp3/BoardConfigVendor.mk