merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2021 The LineageOS Project |
| 3 | # |
| 4 | # SPDX-License-Identifier: Apache-2.0 |
| 5 | # |
| 6 | |
merothh | 750fa00 | 2022-01-02 19:42:51 +0530 | [diff] [blame] | 7 | BUILD_BROKEN_DUP_RULES := true |
| 8 | |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 9 | BOARD_VENDOR := fairphone |
| 10 | DEVICE_PATH := device/fairphone/FP4 |
| 11 | |
Luca Stefani | 82ac435 | 2019-09-12 23:47:56 +0200 | [diff] [blame] | 12 | # APEX |
| 13 | DEXPREOPT_GENERATE_APEX_IMAGE := true |
| 14 | |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 15 | # Architecture |
| 16 | TARGET_ARCH := arm64 |
| 17 | TARGET_ARCH_VARIANT := armv8-a |
| 18 | TARGET_CPU_ABI := arm64-v8a |
| 19 | TARGET_CPU_ABI2 := |
| 20 | TARGET_CPU_VARIANT := cortex-a76 |
| 21 | |
| 22 | TARGET_2ND_ARCH := arm |
| 23 | TARGET_2ND_ARCH_VARIANT := armv8-a |
| 24 | TARGET_2ND_CPU_ABI := armeabi-v7a |
| 25 | TARGET_2ND_CPU_ABI2 := armeabi |
| 26 | TARGET_2ND_CPU_VARIANT := cortex-a76 |
| 27 | |
| 28 | # Assert |
| 29 | TARGET_OTA_ASSERT_DEVICE := FP4 |
| 30 | |
| 31 | # A/B |
| 32 | AB_OTA_UPDATER := true |
| 33 | AB_OTA_PARTITIONS += \ |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame^] | 34 | boot \ |
| 35 | dtbo \ |
| 36 | odm \ |
| 37 | product \ |
| 38 | recovery \ |
| 39 | system \ |
| 40 | system_ext \ |
| 41 | vbmeta \ |
| 42 | vbmeta_system \ |
| 43 | vendor |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 44 | |
merothh | 750fa00 | 2022-01-02 19:42:51 +0530 | [diff] [blame] | 45 | # Audio |
| 46 | AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true |
| 47 | AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true |
| 48 | AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true |
| 49 | AUDIO_FEATURE_ENABLED_HDMI_SPK := true |
| 50 | AUDIO_FEATURE_ENABLED_INSTANCE_ID := true |
| 51 | AUDIO_FEATURE_ENABLED_SSR := true |
| 52 | AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true |
| 53 | USE_CUSTOM_AUDIO_POLICY := 1 |
| 54 | |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 55 | # Binder API version |
| 56 | TARGET_USES_64_BIT_BINDER := true |
| 57 | |
merothh | 750fa00 | 2022-01-02 19:42:51 +0530 | [diff] [blame] | 58 | # Bluetooth |
| 59 | BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(DEVICE_PATH)/bluetooth/include |
| 60 | TARGET_USE_QTI_BT_STACK := true |
| 61 | |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 62 | # Display |
merothh | 7af51cb | 2022-01-02 20:14:21 +0530 | [diff] [blame] | 63 | MAX_VIRTUAL_DISPLAY_DIMENSION := 4096 |
| 64 | NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3 |
| 65 | TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS := true |
| 66 | TARGET_HAS_HDR_DISPLAY := true |
| 67 | TARGET_HAS_WIDE_COLOR_DISPLAY := true |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 68 | TARGET_SCREEN_DENSITY := 440 |
merothh | 7af51cb | 2022-01-02 20:14:21 +0530 | [diff] [blame] | 69 | TARGET_USES_DISPLAY_RENDER_INTENTS := true |
| 70 | TARGET_USES_GRALLOC4 := true |
| 71 | TARGET_USES_HWC2 := true |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 72 | |
Sebastiano Barezzi | 2789dea | 2021-02-10 22:01:11 +0100 | [diff] [blame] | 73 | # DRM |
| 74 | TARGET_ENABLE_MEDIADRM_64 := true |
| 75 | |
merothh | 1b7e530 | 2022-01-03 00:41:34 +0530 | [diff] [blame] | 76 | # Filesystem |
| 77 | TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/config.fs |
| 78 | |
merothh | 74ca26a | 2022-01-02 19:12:01 +0530 | [diff] [blame] | 79 | # HIDL |
| 80 | DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \ |
| 81 | $(DEVICE_PATH)/framework_compatibility_matrix.xml \ |
| 82 | vendor/lineage/config/device_framework_matrix.xml |
| 83 | DEVICE_MATRIX_FILE := $(DEVICE_PATH)/compatibility_matrix.xml |
| 84 | DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/manifest.xml |
| 85 | ODM_MANIFEST_FILES := $(DEVICE_PATH)/manifest-qva.xml |
| 86 | |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 87 | # Kernel |
| 88 | BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom androidboot.console=ttyMSM0 androidboot.memcg=1 lpm_levels.sleep_disabled=1 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 service_locator.enable=1 androidboot.usbcontroller=a600000.dwc3 swiotlb=2048 cgroup.memory=nokmem,nosocket loop.max_part=7 |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 89 | BOARD_INCLUDE_DTB_IN_BOOTIMG := true |
| 90 | BOARD_INCLUDE_RECOVERY_DTBO := true |
| 91 | BOARD_KERNEL_SEPARATED_DTBO := true |
| 92 | BOARD_BOOTIMG_HEADER_VERSION := 2 |
| 93 | BOARD_KERNEL_BASE := 0x00000000 |
| 94 | BOARD_KERNEL_PAGESIZE := 4096 |
| 95 | BOARD_FLASH_BLOCK_SIZE := 262144 # (BOARD_KERNEL_PAGESIZE * 64) |
| 96 | BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOTIMG_HEADER_VERSION) |
| 97 | BOARD_KERNEL_IMAGE_NAME := Image |
| 98 | TARGET_KERNEL_ARCH := arm64 |
| 99 | TARGET_KERNEL_ADDITIONAL_FLAGS := DTC_EXT=$(shell pwd)/prebuilts/misc/linux-x86/dtc/dtc |
| 100 | TARGET_KERNEL_CLANG_COMPILE := true |
| 101 | TARGET_KERNEL_SOURCE := kernel/fairphone/FP4 |
| 102 | TARGET_KERNEL_CONFIG := lineage_FP4_defconfig |
| 103 | |
Erfan Abdi | dfd3663 | 2020-12-18 01:12:50 +0330 | [diff] [blame] | 104 | # Kernel modules - Audio |
| 105 | TARGET_MODULE_ALIASES += \ |
| 106 | adsp_loader_dlkm.ko:audio_adsp_loader.ko \ |
| 107 | apr_dlkm.ko:audio_apr.ko \ |
| 108 | bolero_cdc_dlkm.ko:audio_bolero_cdc.ko \ |
| 109 | hdmi_dlkm.ko:audio_hdmi.ko \ |
| 110 | machine_dlkm.ko:audio_machine_lito.ko \ |
| 111 | mbhc_dlkm.ko:audio_mbhc.ko \ |
| 112 | native_dlkm.ko:audio_native.ko \ |
| 113 | pinctrl_lpi_dlkm.ko:audio_pinctrl_lpi.ko \ |
| 114 | platform_dlkm.ko:audio_platform.ko \ |
| 115 | q6_dlkm.ko:audio_q6.ko \ |
| 116 | q6_notifier_dlkm.ko:audio_q6_notifier.ko \ |
| 117 | q6_pdr_dlkm.ko:audio_q6_pdr.ko \ |
| 118 | rx_macro_dlkm.ko:audio_rx_macro.ko \ |
| 119 | snd_event_dlkm.ko:audio_snd_event.ko \ |
| 120 | stub_dlkm.ko:audio_stub.ko \ |
| 121 | swr_ctrl_dlkm.ko:audio_swr_ctrl.ko \ |
| 122 | swr_dlkm.ko:audio_swr.ko \ |
| 123 | tx_macro_dlkm.ko:audio_tx_macro.ko \ |
| 124 | usf_dlkm.ko:audio_usf.ko \ |
| 125 | va_macro_dlkm.ko:audio_va_macro.ko \ |
| 126 | wcd937x_dlkm.ko:audio_wcd937x.ko \ |
| 127 | wcd937x_slave_dlkm.ko:audio_wcd937x_slave.ko \ |
| 128 | wcd938x_dlkm.ko:audio_wcd938x.ko \ |
| 129 | wcd938x_slave_dlkm.ko:audio_wcd938x_slave.ko \ |
| 130 | wcd9xxx_dlkm.ko:audio_wcd9xxx.ko \ |
| 131 | wcd_core_dlkm.ko:audio_wcd_core.ko \ |
| 132 | wsa881x_dlkm.ko:audio_wsa881x.ko \ |
| 133 | wsa883x_dlkm.ko:audio_wsa883x.ko \ |
| 134 | wsa_macro_dlkm.ko:audio_wsa_macro.ko |
| 135 | |
| 136 | # Kernel modules - WLAN |
| 137 | TARGET_MODULE_ALIASES += \ |
| 138 | wlan.ko:qca_cld3_wlan.ko |
| 139 | |
Hyejin Kim | 49e328f | 2015-03-06 14:49:37 +0900 | [diff] [blame] | 140 | # Media |
| 141 | TARGET_USES_ION := true |
| 142 | |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame^] | 143 | # Metadata |
| 144 | BOARD_USES_METADATA_PARTITION := true |
| 145 | |
| 146 | # Partitions (Sizes) |
| 147 | BOARD_BOOTIMAGE_PARTITION_SIZE := 100663296 |
| 148 | BOARD_DTBOIMG_PARTITION_SIZE := 25165824 |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 149 | BOARD_RECOVERYIMAGE_PARTITION_SIZE := 100663296 |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame^] | 150 | BOARD_METADATAIMAGE_PARTITION_SIZE := 16777216 |
| 151 | BOARD_SUPER_PARTITION_SIZE := 6442450944 |
| 152 | BOARD_SUPER_PARTITION_GROUPS := qti_dynamic_partitions |
| 153 | BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST := odm product system system_ext vendor |
| 154 | BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := 6438256640 |
| 155 | |
| 156 | BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE:= 236870912 |
| 157 | BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE:= 236870912 |
| 158 | BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE:= 236870912 |
| 159 | BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE:= 236870912 |
| 160 | BOARD_ODMIMAGE_PARTITION_RESERVED_SIZE:= 236870912 |
| 161 | BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE:= 236870912 |
| 162 | BOARD_RECOVERYIMAGE_PARTITION_SIZE := 100663296 |
| 163 | |
| 164 | # Partitions (Other) |
| 165 | BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 166 | BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 167 | BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 168 | BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 169 | BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 170 | TARGET_COPY_OUT_ODM := odm |
| 171 | TARGET_COPY_OUT_PRODUCT := product |
| 172 | TARGET_COPY_OUT_SYSTEM_EXT := system_ext |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 173 | TARGET_COPY_OUT_VENDOR := vendor |
| 174 | |
merothh | 750fa00 | 2022-01-02 19:42:51 +0530 | [diff] [blame] | 175 | # Platform |
| 176 | BOARD_USES_QCOM_HARDWARE := true |
| 177 | TARGET_BOARD_PLATFORM := lito |
| 178 | |
merothh | 397bd7e | 2022-01-03 01:21:55 +0530 | [diff] [blame] | 179 | # Properties |
| 180 | TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop |
| 181 | TARGET_PRODUCT_PROP += $(DEVICE_PATH)/product.prop |
| 182 | TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop |
| 183 | TARGET_ODM_PROP += $(DEVICE_PATH)/odm.prop |
| 184 | |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 185 | # Recovery |
| 186 | TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/etc/fstab.default |
| 187 | TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888 |
| 188 | TARGET_RECOVERY_UI_MARGIN_HEIGHT := 50 |
| 189 | TARGET_RECOVERY_UI_MARGIN_WIDTH := 10 |
| 190 | TARGET_USERIMAGES_USE_EXT4 := true |
| 191 | TARGET_USERIMAGES_USE_F2FS := true |
merothh | acf1dfa | 2022-01-02 18:21:21 +0530 | [diff] [blame] | 192 | |
Sebastiano Barezzi | d70ce29 | 2021-02-10 22:08:35 +0100 | [diff] [blame] | 193 | # RIL |
| 194 | ENABLE_VENDOR_RIL_SERVICE := true |
| 195 | |
merothh | acf1dfa | 2022-01-02 18:21:21 +0530 | [diff] [blame] | 196 | # Security patch level |
| 197 | VENDOR_SECURITY_PATCH := 2021-11-05 |
| 198 | |
merothh | 3b429fa | 2022-01-03 05:10:38 +0530 | [diff] [blame] | 199 | # SEPolicy |
| 200 | include device/qcom/sepolicy_vndr/SEPolicy.mk |
| 201 | BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor |
| 202 | |
merothh | beea433 | 2022-01-03 05:02:03 +0530 | [diff] [blame] | 203 | # Verified Boot |
| 204 | BOARD_AVB_ENABLE := true |
| 205 | BOARD_AVB_VBMETA_SYSTEM := system system_ext product |
| 206 | BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem |
| 207 | BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048 |
| 208 | BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) |
| 209 | BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 2 |
| 210 | |
Sebastiano Barezzi | fd6e1f8 | 2021-02-10 22:10:19 +0100 | [diff] [blame] | 211 | # Wifi |
| 212 | BOARD_WLAN_DEVICE := qcwcn |
| 213 | BOARD_HOSTAPD_DRIVER := NL80211 |
| 214 | BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) |
| 215 | BOARD_WPA_SUPPLICANT_DRIVER := NL80211 |
| 216 | BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) |
| 217 | WIFI_DRIVER_DEFAULT := qca_cld3 |
| 218 | WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan" |
| 219 | WIFI_DRIVER_STATE_OFF := "OFF" |
| 220 | WIFI_DRIVER_STATE_ON := "ON" |
| 221 | WIFI_HIDL_FEATURE_DUAL_INTERFACE := true |
| 222 | WIFI_HIDL_FEATURE_AWARE := true |
| 223 | WPA_SUPPLICANT_VERSION := VER_0_8_X |
| 224 | |
merothh | acf1dfa | 2022-01-02 18:21:21 +0530 | [diff] [blame] | 225 | # Inherit the proprietary files |
| 226 | include vendor/fairphone/FP4/BoardConfigVendor.mk |