Vivekbalachandar M | 9776970 | 2020-02-12 15:52:43 +0530 | [diff] [blame] | 1 | # config.mk |
| 2 | # |
| 3 | # Product-specific compile-time definitions. |
| 4 | # |
Bharath | d332e56 | 2020-12-07 10:21:16 +0530 | [diff] [blame] | 5 | |
Karsten Tausche | f133850 | 2021-06-14 11:30:53 +0200 | [diff] [blame] | 6 | # Check whether to use a perf or a debug kernel configuration. |
Karsten Tausche | 23ec424 | 2021-08-04 17:06:13 +0200 | [diff] [blame] | 7 | # Always use perf kernel on user and userdebug builds. STS testing etc on |
| 8 | # fp2-gms userdebuilds runs into performance issues when using the debug kernel. |
| 9 | ifneq (,$(filter user userdebug,$(TARGET_BUILD_VARIANT))) |
| 10 | KERNEL_USE_PERF_CONFIG=true |
Karsten Tausche | f133850 | 2021-06-14 11:30:53 +0200 | [diff] [blame] | 11 | else |
Karsten Tausche | 23ec424 | 2021-08-04 17:06:13 +0200 | [diff] [blame] | 12 | KERNEL_USE_PERF_CONFIG=false |
Karsten Tausche | f133850 | 2021-06-14 11:30:53 +0200 | [diff] [blame] | 13 | endif |
| 14 | |
Bharath | d332e56 | 2020-12-07 10:21:16 +0530 | [diff] [blame] | 15 | #Architecture |
Vivekbalachandar Marisamy | 54014b3 | 2019-11-08 06:34:08 +0000 | [diff] [blame] | 16 | ifeq ($(TARGET_ARCH),) |
| 17 | TARGET_ARCH := arm |
| 18 | endif |
Bharath | d332e56 | 2020-12-07 10:21:16 +0530 | [diff] [blame] | 19 | TARGET_ARCH_VARIANT := armv7-a-neon |
Vivekbalachandar M | 9776970 | 2020-02-12 15:52:43 +0530 | [diff] [blame] | 20 | TARGET_CPU_ABI := armeabi-v7a |
| 21 | TARGET_CPU_ABI2 := armeabi |
Anton Hansson | 002d2d0 | 2019-02-08 17:56:34 +0000 | [diff] [blame] | 22 | TARGET_CPU_VARIANT := generic |
Anton Hansson | 671fe3f | 2019-02-21 15:04:20 +0000 | [diff] [blame] | 23 | TARGET_CPU_VARIANT_RUNTIME := krait |
Bharath | d332e56 | 2020-12-07 10:21:16 +0530 | [diff] [blame] | 24 | TARGET_KERNEL_ARCH := arm |
Vivekbalachandar Marisamy | 54014b3 | 2019-11-08 06:34:08 +0000 | [diff] [blame] | 25 | |
Vivekbalachandar Marisamy | 54014b3 | 2019-11-08 06:34:08 +0000 | [diff] [blame] | 26 | |
Bharath | d332e56 | 2020-12-07 10:21:16 +0530 | [diff] [blame] | 27 | #Audio |
Vivekbalachandar M | 9776970 | 2020-02-12 15:52:43 +0530 | [diff] [blame] | 28 | AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := false |
| 29 | AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true |
| 30 | AUDIO_FEATURE_ENABLED_EXTN_POST_PROC := true |
| 31 | AUDIO_FEATURE_ENABLED_FLUENCE := true |
| 32 | AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true |
| 33 | AUDIO_FEATURE_ENABLED_HFP := true |
| 34 | AUDIO_FEATURE_ENABLED_HWDEP_CAL := true |
| 35 | AUDIO_FEATURE_ENABLED_LOW_LATENCY_CAPTURE := true |
| 36 | AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true |
| 37 | AUDIO_FEATURE_ENABLED_NEW_SAMPLE_RATE := true |
| 38 | AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true |
| 39 | AUDIO_FEATURE_LOW_LATENCY_PRIMARY := true |
| 40 | BOARD_USES_ALSA_AUDIO := true |
Bharath | d332e56 | 2020-12-07 10:21:16 +0530 | [diff] [blame] | 41 | BOARD_USES_GENERIC_AUDIO := true |
Luca Weiss | c2dbe19 | 2021-07-28 13:20:20 +0200 | [diff] [blame] | 42 | USE_CUSTOM_AUDIO_POLICY := 1 |
Bruno Martins | 7e83740 | 2017-12-18 11:20:17 +0000 | [diff] [blame] | 43 | USE_XML_AUDIO_POLICY_CONF := 1 |
Vivekbalachandar M | 9776970 | 2020-02-12 15:52:43 +0530 | [diff] [blame] | 44 | |
Bharath | d332e56 | 2020-12-07 10:21:16 +0530 | [diff] [blame] | 45 | #Board |
| 46 | TARGET_BOARD_PLATFORM := msm8974 |
| 47 | TARGET_BOOTLOADER_BOARD_NAME := FP2 |
| 48 | TARGET_BOOTLOADER_PLATFORM_OVERRIDE := $(TARGET_DEVICE) |
Vivekbalachandar M | 9776970 | 2020-02-12 15:52:43 +0530 | [diff] [blame] | 49 | |
| 50 | # Camera |
Bharath | d332e56 | 2020-12-07 10:21:16 +0530 | [diff] [blame] | 51 | TARGET_USES_AOSP := false |
Vivekbalachandar M | 9776970 | 2020-02-12 15:52:43 +0530 | [diff] [blame] | 52 | TARGET_USES_MEDIA_EXTENSIONS := true |
Bharath | d332e56 | 2020-12-07 10:21:16 +0530 | [diff] [blame] | 53 | USE_CAMERA_STUB := false |
Vivekbalachandar M | 9776970 | 2020-02-12 15:52:43 +0530 | [diff] [blame] | 54 | |
Bharath | d332e56 | 2020-12-07 10:21:16 +0530 | [diff] [blame] | 55 | # Charger |
| 56 | BOARD_HAL_STATIC_LIBRARIES := libhealthd.FP2 |
| 57 | |
Artem Borisov | 28d2683 | 2017-12-30 16:03:20 +0300 | [diff] [blame] | 58 | # Dexpreopt |
| 59 | ifeq ($(HOST_OS),linux) |
| 60 | ifneq ($(TARGET_BUILD_VARIANT),eng) |
| 61 | ifeq ($(WITH_DEXPREOPT),) |
| 62 | WITH_DEXPREOPT := true |
| 63 | WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY := true |
| 64 | endif |
| 65 | endif |
| 66 | endif |
| 67 | |
Bharath | d332e56 | 2020-12-07 10:21:16 +0530 | [diff] [blame] | 68 | #Encryption |
| 69 | TARGET_HW_DISK_ENCRYPTION := false |
| 70 | |
| 71 | #File system |
| 72 | BOARD_BOOTIMAGE_PARTITION_SIZE := 0x01000000 |
| 73 | BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 74 | BOARD_CACHEIMAGE_PARTITION_SIZE := 671088640 |
| 75 | BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64) |
| 76 | BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 77 | BOARD_PERSISTIMAGE_PARTITION_SIZE := 5242880 |
| 78 | BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x01000000 |
Bruno Martins | 4e03566 | 2018-10-08 00:25:18 +0100 | [diff] [blame] | 79 | BOARD_ROOT_EXTRA_FOLDERS := firmware persist |
Bharath | d332e56 | 2020-12-07 10:21:16 +0530 | [diff] [blame] | 80 | BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2147483648 |
| 81 | BOARD_TOMBSTONESIMAGE_PARTITION_SIZE := 73400320 |
| 82 | BOARD_USERDATAIMAGE_PARTITION_SIZE := 27358941675 |
| 83 | TARGET_BOOTIMG_SIGNED := true |
| 84 | TARGET_USERIMAGES_USE_EXT4 := true |
| 85 | |
Bharath | df173dd | 2020-10-23 12:27:49 +0530 | [diff] [blame] | 86 | # Filesystem |
| 87 | TARGET_FS_CONFIG_GEN := device/fairphone/FP2/configs/config.fs |
| 88 | |
Vivekbalachandar M | 9776970 | 2020-02-12 15:52:43 +0530 | [diff] [blame] | 89 | # Graphics |
Bharath | 4299564 | 2020-11-19 09:34:15 +0530 | [diff] [blame] | 90 | # Enables Adreno RS driver |
Vivekbalachandar M | 9776970 | 2020-02-12 15:52:43 +0530 | [diff] [blame] | 91 | OVERRIDE_RS_DRIVER := libRSDriver_adreno.so |
| 92 | TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS := 0x02000000U |
| 93 | TARGET_USES_ION := true |
Vivekbalachandar M | 9776970 | 2020-02-12 15:52:43 +0530 | [diff] [blame] | 94 | |
Anton Hansson | 6ce790b | 2019-01-18 14:10:45 +0000 | [diff] [blame] | 95 | # Display Density |
| 96 | TARGET_SCREEN_DENSITY := 440 |
| 97 | |
Bharath | d332e56 | 2020-12-07 10:21:16 +0530 | [diff] [blame] | 98 | # HIDL |
| 99 | DEVICE_MANIFEST_FILE := device/fairphone/FP2/manifest.xml |
| 100 | |
Luca Weiss | b1930d4 | 2021-02-17 11:15:45 +0100 | [diff] [blame] | 101 | # FM |
| 102 | BOARD_HAVE_QCOM_FM := true |
| 103 | |
Bharath | d332e56 | 2020-12-07 10:21:16 +0530 | [diff] [blame] | 104 | #Init and updater |
| 105 | TARGET_INIT_VENDOR_LIB := libinit_msm8974 |
| 106 | TARGET_RECOVERY_UPDATER_LIBS := librecovery_updater_msm |
| 107 | |
| 108 | # Lights |
| 109 | TARGET_PROVIDES_LIBLIGHT := true |
| 110 | |
| 111 | # Control flag between KM versions |
| 112 | TARGET_HW_KEYMASTER_V03 := true |
chrmhoffmann | 0b339ab | 2019-12-08 10:08:13 +0100 | [diff] [blame] | 113 | # Wait for qseecomd |
| 114 | TARGET_KEYMASTER_WAIT_FOR_QSEE := true |
Bharath | d332e56 | 2020-12-07 10:21:16 +0530 | [diff] [blame] | 115 | |
| 116 | #Kernel |
| 117 | BOARD_KERNEL_BASE := 0x00000000 |
| 118 | BOARD_KERNEL_OFFSET := 0x00080000 |
| 119 | BOARD_KERNEL_PAGESIZE := 2048 |
| 120 | BOARD_KERNEL_TAGS_OFFSET := 0x01E00000 |
| 121 | BOARD_RAMDISK_OFFSET := 0x02000000 |
| 122 | TARGET_COMPILE_WITH_MSM_KERNEL := true |
Bharath | d332e56 | 2020-12-07 10:21:16 +0530 | [diff] [blame] | 123 | TARGET_KERNEL_APPEND_DTB := false |
Sooraj Sizon | 618895f | 2021-01-21 11:43:30 +0100 | [diff] [blame] | 124 | TARGET_USES_64_BIT_BINDER := true |
Bharath | d332e56 | 2020-12-07 10:21:16 +0530 | [diff] [blame] | 125 | |
Karsten Tausche | f133850 | 2021-06-14 11:30:53 +0200 | [diff] [blame] | 126 | ifeq ($(KERNEL_USE_PERF_CONFIG), false) |
Bharath | 49b6fb3 | 2021-01-14 12:54:37 +0530 | [diff] [blame] | 127 | 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 |
Bharath | d332e56 | 2020-12-07 10:21:16 +0530 | [diff] [blame] | 128 | else |
| 129 | BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3b7 ehci-hcd.park=3 androidboot.bootdevice=msm_sdcc.1 |
| 130 | endif |
| 131 | BOARD_KERNEL_SEPARATED_DT := true |
| 132 | |
| 133 | BOARD_MKBOOTIMG_ARGS:= --kernel_offset $(BOARD_KERNEL_OFFSET) --ramdisk_offset $(BOARD_RAMDISK_OFFSET) --tags_offset $(BOARD_KERNEL_TAGS_OFFSET) |
| 134 | |
Bharath | df173dd | 2020-10-23 12:27:49 +0530 | [diff] [blame] | 135 | # Malloc |
| 136 | MALLOC_SVELTE := true |
| 137 | |
Bharath | d332e56 | 2020-12-07 10:21:16 +0530 | [diff] [blame] | 138 | # QCOM hardware |
| 139 | BOARD_USES_QCOM_HARDWARE := true |
| 140 | |
| 141 | # QCOM Power |
| 142 | TARGET_HAS_LEGACY_POWER_STATS := true |
| 143 | TARGET_HAS_NO_WLAN_STATS := true |
Bharath | d332e56 | 2020-12-07 10:21:16 +0530 | [diff] [blame] | 144 | |
| 145 | #SELinux |
| 146 | BOARD_SEPOLICY_DIRS += \ |
| 147 | device/fairphone/FP2/sepolicy |
| 148 | |
Arvind Singh | 469de6f | 2020-02-19 11:02:33 +0530 | [diff] [blame] | 149 | # WiFi |
| 150 | BOARD_HAS_QCOM_WLAN := true |
| 151 | BOARD_HOSTAPD_DRIVER := NL80211 |
| 152 | BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_qcwcn |
| 153 | BOARD_WLAN_DEVICE := qcwcn |
| 154 | BOARD_WPA_SUPPLICANT_DRIVER := NL80211 |
| 155 | BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_qcwcn |
| 156 | PRODUCT_VENDOR_MOVE_ENABLED := true |
| 157 | TARGET_DISABLE_WCNSS_CONFIG_COPY := true |
| 158 | TARGET_USES_QCOM_WCNSS_QMI := true |
| 159 | WIFI_DRIVER_FW_PATH_AP := "ap" |
| 160 | WIFI_DRIVER_FW_PATH_STA := "sta" |
| 161 | WPA_SUPPLICANT_VERSION := VER_0_8_X |
| 162 | |
Arvind Singh | eae743a | 2020-02-20 16:21:14 +0530 | [diff] [blame] | 163 | # Workaround framework bluetooth dependency |
| 164 | BOARD_HAVE_BLUETOOTH_QCOM := true |
| 165 | BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/qcom/common |
Arvind Singh | eae743a | 2020-02-20 16:21:14 +0530 | [diff] [blame] | 166 | |
Vivekbalachandar M | 9776970 | 2020-02-12 15:52:43 +0530 | [diff] [blame] | 167 | TARGET_RELEASETOOLS_EXTENSIONS := device/fairphone/FP2 |
| 168 | |
Bharath | d332e56 | 2020-12-07 10:21:16 +0530 | [diff] [blame] | 169 | #Radio files |
| 170 | TARGET_ADD_RADIO_FILES := true |
Vivekbalachandar M | 9776970 | 2020-02-12 15:52:43 +0530 | [diff] [blame] | 171 | |
| 172 | # Vendor-specific definitions |
| 173 | include vendor/fairphone/fp2/BoardConfigVendor.mk |