merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 1 | # |
Michael Bestas | 4e1ba2f | 2024-05-12 06:38:39 +0300 | [diff] [blame] | 2 | # SPDX-FileCopyrightText: 2021-2024 The LineageOS Project |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 3 | # SPDX-License-Identifier: Apache-2.0 |
| 4 | # |
| 5 | |
Roger Ellis | 3a51508 | 2020-05-13 16:56:10 -0700 | [diff] [blame] | 6 | BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true |
Cole Faust | 7ff2b0e | 2023-10-03 15:51:10 -0700 | [diff] [blame] | 7 | BUILD_BROKEN_INCORRECT_PARTITION_IMAGES := true |
merothh | 750fa00 | 2022-01-02 19:42:51 +0530 | [diff] [blame] | 8 | |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 9 | DEVICE_PATH := device/fairphone/FP4 |
| 10 | |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 11 | # A/B |
| 12 | AB_OTA_UPDATER := true |
| 13 | |
| 14 | AB_OTA_PARTITIONS += \ |
| 15 | boot \ |
| 16 | dtbo \ |
| 17 | odm \ |
| 18 | product \ |
| 19 | recovery \ |
| 20 | system \ |
| 21 | system_ext \ |
| 22 | vbmeta \ |
| 23 | vbmeta_system \ |
| 24 | vendor |
| 25 | |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 26 | # Architecture |
| 27 | TARGET_ARCH := arm64 |
| 28 | TARGET_ARCH_VARIANT := armv8-a |
| 29 | TARGET_CPU_ABI := arm64-v8a |
| 30 | TARGET_CPU_ABI2 := |
| 31 | TARGET_CPU_VARIANT := cortex-a76 |
| 32 | |
| 33 | TARGET_2ND_ARCH := arm |
| 34 | TARGET_2ND_ARCH_VARIANT := armv8-a |
| 35 | TARGET_2ND_CPU_ABI := armeabi-v7a |
| 36 | TARGET_2ND_CPU_ABI2 := armeabi |
| 37 | TARGET_2ND_CPU_VARIANT := cortex-a76 |
| 38 | |
merothh | 750fa00 | 2022-01-02 19:42:51 +0530 | [diff] [blame] | 39 | # Audio |
| 40 | AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 41 | AUDIO_FEATURE_ENABLED_EXT_AMPLIFIER := true |
Rohit | 7737da6 | 2023-03-17 14:44:12 +0530 | [diff] [blame] | 42 | AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true |
merothh | 750fa00 | 2022-01-02 19:42:51 +0530 | [diff] [blame] | 43 | AUDIO_FEATURE_ENABLED_INSTANCE_ID := true |
Rohit | 7737da6 | 2023-03-17 14:44:12 +0530 | [diff] [blame] | 44 | AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true |
merothh | 750fa00 | 2022-01-02 19:42:51 +0530 | [diff] [blame] | 45 | AUDIO_FEATURE_ENABLED_SSR := true |
Rohit | 7737da6 | 2023-03-17 14:44:12 +0530 | [diff] [blame] | 46 | BOARD_SUPPORTS_SOUND_TRIGGER := true |
| 47 | BOARD_USES_ALSA_AUDIO := true |
merothh | 750fa00 | 2022-01-02 19:42:51 +0530 | [diff] [blame] | 48 | |
Michael Bestas | b08b3cc | 2022-02-16 21:47:07 +0200 | [diff] [blame] | 49 | # Bootloader |
| 50 | TARGET_BOOTLOADER_BOARD_NAME := FP4 |
| 51 | |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 52 | # Display |
Luofan Chen | 4fc24e5 | 2023-01-18 23:01:48 +0800 | [diff] [blame] | 53 | TARGET_GRALLOC_HANDLE_HAS_RESERVED_SIZE := true |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 54 | TARGET_SCREEN_DENSITY := 440 |
merothh | 7af51cb | 2022-01-02 20:14:21 +0530 | [diff] [blame] | 55 | TARGET_USES_DISPLAY_RENDER_INTENTS := true |
| 56 | TARGET_USES_GRALLOC4 := true |
| 57 | TARGET_USES_HWC2 := true |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 58 | |
merothh | 1b7e530 | 2022-01-03 00:41:34 +0530 | [diff] [blame] | 59 | # Filesystem |
| 60 | TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/config.fs |
| 61 | |
Michael Bestas | d870a48 | 2023-05-04 01:19:43 +0300 | [diff] [blame] | 62 | # GPS |
| 63 | BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default |
| 64 | LOC_HIDL_VERSION := 4.0 |
| 65 | |
merothh | 74ca26a | 2022-01-02 19:12:01 +0530 | [diff] [blame] | 66 | # HIDL |
| 67 | DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \ |
Michael Bestas | 82cb3f9 | 2024-05-12 08:11:39 +0300 | [diff] [blame^] | 68 | $(DEVICE_PATH)/device_framework_matrix.xml \ |
Bruno Martins | ca30f51 | 2022-04-05 10:34:38 +0100 | [diff] [blame] | 69 | hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml \ |
merothh | 74ca26a | 2022-01-02 19:12:01 +0530 | [diff] [blame] | 70 | vendor/lineage/config/device_framework_matrix.xml |
merothh | 74ca26a | 2022-01-02 19:12:01 +0530 | [diff] [blame] | 71 | DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/manifest.xml |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 72 | DEVICE_MATRIX_FILE := hardware/qcom-caf/common/compatibility_matrix.xml |
merothh | 74ca26a | 2022-01-02 19:12:01 +0530 | [diff] [blame] | 73 | |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 74 | # Kernel |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 75 | BOARD_BOOT_HEADER_VERSION := 2 |
| 76 | BOARD_KERNEL_BASE := 0x00000000 |
| 77 | BOARD_KERNEL_PAGESIZE := 4096 |
| 78 | BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION) |
| 79 | |
| 80 | BOARD_INCLUDE_DTB_IN_BOOTIMG := true |
Alexander Koskovich | 744125d | 2022-04-11 21:13:13 -0700 | [diff] [blame] | 81 | BOARD_KERNEL_CMDLINE := \ |
| 82 | androidboot.console=ttyMSM0 \ |
| 83 | androidboot.hardware=qcom \ |
| 84 | androidboot.memcg=1 \ |
| 85 | androidboot.usbcontroller=a600000.dwc3 \ |
| 86 | cgroup.memory=nokmem,nosocket \ |
| 87 | loop.max_part=7 \ |
| 88 | lpm_levels.sleep_disabled=1 \ |
| 89 | msm_rtb.filter=0x237 \ |
| 90 | service_locator.enable=1 \ |
Alexander Koskovich | 1da23c9 | 2022-04-26 21:18:08 -0700 | [diff] [blame] | 91 | swiotlb=2048 |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 92 | |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 93 | BOARD_KERNEL_IMAGE_NAME := Image |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 94 | BOARD_KERNEL_SEPARATED_DTBO := true |
Michael Bestas | df0ba19 | 2023-05-22 23:59:10 +0300 | [diff] [blame] | 95 | TARGET_KERNEL_CONFIG := vendor/lito-perf_defconfig vendor/debugfs.config vendor/fairphone/FP4.config |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 96 | TARGET_KERNEL_SOURCE := kernel/fairphone/sm7225 |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 97 | |
Erfan Abdi | dfd3663 | 2020-12-18 01:12:50 +0330 | [diff] [blame] | 98 | # Kernel modules - Audio |
| 99 | TARGET_MODULE_ALIASES += \ |
| 100 | adsp_loader_dlkm.ko:audio_adsp_loader.ko \ |
| 101 | apr_dlkm.ko:audio_apr.ko \ |
| 102 | bolero_cdc_dlkm.ko:audio_bolero_cdc.ko \ |
| 103 | hdmi_dlkm.ko:audio_hdmi.ko \ |
| 104 | machine_dlkm.ko:audio_machine_lito.ko \ |
| 105 | mbhc_dlkm.ko:audio_mbhc.ko \ |
| 106 | native_dlkm.ko:audio_native.ko \ |
| 107 | pinctrl_lpi_dlkm.ko:audio_pinctrl_lpi.ko \ |
| 108 | platform_dlkm.ko:audio_platform.ko \ |
| 109 | q6_dlkm.ko:audio_q6.ko \ |
| 110 | q6_notifier_dlkm.ko:audio_q6_notifier.ko \ |
| 111 | q6_pdr_dlkm.ko:audio_q6_pdr.ko \ |
| 112 | rx_macro_dlkm.ko:audio_rx_macro.ko \ |
| 113 | snd_event_dlkm.ko:audio_snd_event.ko \ |
| 114 | stub_dlkm.ko:audio_stub.ko \ |
| 115 | swr_ctrl_dlkm.ko:audio_swr_ctrl.ko \ |
| 116 | swr_dlkm.ko:audio_swr.ko \ |
| 117 | tx_macro_dlkm.ko:audio_tx_macro.ko \ |
| 118 | usf_dlkm.ko:audio_usf.ko \ |
| 119 | va_macro_dlkm.ko:audio_va_macro.ko \ |
| 120 | wcd937x_dlkm.ko:audio_wcd937x.ko \ |
| 121 | wcd937x_slave_dlkm.ko:audio_wcd937x_slave.ko \ |
| 122 | wcd938x_dlkm.ko:audio_wcd938x.ko \ |
| 123 | wcd938x_slave_dlkm.ko:audio_wcd938x_slave.ko \ |
| 124 | wcd9xxx_dlkm.ko:audio_wcd9xxx.ko \ |
| 125 | wcd_core_dlkm.ko:audio_wcd_core.ko \ |
| 126 | wsa881x_dlkm.ko:audio_wsa881x.ko \ |
| 127 | wsa883x_dlkm.ko:audio_wsa883x.ko \ |
| 128 | wsa_macro_dlkm.ko:audio_wsa_macro.ko |
| 129 | |
| 130 | # Kernel modules - WLAN |
| 131 | TARGET_MODULE_ALIASES += \ |
| 132 | wlan.ko:qca_cld3_wlan.ko |
| 133 | |
Hyejin Kim | 49e328f | 2015-03-06 14:49:37 +0900 | [diff] [blame] | 134 | # Media |
| 135 | TARGET_USES_ION := true |
| 136 | |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame] | 137 | # Metadata |
| 138 | BOARD_USES_METADATA_PARTITION := true |
| 139 | |
| 140 | # Partitions (Sizes) |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 141 | BOARD_FLASH_BLOCK_SIZE := 262144 # (BOARD_KERNEL_PAGESIZE * 64) |
| 142 | |
Michael Bestas | ccc3bbf | 2023-11-22 15:51:28 +0200 | [diff] [blame] | 143 | -include vendor/lineage/config/BoardConfigReservedSize.mk |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame] | 144 | BOARD_BOOTIMAGE_PARTITION_SIZE := 100663296 |
| 145 | BOARD_DTBOIMG_PARTITION_SIZE := 25165824 |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame] | 146 | BOARD_METADATAIMAGE_PARTITION_SIZE := 16777216 |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 147 | BOARD_RECOVERYIMAGE_PARTITION_SIZE := 100663296 |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame] | 148 | BOARD_SUPER_PARTITION_SIZE := 6442450944 |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 149 | |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame] | 150 | BOARD_SUPER_PARTITION_GROUPS := qti_dynamic_partitions |
| 151 | BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST := odm product system system_ext vendor |
| 152 | BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := 6438256640 |
| 153 | |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame] | 154 | # Partitions (Other) |
| 155 | BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 156 | BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4 |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame] | 157 | BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4 |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 158 | BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4 |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame] | 159 | BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 160 | TARGET_COPY_OUT_ODM := odm |
| 161 | TARGET_COPY_OUT_PRODUCT := product |
| 162 | TARGET_COPY_OUT_SYSTEM_EXT := system_ext |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 163 | TARGET_COPY_OUT_VENDOR := vendor |
| 164 | |
merothh | 750fa00 | 2022-01-02 19:42:51 +0530 | [diff] [blame] | 165 | # Platform |
| 166 | BOARD_USES_QCOM_HARDWARE := true |
| 167 | TARGET_BOARD_PLATFORM := lito |
| 168 | |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 169 | # Recovery |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 170 | BOARD_INCLUDE_RECOVERY_DTBO := true |
Michael Bestas | d492351 | 2024-05-10 02:57:20 +0300 | [diff] [blame] | 171 | TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/init/fstab.default |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 172 | TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888 |
| 173 | TARGET_RECOVERY_UI_MARGIN_HEIGHT := 50 |
| 174 | TARGET_RECOVERY_UI_MARGIN_WIDTH := 10 |
| 175 | TARGET_USERIMAGES_USE_EXT4 := true |
| 176 | TARGET_USERIMAGES_USE_F2FS := true |
merothh | acf1dfa | 2022-01-02 18:21:21 +0530 | [diff] [blame] | 177 | |
Sebastiano Barezzi | d70ce29 | 2021-02-10 22:08:35 +0100 | [diff] [blame] | 178 | # RIL |
| 179 | ENABLE_VENDOR_RIL_SERVICE := true |
| 180 | |
merothh | acf1dfa | 2022-01-02 18:21:21 +0530 | [diff] [blame] | 181 | # Security patch level |
Michael Bestas | 02554b2 | 2024-04-06 15:44:36 +0300 | [diff] [blame] | 182 | BOOT_SECURITY_PATCH := 2024-03-05 |
| 183 | VENDOR_SECURITY_PATCH := 2024-03-05 |
merothh | acf1dfa | 2022-01-02 18:21:21 +0530 | [diff] [blame] | 184 | |
merothh | 3b429fa | 2022-01-03 05:10:38 +0530 | [diff] [blame] | 185 | # SEPolicy |
Bruno Martins | 67b8549 | 2023-10-24 18:12:15 +0100 | [diff] [blame] | 186 | include device/qcom/sepolicy_vndr/SEPolicy.mk |
merothh | 3b429fa | 2022-01-03 05:10:38 +0530 | [diff] [blame] | 187 | BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor |
Rohit R Sekhar | 2fc323f | 2022-12-02 13:06:00 +0530 | [diff] [blame] | 188 | SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/private |
merothh | 3b429fa | 2022-01-03 05:10:38 +0530 | [diff] [blame] | 189 | |
merothh | beea433 | 2022-01-03 05:02:03 +0530 | [diff] [blame] | 190 | # Verified Boot |
| 191 | BOARD_AVB_ENABLE := true |
Rashed Abdel-Tawab | 95c87ca | 2019-09-07 11:13:09 -0700 | [diff] [blame] | 192 | BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3 |
merothh | beea433 | 2022-01-03 05:02:03 +0530 | [diff] [blame] | 193 | BOARD_AVB_VBMETA_SYSTEM := system system_ext product |
merothh | beea433 | 2022-01-03 05:02:03 +0530 | [diff] [blame] | 194 | BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048 |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 195 | BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem |
merothh | beea433 | 2022-01-03 05:02:03 +0530 | [diff] [blame] | 196 | BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) |
| 197 | BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 2 |
| 198 | |
Sebastiano Barezzi | fd6e1f8 | 2021-02-10 22:10:19 +0100 | [diff] [blame] | 199 | # Wifi |
| 200 | BOARD_WLAN_DEVICE := qcwcn |
| 201 | BOARD_HOSTAPD_DRIVER := NL80211 |
| 202 | BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 203 | BOARD_WPA_SUPPLICANT_DRIVER := $(BOARD_HOSTAPD_DRIVER) |
| 204 | BOARD_WPA_SUPPLICANT_PRIVATE_LIB := $(BOARD_HOSTAPD_PRIVATE_LIB) |
Mohammad Asaad Akram | 07f7ba3 | 2022-02-28 13:55:13 -0700 | [diff] [blame] | 205 | BOARD_WPA_SUPPLICANT_PRIVATE_LIB_EVENT := "ON" |
Sebastiano Barezzi | fd6e1f8 | 2021-02-10 22:10:19 +0100 | [diff] [blame] | 206 | WIFI_DRIVER_DEFAULT := qca_cld3 |
| 207 | WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan" |
| 208 | WIFI_DRIVER_STATE_OFF := "OFF" |
| 209 | WIFI_DRIVER_STATE_ON := "ON" |
Sebastiano Barezzi | fd6e1f8 | 2021-02-10 22:10:19 +0100 | [diff] [blame] | 210 | WIFI_HIDL_FEATURE_AWARE := true |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 211 | WIFI_HIDL_FEATURE_DUAL_INTERFACE := true |
Jimmy Chen | acd7fc3 | 2019-10-03 11:04:05 +0800 | [diff] [blame] | 212 | WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true |
Sebastiano Barezzi | fd6e1f8 | 2021-02-10 22:10:19 +0100 | [diff] [blame] | 213 | WPA_SUPPLICANT_VERSION := VER_0_8_X |
| 214 | |
merothh | acf1dfa | 2022-01-02 18:21:21 +0530 | [diff] [blame] | 215 | # Inherit the proprietary files |
| 216 | include vendor/fairphone/FP4/BoardConfigVendor.mk |