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 | |
Michael Bestas | 5191be3 | 2023-08-29 22:42:36 +0300 | [diff] [blame] | 6 | BUILD_BROKEN_DUP_RULES := true |
Roger Ellis | 3a51508 | 2020-05-13 16:56:10 -0700 | [diff] [blame] | 7 | BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true |
Cole Faust | 7ff2b0e | 2023-10-03 15:51:10 -0700 | [diff] [blame] | 8 | BUILD_BROKEN_INCORRECT_PARTITION_IMAGES := true |
merothh | 750fa00 | 2022-01-02 19:42:51 +0530 | [diff] [blame] | 9 | |
Michael Bestas | 1037453 | 2023-08-29 19:41:38 +0300 | [diff] [blame] | 10 | DEVICE_PATH := device/fairphone/FP5 |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 11 | |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 12 | # A/B |
| 13 | AB_OTA_UPDATER := true |
| 14 | |
| 15 | AB_OTA_PARTITIONS += \ |
| 16 | boot \ |
| 17 | dtbo \ |
| 18 | odm \ |
| 19 | product \ |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 20 | system \ |
| 21 | system_ext \ |
| 22 | vbmeta \ |
| 23 | vbmeta_system \ |
Michael Bestas | 99a5c71 | 2023-08-30 21:12:04 +0300 | [diff] [blame] | 24 | vendor \ |
| 25 | vendor_boot |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 26 | |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 27 | # Architecture |
| 28 | TARGET_ARCH := arm64 |
Adithya R | 87d22e1 | 2021-01-24 14:02:20 +0530 | [diff] [blame] | 29 | TARGET_ARCH_VARIANT := armv8-2a-dotprod |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 30 | TARGET_CPU_ABI := arm64-v8a |
| 31 | TARGET_CPU_ABI2 := |
| 32 | TARGET_CPU_VARIANT := cortex-a76 |
| 33 | |
| 34 | TARGET_2ND_ARCH := arm |
| 35 | TARGET_2ND_ARCH_VARIANT := armv8-a |
| 36 | TARGET_2ND_CPU_ABI := armeabi-v7a |
| 37 | TARGET_2ND_CPU_ABI2 := armeabi |
| 38 | TARGET_2ND_CPU_VARIANT := cortex-a76 |
| 39 | |
merothh | 750fa00 | 2022-01-02 19:42:51 +0530 | [diff] [blame] | 40 | # Audio |
| 41 | AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 42 | AUDIO_FEATURE_ENABLED_EXT_AMPLIFIER := true |
Rohit | 7737da6 | 2023-03-17 14:44:12 +0530 | [diff] [blame] | 43 | AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true |
Michael Bestas | e76ee35 | 2023-08-29 22:52:45 +0300 | [diff] [blame] | 44 | AUDIO_FEATURE_ENABLED_GKI := true |
merothh | 750fa00 | 2022-01-02 19:42:51 +0530 | [diff] [blame] | 45 | AUDIO_FEATURE_ENABLED_INSTANCE_ID := true |
Rohit | 7737da6 | 2023-03-17 14:44:12 +0530 | [diff] [blame] | 46 | AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true |
merothh | 750fa00 | 2022-01-02 19:42:51 +0530 | [diff] [blame] | 47 | AUDIO_FEATURE_ENABLED_SSR := true |
Michael Bestas | e76ee35 | 2023-08-29 22:52:45 +0300 | [diff] [blame] | 48 | AUDIO_FEATURE_ENABLED_SVA_MULTI_STAGE := true |
| 49 | BOARD_SUPPORTS_OPENSOURCE_STHAL := true |
Rohit | 7737da6 | 2023-03-17 14:44:12 +0530 | [diff] [blame] | 50 | BOARD_SUPPORTS_SOUND_TRIGGER := true |
| 51 | BOARD_USES_ALSA_AUDIO := true |
merothh | 750fa00 | 2022-01-02 19:42:51 +0530 | [diff] [blame] | 52 | |
Michael Bestas | b08b3cc | 2022-02-16 21:47:07 +0200 | [diff] [blame] | 53 | # Bootloader |
Michael Bestas | 1037453 | 2023-08-29 19:41:38 +0300 | [diff] [blame] | 54 | TARGET_BOOTLOADER_BOARD_NAME := FP5 |
Michael Bestas | b08b3cc | 2022-02-16 21:47:07 +0200 | [diff] [blame] | 55 | |
Rohit Sekhar | 7bd009a | 2023-09-19 15:51:14 +0530 | [diff] [blame] | 56 | # Camera |
| 57 | TARGET_CAMERA_OVERRIDE_FORMAT_FROM_RESERVED := true |
| 58 | |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 59 | # Display |
Luofan Chen | 4fc24e5 | 2023-01-18 23:01:48 +0800 | [diff] [blame] | 60 | TARGET_GRALLOC_HANDLE_HAS_RESERVED_SIZE := true |
Michael Bestas | 179da59 | 2023-08-30 21:14:32 +0300 | [diff] [blame] | 61 | TARGET_SCREEN_DENSITY := 480 |
merothh | 7af51cb | 2022-01-02 20:14:21 +0530 | [diff] [blame] | 62 | TARGET_USES_DISPLAY_RENDER_INTENTS := true |
| 63 | TARGET_USES_GRALLOC4 := true |
| 64 | TARGET_USES_HWC2 := true |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 65 | |
merothh | 1b7e530 | 2022-01-03 00:41:34 +0530 | [diff] [blame] | 66 | # Filesystem |
| 67 | TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/config.fs |
| 68 | |
Michael Bestas | d870a48 | 2023-05-04 01:19:43 +0300 | [diff] [blame] | 69 | # GPS |
| 70 | BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default |
| 71 | LOC_HIDL_VERSION := 4.0 |
| 72 | |
merothh | 74ca26a | 2022-01-02 19:12:01 +0530 | [diff] [blame] | 73 | # HIDL |
| 74 | DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \ |
Michael Bestas | 82cb3f9 | 2024-05-12 08:11:39 +0300 | [diff] [blame] | 75 | $(DEVICE_PATH)/device_framework_matrix.xml \ |
Bruno Martins | ca30f51 | 2022-04-05 10:34:38 +0100 | [diff] [blame] | 76 | hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml \ |
merothh | 74ca26a | 2022-01-02 19:12:01 +0530 | [diff] [blame] | 77 | vendor/lineage/config/device_framework_matrix.xml |
Michael Bestas | 502781b | 2023-08-30 14:18:49 +0300 | [diff] [blame] | 78 | DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/manifest_yupik.xml |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 79 | DEVICE_MATRIX_FILE := hardware/qcom-caf/common/compatibility_matrix.xml |
merothh | 74ca26a | 2022-01-02 19:12:01 +0530 | [diff] [blame] | 80 | |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 81 | # Kernel |
Michael Bestas | a43ccee | 2023-08-29 19:42:04 +0300 | [diff] [blame] | 82 | BOARD_BOOT_HEADER_VERSION := 3 |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 83 | BOARD_KERNEL_BASE := 0x00000000 |
| 84 | BOARD_KERNEL_PAGESIZE := 4096 |
| 85 | BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION) |
| 86 | |
| 87 | BOARD_INCLUDE_DTB_IN_BOOTIMG := true |
Alexander Koskovich | 744125d | 2022-04-11 21:13:13 -0700 | [diff] [blame] | 88 | BOARD_KERNEL_CMDLINE := \ |
| 89 | androidboot.console=ttyMSM0 \ |
| 90 | androidboot.hardware=qcom \ |
| 91 | androidboot.memcg=1 \ |
| 92 | androidboot.usbcontroller=a600000.dwc3 \ |
| 93 | cgroup.memory=nokmem,nosocket \ |
Michael Bestas | a43ccee | 2023-08-29 19:42:04 +0300 | [diff] [blame] | 94 | ip6table_raw.raw_before_defrag=1 \ |
| 95 | iptable_raw.raw_before_defrag=1 \ |
Alexander Koskovich | 744125d | 2022-04-11 21:13:13 -0700 | [diff] [blame] | 96 | loop.max_part=7 \ |
| 97 | lpm_levels.sleep_disabled=1 \ |
| 98 | msm_rtb.filter=0x237 \ |
Michael Bestas | a43ccee | 2023-08-29 19:42:04 +0300 | [diff] [blame] | 99 | pcie_ports=compat \ |
Alexander Koskovich | 744125d | 2022-04-11 21:13:13 -0700 | [diff] [blame] | 100 | service_locator.enable=1 \ |
Michael Bestas | a43ccee | 2023-08-29 19:42:04 +0300 | [diff] [blame] | 101 | swiotlb=0 |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 102 | |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 103 | BOARD_KERNEL_IMAGE_NAME := Image |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 104 | BOARD_KERNEL_SEPARATED_DTBO := true |
Michael Bestas | a43ccee | 2023-08-29 19:42:04 +0300 | [diff] [blame] | 105 | TARGET_KERNEL_CONFIG := vendor/fp5-qgki_defconfig vendor/fp5.config |
| 106 | TARGET_KERNEL_NO_GCC := true |
| 107 | TARGET_KERNEL_SOURCE := kernel/fairphone/qcm6490 |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 108 | |
Michael Bestas | 390c82c | 2023-08-30 03:13:59 +0300 | [diff] [blame] | 109 | # Kernel modules |
Mohammed Siddiq | b04dc9d | 2021-02-12 23:02:52 +0530 | [diff] [blame] | 110 | BOARD_VENDOR_KERNEL_MODULES_BLOCKLIST_FILE := $(DEVICE_PATH)/modules.blocklist |
Michael Bestas | 2abd995 | 2024-05-12 21:09:20 +0300 | [diff] [blame] | 111 | BOARD_VENDOR_KERNEL_MODULES_LOAD := $(strip $(shell cat $(DEVICE_PATH)/modules.load)) |
Michael Bestas | 58712e7 | 2023-09-04 22:48:18 +0300 | [diff] [blame] | 112 | BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD := $(strip $(shell cat $(DEVICE_PATH)/modules.load.recovery)) |
| 113 | BOOT_KERNEL_MODULES := $(BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD) |
Michael Bestas | 390c82c | 2023-08-30 03:13:59 +0300 | [diff] [blame] | 114 | TARGET_MODULE_ALIASES += wlan.ko:qca_cld3_wlan.ko |
Erfan Abdi | dfd3663 | 2020-12-18 01:12:50 +0330 | [diff] [blame] | 115 | |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame] | 116 | # Metadata |
| 117 | BOARD_USES_METADATA_PARTITION := true |
| 118 | |
| 119 | # Partitions (Sizes) |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 120 | BOARD_FLASH_BLOCK_SIZE := 262144 # (BOARD_KERNEL_PAGESIZE * 64) |
| 121 | |
Michael Bestas | ccc3bbf | 2023-11-22 15:51:28 +0200 | [diff] [blame] | 122 | -include vendor/lineage/config/BoardConfigReservedSize.mk |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame] | 123 | BOARD_BOOTIMAGE_PARTITION_SIZE := 100663296 |
| 124 | BOARD_DTBOIMG_PARTITION_SIZE := 25165824 |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame] | 125 | BOARD_METADATAIMAGE_PARTITION_SIZE := 16777216 |
Michael Bestas | 99a5c71 | 2023-08-30 21:12:04 +0300 | [diff] [blame] | 126 | BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 100663296 |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame] | 127 | BOARD_SUPER_PARTITION_SIZE := 6442450944 |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 128 | |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame] | 129 | BOARD_SUPER_PARTITION_GROUPS := qti_dynamic_partitions |
| 130 | BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST := odm product system system_ext vendor |
| 131 | BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := 6438256640 |
| 132 | |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame] | 133 | # Partitions (Other) |
| 134 | BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 135 | BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4 |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame] | 136 | BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4 |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 137 | BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4 |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame] | 138 | BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 139 | TARGET_COPY_OUT_ODM := odm |
| 140 | TARGET_COPY_OUT_PRODUCT := product |
| 141 | TARGET_COPY_OUT_SYSTEM_EXT := system_ext |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 142 | TARGET_COPY_OUT_VENDOR := vendor |
| 143 | |
merothh | 750fa00 | 2022-01-02 19:42:51 +0530 | [diff] [blame] | 144 | # Platform |
| 145 | BOARD_USES_QCOM_HARDWARE := true |
Michael Bestas | 7daa2d4 | 2023-08-29 20:12:57 +0300 | [diff] [blame] | 146 | TARGET_BOARD_PLATFORM := lahaina |
merothh | 750fa00 | 2022-01-02 19:42:51 +0530 | [diff] [blame] | 147 | |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 148 | # Recovery |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 149 | BOARD_INCLUDE_RECOVERY_DTBO := true |
Alexander Koskovich | ea31804 | 2022-02-06 23:53:22 -0700 | [diff] [blame] | 150 | BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT := true |
Michael Bestas | d492351 | 2024-05-10 02:57:20 +0300 | [diff] [blame] | 151 | TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/init/fstab.default |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 152 | TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888 |
Michael Bestas | 3833182 | 2023-08-30 21:52:11 +0300 | [diff] [blame] | 153 | TARGET_RECOVERY_UI_MARGIN_HEIGHT := 110 |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 154 | TARGET_RECOVERY_UI_MARGIN_WIDTH := 10 |
| 155 | TARGET_USERIMAGES_USE_EXT4 := true |
| 156 | TARGET_USERIMAGES_USE_F2FS := true |
merothh | acf1dfa | 2022-01-02 18:21:21 +0530 | [diff] [blame] | 157 | |
Sebastiano Barezzi | d70ce29 | 2021-02-10 22:08:35 +0100 | [diff] [blame] | 158 | # RIL |
| 159 | ENABLE_VENDOR_RIL_SERVICE := true |
| 160 | |
merothh | acf1dfa | 2022-01-02 18:21:21 +0530 | [diff] [blame] | 161 | # Security patch level |
Michael Bestas | 495167c | 2024-05-17 01:59:15 +0300 | [diff] [blame] | 162 | BOOT_SECURITY_PATCH := 2024-04-05 |
| 163 | VENDOR_SECURITY_PATCH := 2024-04-05 |
merothh | acf1dfa | 2022-01-02 18:21:21 +0530 | [diff] [blame] | 164 | |
merothh | 3b429fa | 2022-01-03 05:10:38 +0530 | [diff] [blame] | 165 | # SEPolicy |
Bruno Martins | 67b8549 | 2023-10-24 18:12:15 +0100 | [diff] [blame] | 166 | include device/qcom/sepolicy_vndr/SEPolicy.mk |
merothh | 3b429fa | 2022-01-03 05:10:38 +0530 | [diff] [blame] | 167 | BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor |
| 168 | |
merothh | beea433 | 2022-01-03 05:02:03 +0530 | [diff] [blame] | 169 | # Verified Boot |
Michael Bestas | 7881721 | 2024-05-18 11:00:46 +0300 | [diff] [blame^] | 170 | STOCK_SECURITY_PATCH := 2024-04-05 # Latest stock update available |
merothh | beea433 | 2022-01-03 05:02:03 +0530 | [diff] [blame] | 171 | BOARD_AVB_ENABLE := true |
Rashed Abdel-Tawab | 95c87ca | 2019-09-07 11:13:09 -0700 | [diff] [blame] | 172 | BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3 |
Michael Bestas | f6ee591 | 2023-08-30 21:48:37 +0300 | [diff] [blame] | 173 | BOARD_AVB_ALGORITHM := SHA256_RSA4096 |
merothh | beea433 | 2022-01-03 05:02:03 +0530 | [diff] [blame] | 174 | BOARD_AVB_VBMETA_SYSTEM := system system_ext product |
Michael Bestas | f6ee591 | 2023-08-30 21:48:37 +0300 | [diff] [blame] | 175 | BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA4096 |
| 176 | BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem |
Michael Bestas | 7881721 | 2024-05-18 11:00:46 +0300 | [diff] [blame^] | 177 | BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(shell date -d 'TZ="GMT" $(STOCK_SECURITY_PATCH)' +%s) |
merothh | beea433 | 2022-01-03 05:02:03 +0530 | [diff] [blame] | 178 | BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 2 |
| 179 | |
Sebastiano Barezzi | fd6e1f8 | 2021-02-10 22:10:19 +0100 | [diff] [blame] | 180 | # Wifi |
| 181 | BOARD_WLAN_DEVICE := qcwcn |
| 182 | BOARD_HOSTAPD_DRIVER := NL80211 |
| 183 | BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 184 | BOARD_WPA_SUPPLICANT_DRIVER := $(BOARD_HOSTAPD_DRIVER) |
| 185 | BOARD_WPA_SUPPLICANT_PRIVATE_LIB := $(BOARD_HOSTAPD_PRIVATE_LIB) |
Mohammad Asaad Akram | 07f7ba3 | 2022-02-28 13:55:13 -0700 | [diff] [blame] | 186 | BOARD_WPA_SUPPLICANT_PRIVATE_LIB_EVENT := "ON" |
Peng Xu | 80b1cc1 | 2017-02-07 15:16:52 -0800 | [diff] [blame] | 187 | CONFIG_IEEE80211AX := true |
Sebastiano Barezzi | fd6e1f8 | 2021-02-10 22:10:19 +0100 | [diff] [blame] | 188 | WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan" |
| 189 | WIFI_DRIVER_STATE_OFF := "OFF" |
| 190 | WIFI_DRIVER_STATE_ON := "ON" |
Sebastiano Barezzi | fd6e1f8 | 2021-02-10 22:10:19 +0100 | [diff] [blame] | 191 | WIFI_HIDL_FEATURE_AWARE := true |
Michael Bestas | 70190bb | 2024-05-12 08:00:29 +0300 | [diff] [blame] | 192 | WIFI_HIDL_FEATURE_DUAL_INTERFACE := true |
Jimmy Chen | acd7fc3 | 2019-10-03 11:04:05 +0800 | [diff] [blame] | 193 | WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true |
Sebastiano Barezzi | fd6e1f8 | 2021-02-10 22:10:19 +0100 | [diff] [blame] | 194 | WPA_SUPPLICANT_VERSION := VER_0_8_X |
| 195 | |
merothh | acf1dfa | 2022-01-02 18:21:21 +0530 | [diff] [blame] | 196 | # Inherit the proprietary files |
Michael Bestas | 1037453 | 2023-08-29 19:41:38 +0300 | [diff] [blame] | 197 | include vendor/fairphone/FP5/BoardConfigVendor.mk |