blob: 00cbd58592a86bba3c1f02307b81effd0771e177 [file] [log] [blame]
# config.mk
#
# Product-specific compile-time definitions.
#
FP_PATH := device/fairphone/FP3
# Architecture
TARGET_ARCH := arm64
TARGET_ARCH_VARIANT := armv8-a
TARGET_CPU_ABI := arm64-v8a
TARGET_CPU_ABI2 :=
TARGET_CPU_VARIANT := generic
TARGET_CPU_VARIANT_RUNTIME := kryo
TARGET_2ND_ARCH := arm
TARGET_2ND_ARCH_VARIANT := armv8-a
TARGET_2ND_CPU_ABI := armeabi-v7a
TARGET_2ND_CPU_ABI2 := armeabi
TARGET_2ND_CPU_VARIANT := generic
TARGET_2ND_CPU_VARIANT_RUNTIME := cortex-a53
TARGET_CPU_CORTEX_A53 := true
# Adreno
BOARD_USES_ADRENO := true
# Audio
# QC Audio
#AUDIO_FEATURE_ENABLED_MULTIPLE_TUNNEL := true
#AUDIO_FEATURE_ENABLED_VOICE_CONCURRENCY := true
AUDIO_FEATURE_ENABLED_AAC_ADTS_OFFLOAD := true
AUDIO_FEATURE_ENABLED_ALAC_OFFLOAD := true
AUDIO_FEATURE_ENABLED_APE_OFFLOAD := true
AUDIO_FEATURE_ENABLED_AUDIOSPHERE := true
AUDIO_FEATURE_ENABLED_COMPRESS_CAPTURE := false
AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := false
AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := false
AUDIO_FEATURE_ENABLED_DTS_EAGLE := false
AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER := true
AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true
AUDIO_FEATURE_ENABLED_EXTN_RESAMPLER := true
AUDIO_FEATURE_ENABLED_FLAC_OFFLOAD := true
AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true
AUDIO_FEATURE_ENABLED_HW_ACCELERATED_EFFECTS := false
AUDIO_FEATURE_ENABLED_PCM_OFFLOAD := true
AUDIO_FEATURE_ENABLED_PCM_OFFLOAD_24 := true
AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
AUDIO_FEATURE_ENABLED_SSR := true
AUDIO_FEATURE_ENABLED_VORBIS_OFFLOAD := true
AUDIO_FEATURE_ENABLED_WMA_OFFLOAD := true
AUDIO_FEATURE_QSSI_COMPLIANCE := true
BOARD_USES_ALSA_AUDIO := true
BOARD_USES_SRS_TRUEMEDIA := false
DOLBY_ENABLE := false
DTS_CODEC_M_ := true
MM_AUDIO_ENABLED_SAFX := true
USE_CUSTOM_AUDIO_POLICY := 1
AUDIO_FEATURE_ENABLED_ACDB_LICENSE := true
AUDIO_FEATURE_ENABLED_ANC_HEADSET := true
AUDIO_FEATURE_ENABLED_CUSTOMSTEREO := true
AUDIO_FEATURE_ENABLED_DEV_ARBI := false
AUDIO_FEATURE_ENABLED_DLKM := true
AUDIO_FEATURE_ENABLED_DYNAMIC_LOG := false # TODO: Check if this is required, has proprietary depepndency
AUDIO_FEATURE_ENABLED_EXT_HDMI := false # TODO: Check if this is required, has proprietary depepndency
AUDIO_FEATURE_ENABLED_FLUENCE := true
AUDIO_FEATURE_ENABLED_HDMI_EDID := true
AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH := true
AUDIO_FEATURE_ENABLED_HDMI_SPK := true
AUDIO_FEATURE_ENABLED_HFP := true
AUDIO_FEATURE_ENABLED_HIFI_AUDIO := true
AUDIO_FEATURE_ENABLED_INCALL_MUSIC := true
AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE := true
AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
AUDIO_FEATURE_ENABLED_NT_PAUSE_TIMEOUT := true
AUDIO_FEATURE_ENABLED_SND_MONITOR := true
AUDIO_FEATURE_ENABLED_SOURCE_TRACKING := true
AUDIO_FEATURE_ENABLED_SPKR_PROTECTION := true
AUDIO_FEATURE_ENABLED_SVA_MULTI_STAGE := true
AUDIO_FEATURE_ENABLED_VBAT_MONITOR := true
AUDIO_USE_LL_AS_PRIMARY_OUTPUT := true
BOARD_SUPPORTS_QAHW := false
BOARD_SUPPORTS_SOUND_TRIGGER := true
MM_AUDIO_ENABLED_FTM := true
TARGET_USES_QCOM_MM_AUDIO := true
USE_XML_AUDIO_POLICY_CONF := 1
# Bluetooth
BLUETOOTH_HCI_USE_MCT := true
BOARD_ANT_WIRELESS_DEVICE := "vfs-prerelease"
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/qcom/common
BOARD_HAVE_BLUETOOTH := true
#Board
BOOTLOADER_PLATFORM := msm8953 # use msm8953 LK configuration
TARGET_BOARD_PLATFORM := msm8953
TARGET_BOOTLOADER_BOARD_NAME := FP3
TARGET_BOOTLOADER_PLATFORM_OVERRIDE := $(TARGET_DEVICE)
TARGET_NO_BOOTLOADER := false
# Broken flags
BUILD_BROKEN_NINJA_USES_ENV_VARS := SDCLANG_AE_CONFIG SDCLANG_CONFIG SDCLANG_SA_ENABLED SDCLANG_CONFIG_AOSP
BUILD_BROKEN_NINJA_USES_ENV_VARS += TEMPORARY_DISABLE_PATH_RESTRICTIONS
BUILD_BROKEN_NINJA_USES_ENV_VARS += RTIC_MPGEN
# Camera
BOARD_QTI_CAMERA_32BIT_ONLY := true
# Data
# Dexpreopt
# Enable dex pre-opt to speed up initial boot
ifeq ($(HOST_OS),linux)
ifeq ($(WITH_DEXPREOPT),)
WITH_DEXPREOPT := true
WITH_DEXPREOPT_PIC := true
ifneq ($(TARGET_BUILD_VARIANT),user)
# Retain classes.dex in APK's for non-user builds
DEX_PREOPT_DEFAULT := nostripping
endif
endif
endif
# File systems and Partitions
BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_USES_METADATA_PARTITION := true
BOARD_USES_RECOVERY_AS_BOOT := true
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
TARGET_COPY_OUT_VENDOR := vendor
TARGET_NO_RECOVERY := true
TARGET_USERIMAGES_USE_EXT4 := true
# Note: Support for Product partition is intentionally removed
# because of the limited size of the partition(125MB).
# It will be system/product/ instead.
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x04000000
BOARD_DTBOIMG_PARTITION_SIZE := 8388608
BOARD_FLASH_BLOCK_SIZE := 131072
BOARD_METADATAIMAGE_PARTITION_SIZE := 16777216
BOARD_OEMIMAGE_PARTITION_SIZE := 268435456
BOARD_PERSISTIMAGE_PARTITION_SIZE := 33554432
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3221225472
BOARD_USERDATAIMAGE_PARTITION_SIZE := 51808043008
BOARD_VENDORIMAGE_PARTITION_SIZE := 1073741824
# Filesystem
TARGET_FS_CONFIG_GEN := $(FP_PATH)/configs/config.fs
# GPS
# Graphics
# MAX_VIRTUAL_DISPLAY_DIMENSION := 4096
MAX_EGL_CACHE_KEY_SIZE := 12*1024
MAX_EGL_CACHE_SIZE := 2048*1024
NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS := true
TARGET_USES_C2D_COMPOSITION := true
TARGET_USES_COLOR_METADATA := true
TARGET_USES_GRALLOC1 := true
TARGET_USES_HWC2 := true
TARGET_USES_ION := true
# HIDL
DEVICE_FRAMEWORK_MANIFEST_FILE := $(FP_PATH)/framework_manifest.xml
DEVICE_MANIFEST_FILE := $(FP_PATH)/manifest.xml
DEVICE_MATRIX_FILE := $(FP_PATH)/compatibility_matrix.xml
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
vendor/qcom/opensource/core-utils/vendor_framework_compatibility_matrix.xml
# Kernel
BOARD_KERNEL_BASE := 0x80000000
BOARD_KERNEL_PAGESIZE := 2048
BOARD_KERNEL_OFFSET := 0x00008000
BOARD_KERNEL_TAGS_OFFSET := 0x00000100
BOARD_RAMDISK_OFFSET := 0x01000000
TARGET_COMPILE_WITH_MSM_KERNEL := true
TARGET_KERNEL_VERSION ?= 4.9
TARGET_KERNEL_SOURCE ?= kernel/msm-$(TARGET_KERNEL_VERSION)
TARGET_KERNEL_ARCH := arm64
TARGET_KERNEL_HEADER_ARCH := arm64
TARGET_KERNEL_APPEND_DTB := true
TARGET_USES_UNCOMPRESSED_KERNEL := false
BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb
BOARD_KERNEL_SEPARATED_DTBO := true
BOARD_KERNEL_CMDLINE := androidboot.console=ttyMSM0
BOARD_KERNEL_CMDLINE += androidboot.hardware=qcom
BOARD_KERNEL_CMDLINE += msm_rtb.filter=0x237
BOARD_KERNEL_CMDLINE += ehci-hcd.park=3
BOARD_KERNEL_CMDLINE += lpm_levels.sleep_disabled=1
BOARD_KERNEL_CMDLINE += androidboot.bootdevice=7824900.sdhci
BOARD_KERNEL_CMDLINE += earlycon=msm_serial_dm,0x78af000
BOARD_KERNEL_CMDLINE += androidboot.usbconfigfs=true
BOARD_KERNEL_CMDLINE += loop.max_part=7
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
BOARD_KERNEL_CMDLINE += console=ttyMSM0,115200,n8
BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
endif
# Declare boot header
BOARD_BOOT_HEADER_VERSION := 1
BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
# Kernel modules
BOARD_VENDOR_KERNEL_MODULES := \
$(KERNEL_MODULES_OUT)/audio_apr.ko \
$(KERNEL_MODULES_OUT)/audio_q6_notifier.ko \
$(KERNEL_MODULES_OUT)/audio_adsp_loader.ko \
$(KERNEL_MODULES_OUT)/audio_q6.ko \
$(KERNEL_MODULES_OUT)/audio_usf.ko \
$(KERNEL_MODULES_OUT)/audio_pinctrl_wcd.ko \
$(KERNEL_MODULES_OUT)/audio_swr.ko \
$(KERNEL_MODULES_OUT)/audio_wcd_core.ko \
$(KERNEL_MODULES_OUT)/audio_swr_ctrl.ko \
$(KERNEL_MODULES_OUT)/audio_wsa881x.ko \
$(KERNEL_MODULES_OUT)/audio_wsa881x_analog.ko \
$(KERNEL_MODULES_OUT)/audio_platform.ko \
$(KERNEL_MODULES_OUT)/audio_cpe_lsm.ko \
$(KERNEL_MODULES_OUT)/audio_hdmi.ko \
$(KERNEL_MODULES_OUT)/audio_stub.ko \
$(KERNEL_MODULES_OUT)/audio_wcd9xxx.ko \
$(KERNEL_MODULES_OUT)/audio_mbhc.ko \
$(KERNEL_MODULES_OUT)/audio_wcd9335.ko \
$(KERNEL_MODULES_OUT)/audio_wcd_cpe.ko \
$(KERNEL_MODULES_OUT)/audio_digital_cdc.ko \
$(KERNEL_MODULES_OUT)/audio_analog_cdc.ko \
$(KERNEL_MODULES_OUT)/audio_native.ko \
$(KERNEL_MODULES_OUT)/audio_machine_sdm450.ko \
$(KERNEL_MODULES_OUT)/audio_machine_ext_sdm450.ko
BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/pronto_wlan.ko
# Lights
TARGET_PROVIDES_LIBLIGHT := true
# NFC
# Others
BOARD_CHARGER_DISABLE_INIT_BLANK := true # Disable the init blank to avoid flicker
BOARD_CHARGER_ENABLE_SUSPEND := true # Enable suspend during charger mode
BOARD_DO_NOT_STRIP_VENDOR_MODULES := true
BOARD_USES_GENERIC_AUDIO := true
KASLRSEED_SUPPORT := true # Enable kaslr seed support
TARGET_USES_AOSP := false
TARGET_USES_AOSP_FOR_AUDIO := false
TARGET_USE_MDTP := true # Enable MDTP during recovery
TARGET_USES_QCOM_BSP := false
TARGET_USES_MEDIA_EXTENSIONS := true
# QCOM hardware
BOARD_USES_QCOM_HARDWARE := true
# Recovery
TARGET_RECOVERY_FSTAB := $(FP_PATH)/fstabs-4.9/recovery_AB_split_variant.fstab
# SELinux
include device/qcom/sepolicy/SEPolicy.mk
BOARD_VENDOR_SEPOLICY_DIRS += $(FP_PATH)/sepolicy/vendor
#TODO: clean up elan policies
BOARD_VENDOR_SEPOLICY_DIRS += $(FP_PATH)/elan_lib/fingerprint/sepolicy
# Seccomp
BOARD_SECCOMP_POLICY := $(FP_PATH)/seccomp
# Sensors
USE_SENSOR_MULTI_HAL := true
# Treble
BOARD_SYSTEMSDK_VERSIONS := 28
BOARD_VNDK_VERSION := current
# WiFi
BOARD_HAS_QCOM_WLAN := true
BOARD_HOSTAPD_DRIVER := NL80211
BOARD_WLAN_DEVICE := qcwcn
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
WIFI_DRIVER_MODULE_NAME := "wlan"
WIFI_DRIVER_MODULE_PATH := "vendor/lib/modules/pronto_wlan.ko"
WIFI_DRIVER_FW_PATH_AP := "ap"
WIFI_DRIVER_FW_PATH_P2P := "p2p"
WIFI_DRIVER_FW_PATH_STA := "sta"
WIFI_DRIVER_INSTALL_TO_KERNEL_OUT := true# Part of proprietary code
WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
WPA_SUPPLICANT_VERSION := VER_0_8_X
# Vendor-specific definitions
-include vendor/fairphone/fp3/BoardConfigVendor.mk