blob: e428404511d53cdeb3fe74c8d5f95b8a93dad2d1 [file] [log] [blame]
# config.mk
#
# Product-specific compile-time definitions.
#
# Check whether to use a perf or a debug kernel configuration.
# Always use perf kernel on user and userdebug builds. STS testing etc on
# fp2-gms userdebuilds runs into performance issues when using the debug kernel.
ifneq (,$(filter user userdebug,$(TARGET_BUILD_VARIANT)))
KERNEL_USE_PERF_CONFIG=true
else
KERNEL_USE_PERF_CONFIG=false
endif
#Architecture
ifeq ($(TARGET_ARCH),)
TARGET_ARCH := arm
endif
TARGET_ARCH_VARIANT := armv7-a-neon
TARGET_CPU_ABI := armeabi-v7a
TARGET_CPU_ABI2 := armeabi
TARGET_CPU_VARIANT := generic
TARGET_CPU_VARIANT_RUNTIME := krait
TARGET_KERNEL_ARCH := arm
#Audio
AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := false
AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true
AUDIO_FEATURE_ENABLED_EXTN_POST_PROC := true
AUDIO_FEATURE_ENABLED_FLUENCE := true
AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true
AUDIO_FEATURE_ENABLED_HFP := true
AUDIO_FEATURE_ENABLED_HWDEP_CAL := true
AUDIO_FEATURE_ENABLED_LOW_LATENCY_CAPTURE := true
AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
AUDIO_FEATURE_ENABLED_NEW_SAMPLE_RATE := true
AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
AUDIO_FEATURE_LOW_LATENCY_PRIMARY := true
BOARD_USES_ALSA_AUDIO := true
BOARD_USES_GENERIC_AUDIO := true
USE_CUSTOM_AUDIO_POLICY := 1
USE_XML_AUDIO_POLICY_CONF := 1
#Board
TARGET_BOARD_PLATFORM := msm8974
TARGET_BOOTLOADER_BOARD_NAME := FP2
TARGET_BOOTLOADER_PLATFORM_OVERRIDE := $(TARGET_DEVICE)
# Camera
TARGET_USES_AOSP := false
TARGET_USES_MEDIA_EXTENSIONS := true
USE_CAMERA_STUB := false
# Charger
BOARD_HAL_STATIC_LIBRARIES := libhealthd.FP2
# Dexpreopt
ifeq ($(HOST_OS),linux)
ifneq ($(TARGET_BUILD_VARIANT),eng)
ifeq ($(WITH_DEXPREOPT),)
WITH_DEXPREOPT := true
WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY := true
endif
endif
endif
#Encryption
TARGET_HW_DISK_ENCRYPTION := false
#File system
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x01000000
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_CACHEIMAGE_PARTITION_SIZE := 671088640
BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64)
BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_PERSISTIMAGE_PARTITION_SIZE := 5242880
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x01000000
BOARD_ROOT_EXTRA_FOLDERS := firmware persist
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2147483648
BOARD_TOMBSTONESIMAGE_PARTITION_SIZE := 73400320
BOARD_USERDATAIMAGE_PARTITION_SIZE := 27358941675
TARGET_BOOTIMG_SIGNED := true
TARGET_USERIMAGES_USE_EXT4 := true
# Filesystem
TARGET_FS_CONFIG_GEN := device/fairphone/FP2/configs/config.fs
# Graphics
# Enables Adreno RS driver
OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS := 0x02000000U
TARGET_USES_ION := true
# Display Density
TARGET_SCREEN_DENSITY := 440
# HIDL
DEVICE_MANIFEST_FILE := device/fairphone/FP2/manifest.xml
# FM
BOARD_HAVE_QCOM_FM := true
#Init and updater
TARGET_INIT_VENDOR_LIB := libinit_msm8974
TARGET_RECOVERY_UPDATER_LIBS := librecovery_updater_msm
# Lights
TARGET_PROVIDES_LIBLIGHT := true
# Control flag between KM versions
TARGET_HW_KEYMASTER_V03 := true
# Wait for qseecomd
TARGET_KEYMASTER_WAIT_FOR_QSEE := true
#Kernel
BOARD_KERNEL_BASE := 0x00000000
BOARD_KERNEL_OFFSET := 0x00080000
BOARD_KERNEL_PAGESIZE := 2048
BOARD_KERNEL_TAGS_OFFSET := 0x01E00000
BOARD_RAMDISK_OFFSET := 0x02000000
TARGET_COMPILE_WITH_MSM_KERNEL := true
TARGET_KERNEL_APPEND_DTB := false
TARGET_USES_64_BIT_BINDER := true
ifeq ($(KERNEL_USE_PERF_CONFIG), false)
BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3b7 ehci-hcd.park=3 androidboot.bootdevice=msm_sdcc.1
else
BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3b7 ehci-hcd.park=3 androidboot.bootdevice=msm_sdcc.1
endif
BOARD_KERNEL_SEPARATED_DT := true
BOARD_MKBOOTIMG_ARGS:= --kernel_offset $(BOARD_KERNEL_OFFSET) --ramdisk_offset $(BOARD_RAMDISK_OFFSET) --tags_offset $(BOARD_KERNEL_TAGS_OFFSET)
# Malloc
MALLOC_SVELTE := true
# QCOM hardware
BOARD_USES_QCOM_HARDWARE := true
# QCOM Power
TARGET_HAS_LEGACY_POWER_STATS := true
TARGET_HAS_NO_WLAN_STATS := true
#SELinux
BOARD_SEPOLICY_DIRS += \
device/fairphone/FP2/sepolicy
# WiFi
BOARD_HAS_QCOM_WLAN := true
BOARD_HOSTAPD_DRIVER := NL80211
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_qcwcn
BOARD_WLAN_DEVICE := qcwcn
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_qcwcn
PRODUCT_VENDOR_MOVE_ENABLED := true
TARGET_DISABLE_WCNSS_CONFIG_COPY := true
TARGET_USES_QCOM_WCNSS_QMI := true
WIFI_DRIVER_FW_PATH_AP := "ap"
WIFI_DRIVER_FW_PATH_STA := "sta"
WPA_SUPPLICANT_VERSION := VER_0_8_X
# Workaround framework bluetooth dependency
BOARD_HAVE_BLUETOOTH_QCOM := true
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/qcom/common
TARGET_RELEASETOOLS_EXTENSIONS := device/fairphone/FP2
#Radio files
TARGET_ADD_RADIO_FILES := true
# Vendor-specific definitions
include vendor/fairphone/fp2/BoardConfigVendor.mk