Bharath | 831e6d3 | 2021-08-07 20:19:03 +0530 | [diff] [blame] | 1 | # config.mk |
| 2 | # |
| 3 | # Product-specific compile-time definitions. |
| 4 | # |
| 5 | |
| 6 | FP_PATH := device/fairphone/FP3 |
| 7 | |
| 8 | # Architecture |
| 9 | TARGET_ARCH := arm64 |
| 10 | TARGET_ARCH_VARIANT := armv8-a |
| 11 | TARGET_CPU_ABI := arm64-v8a |
| 12 | TARGET_CPU_ABI2 := |
| 13 | TARGET_CPU_VARIANT := generic |
| 14 | TARGET_CPU_VARIANT_RUNTIME := kryo |
| 15 | |
| 16 | TARGET_2ND_ARCH := arm |
| 17 | TARGET_2ND_ARCH_VARIANT := armv8-a |
| 18 | TARGET_2ND_CPU_ABI := armeabi-v7a |
| 19 | TARGET_2ND_CPU_ABI2 := armeabi |
| 20 | TARGET_2ND_CPU_VARIANT := generic |
| 21 | TARGET_2ND_CPU_VARIANT_RUNTIME := cortex-a53 |
| 22 | TARGET_CPU_CORTEX_A53 := true |
| 23 | |
| 24 | |
| 25 | # Adreno |
| 26 | BOARD_USES_ADRENO := true |
| 27 | |
| 28 | |
| 29 | # Audio |
| 30 | # QC Audio |
| 31 | #AUDIO_FEATURE_ENABLED_MULTIPLE_TUNNEL := true |
| 32 | #AUDIO_FEATURE_ENABLED_VOICE_CONCURRENCY := true |
| 33 | AUDIO_FEATURE_ENABLED_AAC_ADTS_OFFLOAD := true |
| 34 | AUDIO_FEATURE_ENABLED_ALAC_OFFLOAD := true |
| 35 | AUDIO_FEATURE_ENABLED_APE_OFFLOAD := true |
| 36 | AUDIO_FEATURE_ENABLED_AUDIOSPHERE := true |
| 37 | AUDIO_FEATURE_ENABLED_COMPRESS_CAPTURE := false |
| 38 | AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := false |
| 39 | AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := false |
| 40 | AUDIO_FEATURE_ENABLED_DTS_EAGLE := false |
| 41 | AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER := true |
| 42 | AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true |
| 43 | AUDIO_FEATURE_ENABLED_EXTN_RESAMPLER := true |
| 44 | AUDIO_FEATURE_ENABLED_FLAC_OFFLOAD := true |
| 45 | AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true |
| 46 | AUDIO_FEATURE_ENABLED_HW_ACCELERATED_EFFECTS := false |
| 47 | AUDIO_FEATURE_ENABLED_PCM_OFFLOAD := true |
| 48 | AUDIO_FEATURE_ENABLED_PCM_OFFLOAD_24 := true |
| 49 | AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true |
| 50 | AUDIO_FEATURE_ENABLED_SSR := true |
| 51 | AUDIO_FEATURE_ENABLED_VORBIS_OFFLOAD := true |
| 52 | AUDIO_FEATURE_ENABLED_WMA_OFFLOAD := true |
| 53 | AUDIO_FEATURE_QSSI_COMPLIANCE := true |
| 54 | BOARD_USES_ALSA_AUDIO := true |
| 55 | BOARD_USES_SRS_TRUEMEDIA := false |
| 56 | DOLBY_ENABLE := false |
| 57 | DTS_CODEC_M_ := true |
| 58 | MM_AUDIO_ENABLED_SAFX := true |
| 59 | USE_CUSTOM_AUDIO_POLICY := 1 |
| 60 | |
| 61 | AUDIO_FEATURE_ENABLED_ACDB_LICENSE := true |
| 62 | AUDIO_FEATURE_ENABLED_ANC_HEADSET := true |
| 63 | AUDIO_FEATURE_ENABLED_CUSTOMSTEREO := true |
| 64 | AUDIO_FEATURE_ENABLED_DEV_ARBI := false |
| 65 | AUDIO_FEATURE_ENABLED_DLKM := true |
| 66 | AUDIO_FEATURE_ENABLED_DYNAMIC_LOG := false # TODO: Check if this is required, has proprietary depepndency |
| 67 | AUDIO_FEATURE_ENABLED_EXT_HDMI := false # TODO: Check if this is required, has proprietary depepndency |
| 68 | AUDIO_FEATURE_ENABLED_FLUENCE := true |
| 69 | AUDIO_FEATURE_ENABLED_HDMI_EDID := true |
| 70 | AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH := true |
| 71 | AUDIO_FEATURE_ENABLED_HDMI_SPK := true |
| 72 | AUDIO_FEATURE_ENABLED_HFP := true |
| 73 | AUDIO_FEATURE_ENABLED_HIFI_AUDIO := true |
| 74 | AUDIO_FEATURE_ENABLED_INCALL_MUSIC := true |
| 75 | AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE := true |
| 76 | AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true |
| 77 | AUDIO_FEATURE_ENABLED_NT_PAUSE_TIMEOUT := true |
| 78 | AUDIO_FEATURE_ENABLED_SND_MONITOR := true |
| 79 | AUDIO_FEATURE_ENABLED_SOURCE_TRACKING := true |
| 80 | AUDIO_FEATURE_ENABLED_SPKR_PROTECTION := true |
| 81 | AUDIO_FEATURE_ENABLED_SVA_MULTI_STAGE := true |
| 82 | AUDIO_FEATURE_ENABLED_VBAT_MONITOR := true |
| 83 | AUDIO_USE_LL_AS_PRIMARY_OUTPUT := true |
| 84 | BOARD_SUPPORTS_QAHW := false |
| 85 | BOARD_SUPPORTS_SOUND_TRIGGER := true |
| 86 | MM_AUDIO_ENABLED_FTM := true |
| 87 | TARGET_USES_QCOM_MM_AUDIO := true |
| 88 | USE_XML_AUDIO_POLICY_CONF := 1 |
| 89 | |
| 90 | |
| 91 | # Bluetooth |
Bharath | a322492 | 2021-08-16 18:53:43 +0530 | [diff] [blame] | 92 | BLUETOOTH_HCI_USE_MCT := true |
| 93 | BOARD_ANT_WIRELESS_DEVICE := "vfs-prerelease" |
| 94 | BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/qcom/common |
| 95 | BOARD_HAVE_BLUETOOTH := true |
Bharath | 831e6d3 | 2021-08-07 20:19:03 +0530 | [diff] [blame] | 96 | |
| 97 | |
| 98 | #Board |
| 99 | BOOTLOADER_PLATFORM := msm8953 # use msm8953 LK configuration |
| 100 | TARGET_BOARD_PLATFORM := msm8953 |
| 101 | TARGET_BOOTLOADER_BOARD_NAME := FP3 |
| 102 | TARGET_BOOTLOADER_PLATFORM_OVERRIDE := $(TARGET_DEVICE) |
| 103 | TARGET_NO_BOOTLOADER := false |
| 104 | |
| 105 | |
| 106 | # Broken flags |
| 107 | BUILD_BROKEN_NINJA_USES_ENV_VARS := SDCLANG_AE_CONFIG SDCLANG_CONFIG SDCLANG_SA_ENABLED SDCLANG_CONFIG_AOSP |
| 108 | BUILD_BROKEN_NINJA_USES_ENV_VARS += TEMPORARY_DISABLE_PATH_RESTRICTIONS |
| 109 | BUILD_BROKEN_NINJA_USES_ENV_VARS += RTIC_MPGEN |
| 110 | |
| 111 | |
| 112 | # Camera |
| 113 | BOARD_QTI_CAMERA_32BIT_ONLY := true |
Bharath | 82796e8 | 2021-08-19 21:09:05 +0530 | [diff] [blame^] | 114 | USE_CAMERA_STUB := false |
Bharath | 831e6d3 | 2021-08-07 20:19:03 +0530 | [diff] [blame] | 115 | |
| 116 | |
Bharath | 831e6d3 | 2021-08-07 20:19:03 +0530 | [diff] [blame] | 117 | # Dexpreopt |
| 118 | # Enable dex pre-opt to speed up initial boot |
| 119 | ifeq ($(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 |
| 128 | endif |
| 129 | |
| 130 | |
| 131 | # File systems and Partitions |
| 132 | BOARD_BUILD_SYSTEM_ROOT_IMAGE := true |
| 133 | BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 134 | BOARD_USES_METADATA_PARTITION := true |
| 135 | BOARD_USES_RECOVERY_AS_BOOT := true |
| 136 | BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 137 | TARGET_COPY_OUT_VENDOR := vendor |
| 138 | TARGET_NO_RECOVERY := true |
| 139 | TARGET_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 | |
| 145 | BOARD_BOOTIMAGE_PARTITION_SIZE := 0x04000000 |
| 146 | BOARD_DTBOIMG_PARTITION_SIZE := 8388608 |
| 147 | BOARD_FLASH_BLOCK_SIZE := 131072 |
| 148 | BOARD_METADATAIMAGE_PARTITION_SIZE := 16777216 |
| 149 | BOARD_OEMIMAGE_PARTITION_SIZE := 268435456 |
| 150 | BOARD_PERSISTIMAGE_PARTITION_SIZE := 33554432 |
| 151 | BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3221225472 |
| 152 | BOARD_USERDATAIMAGE_PARTITION_SIZE := 51808043008 |
| 153 | BOARD_VENDORIMAGE_PARTITION_SIZE := 1073741824 |
| 154 | |
| 155 | |
| 156 | # Filesystem |
| 157 | TARGET_FS_CONFIG_GEN := $(FP_PATH)/configs/config.fs |
| 158 | |
| 159 | |
Bharath | 831e6d3 | 2021-08-07 20:19:03 +0530 | [diff] [blame] | 160 | # Graphics |
| 161 | # MAX_VIRTUAL_DISPLAY_DIMENSION := 4096 |
| 162 | MAX_EGL_CACHE_KEY_SIZE := 12*1024 |
| 163 | MAX_EGL_CACHE_SIZE := 2048*1024 |
| 164 | NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3 |
| 165 | OVERRIDE_RS_DRIVER := libRSDriver_adreno.so |
| 166 | TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS := true |
| 167 | TARGET_USES_C2D_COMPOSITION := true |
| 168 | TARGET_USES_COLOR_METADATA := true |
| 169 | TARGET_USES_GRALLOC1 := true |
| 170 | TARGET_USES_HWC2 := true |
| 171 | TARGET_USES_ION := true |
| 172 | |
| 173 | |
| 174 | # HIDL |
| 175 | DEVICE_FRAMEWORK_MANIFEST_FILE := $(FP_PATH)/framework_manifest.xml |
| 176 | DEVICE_MANIFEST_FILE := $(FP_PATH)/manifest.xml |
| 177 | DEVICE_MATRIX_FILE := $(FP_PATH)/compatibility_matrix.xml |
| 178 | DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \ |
| 179 | vendor/qcom/opensource/core-utils/vendor_framework_compatibility_matrix.xml |
| 180 | |
| 181 | |
| 182 | # Kernel |
| 183 | BOARD_KERNEL_BASE := 0x80000000 |
| 184 | BOARD_KERNEL_PAGESIZE := 2048 |
| 185 | BOARD_KERNEL_OFFSET := 0x00008000 |
| 186 | BOARD_KERNEL_TAGS_OFFSET := 0x00000100 |
| 187 | BOARD_RAMDISK_OFFSET := 0x01000000 |
| 188 | TARGET_COMPILE_WITH_MSM_KERNEL := true |
| 189 | TARGET_KERNEL_VERSION ?= 4.9 |
| 190 | TARGET_KERNEL_SOURCE ?= kernel/msm-$(TARGET_KERNEL_VERSION) |
| 191 | TARGET_KERNEL_ARCH := arm64 |
| 192 | TARGET_KERNEL_HEADER_ARCH := arm64 |
| 193 | TARGET_KERNEL_APPEND_DTB := true |
| 194 | TARGET_USES_UNCOMPRESSED_KERNEL := false |
| 195 | BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb |
| 196 | BOARD_KERNEL_SEPARATED_DTBO := true |
| 197 | |
| 198 | BOARD_KERNEL_CMDLINE := androidboot.console=ttyMSM0 |
| 199 | BOARD_KERNEL_CMDLINE += androidboot.hardware=qcom |
| 200 | BOARD_KERNEL_CMDLINE += msm_rtb.filter=0x237 |
| 201 | BOARD_KERNEL_CMDLINE += ehci-hcd.park=3 |
| 202 | BOARD_KERNEL_CMDLINE += lpm_levels.sleep_disabled=1 |
| 203 | BOARD_KERNEL_CMDLINE += androidboot.bootdevice=7824900.sdhci |
| 204 | BOARD_KERNEL_CMDLINE += earlycon=msm_serial_dm,0x78af000 |
| 205 | BOARD_KERNEL_CMDLINE += androidboot.usbconfigfs=true |
| 206 | BOARD_KERNEL_CMDLINE += loop.max_part=7 |
| 207 | ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) |
| 208 | BOARD_KERNEL_CMDLINE += console=ttyMSM0,115200,n8 |
| 209 | BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive |
| 210 | endif |
| 211 | |
| 212 | # Declare boot header |
| 213 | BOARD_BOOT_HEADER_VERSION := 1 |
| 214 | BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION) |
| 215 | |
| 216 | |
| 217 | # Kernel modules |
| 218 | BOARD_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 | |
Bharath | 177fda8 | 2021-08-14 20:30:27 +0530 | [diff] [blame] | 244 | BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/pronto_wlan.ko |
| 245 | |
Bharath | 831e6d3 | 2021-08-07 20:19:03 +0530 | [diff] [blame] | 246 | |
| 247 | # Lights |
| 248 | TARGET_PROVIDES_LIBLIGHT := true |
| 249 | |
| 250 | |
| 251 | # NFC |
Bharath | e53322f | 2021-08-20 18:17:49 +0530 | [diff] [blame] | 252 | BOARD_NFC_CHIPSET := pn553 |
Bharath | 831e6d3 | 2021-08-07 20:19:03 +0530 | [diff] [blame] | 253 | |
| 254 | |
| 255 | # Others |
| 256 | BOARD_CHARGER_DISABLE_INIT_BLANK := true # Disable the init blank to avoid flicker |
| 257 | BOARD_CHARGER_ENABLE_SUSPEND := true # Enable suspend during charger mode |
| 258 | BOARD_DO_NOT_STRIP_VENDOR_MODULES := true |
| 259 | BOARD_USES_GENERIC_AUDIO := true |
| 260 | KASLRSEED_SUPPORT := true # Enable kaslr seed support |
| 261 | TARGET_USES_AOSP := false |
| 262 | TARGET_USES_AOSP_FOR_AUDIO := false |
| 263 | TARGET_USE_MDTP := true # Enable MDTP during recovery |
| 264 | TARGET_USES_QCOM_BSP := false |
| 265 | TARGET_USES_MEDIA_EXTENSIONS := true |
| 266 | |
| 267 | |
| 268 | # QCOM hardware |
| 269 | BOARD_USES_QCOM_HARDWARE := true |
| 270 | |
| 271 | |
| 272 | # Recovery |
| 273 | TARGET_RECOVERY_FSTAB := $(FP_PATH)/fstabs-4.9/recovery_AB_split_variant.fstab |
| 274 | |
| 275 | |
| 276 | # SELinux |
| 277 | include device/qcom/sepolicy/SEPolicy.mk |
| 278 | BOARD_VENDOR_SEPOLICY_DIRS += $(FP_PATH)/sepolicy/vendor |
Bharath | 8f1d180 | 2021-08-20 00:37:40 +0530 | [diff] [blame] | 279 | #TODO: clean up elan policies |
| 280 | BOARD_VENDOR_SEPOLICY_DIRS += $(FP_PATH)/elan_lib/fingerprint/sepolicy |
Luca Weiss | 883f988 | 2021-10-05 12:01:05 +0200 | [diff] [blame] | 281 | BOARD_VENDOR_SEPOLICY_DIRS += $(FP_PATH)/sepolicy/vendor/automation_setup |
Bharath | 831e6d3 | 2021-08-07 20:19:03 +0530 | [diff] [blame] | 282 | |
| 283 | |
| 284 | # Seccomp |
| 285 | BOARD_SECCOMP_POLICY := $(FP_PATH)/seccomp |
| 286 | |
| 287 | |
| 288 | # Sensors |
Bharath | 00a0ca2 | 2021-08-19 09:43:30 +0530 | [diff] [blame] | 289 | USE_SENSOR_MULTI_HAL := true |
Bharath | 831e6d3 | 2021-08-07 20:19:03 +0530 | [diff] [blame] | 290 | |
| 291 | |
| 292 | # Treble |
| 293 | BOARD_SYSTEMSDK_VERSIONS := 28 |
| 294 | BOARD_VNDK_VERSION := current |
| 295 | |
| 296 | |
| 297 | # WiFi |
Bharath | 177fda8 | 2021-08-14 20:30:27 +0530 | [diff] [blame] | 298 | BOARD_HAS_QCOM_WLAN := true |
| 299 | BOARD_HOSTAPD_DRIVER := NL80211 |
| 300 | BOARD_WLAN_DEVICE := qcwcn |
| 301 | BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) |
| 302 | BOARD_WPA_SUPPLICANT_DRIVER := NL80211 |
| 303 | BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) |
| 304 | WIFI_DRIVER_MODULE_NAME := "wlan" |
| 305 | WIFI_DRIVER_MODULE_PATH := "vendor/lib/modules/pronto_wlan.ko" |
| 306 | WIFI_DRIVER_FW_PATH_AP := "ap" |
| 307 | WIFI_DRIVER_FW_PATH_P2P := "p2p" |
| 308 | WIFI_DRIVER_FW_PATH_STA := "sta" |
| 309 | WIFI_DRIVER_INSTALL_TO_KERNEL_OUT := true# Part of proprietary code |
| 310 | WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true |
| 311 | WPA_SUPPLICANT_VERSION := VER_0_8_X |
Bharath | 831e6d3 | 2021-08-07 20:19:03 +0530 | [diff] [blame] | 312 | |
| 313 | # Vendor-specific definitions |
| 314 | -include vendor/fairphone/fp3/BoardConfigVendor.mk |