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 |
Roger Ellis | 3a51508 | 2020-05-13 16:56:10 -0700 | [diff] [blame] | 8 | BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true |
merothh | 750fa00 | 2022-01-02 19:42:51 +0530 | [diff] [blame] | 9 | |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 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 | |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 28 | # A/B |
| 29 | AB_OTA_UPDATER := true |
| 30 | AB_OTA_PARTITIONS += \ |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame] | 31 | boot \ |
| 32 | dtbo \ |
| 33 | odm \ |
| 34 | product \ |
| 35 | recovery \ |
| 36 | system \ |
| 37 | system_ext \ |
| 38 | vbmeta \ |
| 39 | vbmeta_system \ |
| 40 | vendor |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 41 | |
merothh | 750fa00 | 2022-01-02 19:42:51 +0530 | [diff] [blame] | 42 | # Audio |
| 43 | AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true |
merothh | 750fa00 | 2022-01-02 19:42:51 +0530 | [diff] [blame] | 44 | AUDIO_FEATURE_ENABLED_INSTANCE_ID := true |
| 45 | AUDIO_FEATURE_ENABLED_SSR := true |
merothh | 750fa00 | 2022-01-02 19:42:51 +0530 | [diff] [blame] | 46 | |
Michael Bestas | b08b3cc | 2022-02-16 21:47:07 +0200 | [diff] [blame] | 47 | # Bootloader |
| 48 | TARGET_BOOTLOADER_BOARD_NAME := FP4 |
| 49 | |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 50 | # Display |
| 51 | TARGET_SCREEN_DENSITY := 440 |
merothh | 7af51cb | 2022-01-02 20:14:21 +0530 | [diff] [blame] | 52 | TARGET_USES_DISPLAY_RENDER_INTENTS := true |
| 53 | TARGET_USES_GRALLOC4 := true |
| 54 | TARGET_USES_HWC2 := true |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 55 | |
merothh | 1b7e530 | 2022-01-03 00:41:34 +0530 | [diff] [blame] | 56 | # Filesystem |
| 57 | TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/config.fs |
| 58 | |
merothh | 74ca26a | 2022-01-02 19:12:01 +0530 | [diff] [blame] | 59 | # HIDL |
| 60 | DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \ |
| 61 | $(DEVICE_PATH)/framework_compatibility_matrix.xml \ |
Bruno Martins | ca30f51 | 2022-04-05 10:34:38 +0100 | [diff] [blame] | 62 | hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml \ |
merothh | 74ca26a | 2022-01-02 19:12:01 +0530 | [diff] [blame] | 63 | vendor/lineage/config/device_framework_matrix.xml |
| 64 | DEVICE_MATRIX_FILE := $(DEVICE_PATH)/compatibility_matrix.xml |
| 65 | DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/manifest.xml |
| 66 | ODM_MANIFEST_FILES := $(DEVICE_PATH)/manifest-qva.xml |
| 67 | |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 68 | # Kernel |
Alexander Koskovich | 744125d | 2022-04-11 21:13:13 -0700 | [diff] [blame] | 69 | BOARD_KERNEL_CMDLINE := \ |
| 70 | androidboot.console=ttyMSM0 \ |
| 71 | androidboot.hardware=qcom \ |
| 72 | androidboot.memcg=1 \ |
| 73 | androidboot.usbcontroller=a600000.dwc3 \ |
| 74 | cgroup.memory=nokmem,nosocket \ |
| 75 | loop.max_part=7 \ |
| 76 | lpm_levels.sleep_disabled=1 \ |
| 77 | msm_rtb.filter=0x237 \ |
| 78 | service_locator.enable=1 \ |
| 79 | swiotlb=2048 \ |
| 80 | video=vfb:640x400,bpp=32,memsize=3072000 |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 81 | BOARD_INCLUDE_DTB_IN_BOOTIMG := true |
| 82 | BOARD_INCLUDE_RECOVERY_DTBO := true |
| 83 | BOARD_KERNEL_SEPARATED_DTBO := true |
Michael Bestas | ffd26a3 | 2022-08-04 21:16:52 +0300 | [diff] [blame] | 84 | BOARD_BOOT_HEADER_VERSION := 2 |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 85 | BOARD_KERNEL_BASE := 0x00000000 |
| 86 | BOARD_KERNEL_PAGESIZE := 4096 |
| 87 | BOARD_FLASH_BLOCK_SIZE := 262144 # (BOARD_KERNEL_PAGESIZE * 64) |
Michael Bestas | ffd26a3 | 2022-08-04 21:16:52 +0300 | [diff] [blame] | 88 | BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION) |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 89 | BOARD_KERNEL_IMAGE_NAME := Image |
Daniel Köster | 1ded3fc | 2022-01-23 10:24:04 +0100 | [diff] [blame] | 90 | TARGET_KERNEL_SOURCE := kernel/fairphone/sm7225 |
Michael Bestas | ba281bc | 2022-03-01 23:07:06 +0200 | [diff] [blame] | 91 | TARGET_KERNEL_CONFIG := FP4_defconfig |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 92 | |
Erfan Abdi | dfd3663 | 2020-12-18 01:12:50 +0330 | [diff] [blame] | 93 | # Kernel modules - Audio |
| 94 | TARGET_MODULE_ALIASES += \ |
| 95 | adsp_loader_dlkm.ko:audio_adsp_loader.ko \ |
| 96 | apr_dlkm.ko:audio_apr.ko \ |
| 97 | bolero_cdc_dlkm.ko:audio_bolero_cdc.ko \ |
| 98 | hdmi_dlkm.ko:audio_hdmi.ko \ |
| 99 | machine_dlkm.ko:audio_machine_lito.ko \ |
| 100 | mbhc_dlkm.ko:audio_mbhc.ko \ |
| 101 | native_dlkm.ko:audio_native.ko \ |
| 102 | pinctrl_lpi_dlkm.ko:audio_pinctrl_lpi.ko \ |
| 103 | platform_dlkm.ko:audio_platform.ko \ |
| 104 | q6_dlkm.ko:audio_q6.ko \ |
| 105 | q6_notifier_dlkm.ko:audio_q6_notifier.ko \ |
| 106 | q6_pdr_dlkm.ko:audio_q6_pdr.ko \ |
| 107 | rx_macro_dlkm.ko:audio_rx_macro.ko \ |
| 108 | snd_event_dlkm.ko:audio_snd_event.ko \ |
| 109 | stub_dlkm.ko:audio_stub.ko \ |
| 110 | swr_ctrl_dlkm.ko:audio_swr_ctrl.ko \ |
| 111 | swr_dlkm.ko:audio_swr.ko \ |
| 112 | tx_macro_dlkm.ko:audio_tx_macro.ko \ |
| 113 | usf_dlkm.ko:audio_usf.ko \ |
| 114 | va_macro_dlkm.ko:audio_va_macro.ko \ |
| 115 | wcd937x_dlkm.ko:audio_wcd937x.ko \ |
| 116 | wcd937x_slave_dlkm.ko:audio_wcd937x_slave.ko \ |
| 117 | wcd938x_dlkm.ko:audio_wcd938x.ko \ |
| 118 | wcd938x_slave_dlkm.ko:audio_wcd938x_slave.ko \ |
| 119 | wcd9xxx_dlkm.ko:audio_wcd9xxx.ko \ |
| 120 | wcd_core_dlkm.ko:audio_wcd_core.ko \ |
| 121 | wsa881x_dlkm.ko:audio_wsa881x.ko \ |
| 122 | wsa883x_dlkm.ko:audio_wsa883x.ko \ |
| 123 | wsa_macro_dlkm.ko:audio_wsa_macro.ko |
| 124 | |
| 125 | # Kernel modules - WLAN |
| 126 | TARGET_MODULE_ALIASES += \ |
| 127 | wlan.ko:qca_cld3_wlan.ko |
| 128 | |
Hyejin Kim | 49e328f | 2015-03-06 14:49:37 +0900 | [diff] [blame] | 129 | # Media |
| 130 | TARGET_USES_ION := true |
| 131 | |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame] | 132 | # Metadata |
| 133 | BOARD_USES_METADATA_PARTITION := true |
| 134 | |
| 135 | # Partitions (Sizes) |
| 136 | BOARD_BOOTIMAGE_PARTITION_SIZE := 100663296 |
| 137 | BOARD_DTBOIMG_PARTITION_SIZE := 25165824 |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 138 | BOARD_RECOVERYIMAGE_PARTITION_SIZE := 100663296 |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame] | 139 | BOARD_METADATAIMAGE_PARTITION_SIZE := 16777216 |
| 140 | BOARD_SUPER_PARTITION_SIZE := 6442450944 |
| 141 | BOARD_SUPER_PARTITION_GROUPS := qti_dynamic_partitions |
| 142 | BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST := odm product system system_ext vendor |
| 143 | BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := 6438256640 |
| 144 | |
Michael Bestas | e4aeb22 | 2022-02-26 23:24:28 +0200 | [diff] [blame] | 145 | # Reserve space for gapps install |
| 146 | ifneq ($(WITH_GMS),true) |
| 147 | BOARD_PRODUCTIMAGE_EXTFS_INODE_COUNT := -1 |
| 148 | BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE := 614400000 |
| 149 | BOARD_SYSTEMIMAGE_EXTFS_INODE_COUNT := -1 |
Michael Bestas | fbb924c | 2022-04-04 00:48:47 +0300 | [diff] [blame] | 150 | BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 3158932684 |
Michael Bestas | e4aeb22 | 2022-02-26 23:24:28 +0200 | [diff] [blame] | 151 | BOARD_SYSTEM_EXTIMAGE_EXTFS_INODE_COUNT := -1 |
| 152 | BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE := 92160000 |
| 153 | endif |
| 154 | BOARD_ODMIMAGE_PARTITION_RESERVED_SIZE:= 30720000 |
| 155 | BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE := 30720000 |
merothh | 726fc3a | 2022-01-03 04:59:57 +0530 | [diff] [blame] | 156 | |
| 157 | # Partitions (Other) |
| 158 | BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 159 | BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 160 | BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 161 | BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 162 | BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 163 | TARGET_COPY_OUT_ODM := odm |
| 164 | TARGET_COPY_OUT_PRODUCT := product |
| 165 | TARGET_COPY_OUT_SYSTEM_EXT := system_ext |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 166 | TARGET_COPY_OUT_VENDOR := vendor |
| 167 | |
merothh | 750fa00 | 2022-01-02 19:42:51 +0530 | [diff] [blame] | 168 | # Platform |
| 169 | BOARD_USES_QCOM_HARDWARE := true |
| 170 | TARGET_BOARD_PLATFORM := lito |
| 171 | |
merothh | 397bd7e | 2022-01-03 01:21:55 +0530 | [diff] [blame] | 172 | # Properties |
| 173 | TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop |
| 174 | TARGET_PRODUCT_PROP += $(DEVICE_PATH)/product.prop |
| 175 | TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop |
| 176 | TARGET_ODM_PROP += $(DEVICE_PATH)/odm.prop |
| 177 | |
merothh | 5485610 | 2021-11-04 12:07:41 +0530 | [diff] [blame] | 178 | # Recovery |
| 179 | TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/etc/fstab.default |
| 180 | TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888 |
| 181 | TARGET_RECOVERY_UI_MARGIN_HEIGHT := 50 |
| 182 | TARGET_RECOVERY_UI_MARGIN_WIDTH := 10 |
| 183 | TARGET_USERIMAGES_USE_EXT4 := true |
| 184 | TARGET_USERIMAGES_USE_F2FS := true |
merothh | acf1dfa | 2022-01-02 18:21:21 +0530 | [diff] [blame] | 185 | |
Sebastiano Barezzi | d70ce29 | 2021-02-10 22:08:35 +0100 | [diff] [blame] | 186 | # RIL |
| 187 | ENABLE_VENDOR_RIL_SERVICE := true |
| 188 | |
merothh | acf1dfa | 2022-01-02 18:21:21 +0530 | [diff] [blame] | 189 | # Security patch level |
Michael Bestas | bc10347 | 2023-02-14 23:36:05 +0200 | [diff] [blame] | 190 | BOOT_SECURITY_PATCH := 2023-01-05 |
| 191 | VENDOR_SECURITY_PATCH := 2023-01-05 |
merothh | acf1dfa | 2022-01-02 18:21:21 +0530 | [diff] [blame] | 192 | |
merothh | 3b429fa | 2022-01-03 05:10:38 +0530 | [diff] [blame] | 193 | # SEPolicy |
Edwin Moquete | c4467e6 | 2022-08-29 01:37:22 +0000 | [diff] [blame] | 194 | include device/qcom/sepolicy_vndr-legacy-um/SEPolicy.mk |
merothh | 3b429fa | 2022-01-03 05:10:38 +0530 | [diff] [blame] | 195 | BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor |
| 196 | |
merothh | beea433 | 2022-01-03 05:02:03 +0530 | [diff] [blame] | 197 | # Verified Boot |
| 198 | BOARD_AVB_ENABLE := true |
Rashed Abdel-Tawab | 95c87ca | 2019-09-07 11:13:09 -0700 | [diff] [blame] | 199 | BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3 |
merothh | beea433 | 2022-01-03 05:02:03 +0530 | [diff] [blame] | 200 | BOARD_AVB_VBMETA_SYSTEM := system system_ext product |
| 201 | BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem |
| 202 | BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048 |
| 203 | BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) |
| 204 | BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 2 |
| 205 | |
Sebastiano Barezzi | fd6e1f8 | 2021-02-10 22:10:19 +0100 | [diff] [blame] | 206 | # Wifi |
| 207 | BOARD_WLAN_DEVICE := qcwcn |
| 208 | BOARD_HOSTAPD_DRIVER := NL80211 |
| 209 | BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) |
| 210 | BOARD_WPA_SUPPLICANT_DRIVER := NL80211 |
| 211 | BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) |
Mohammad Asaad Akram | 07f7ba3 | 2022-02-28 13:55:13 -0700 | [diff] [blame] | 212 | BOARD_WPA_SUPPLICANT_PRIVATE_LIB_EVENT := "ON" |
Sebastiano Barezzi | fd6e1f8 | 2021-02-10 22:10:19 +0100 | [diff] [blame] | 213 | WIFI_DRIVER_DEFAULT := qca_cld3 |
| 214 | WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan" |
| 215 | WIFI_DRIVER_STATE_OFF := "OFF" |
| 216 | WIFI_DRIVER_STATE_ON := "ON" |
| 217 | WIFI_HIDL_FEATURE_DUAL_INTERFACE := true |
| 218 | WIFI_HIDL_FEATURE_AWARE := true |
Jimmy Chen | acd7fc3 | 2019-10-03 11:04:05 +0800 | [diff] [blame] | 219 | WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true |
Sebastiano Barezzi | fd6e1f8 | 2021-02-10 22:10:19 +0100 | [diff] [blame] | 220 | WPA_SUPPLICANT_VERSION := VER_0_8_X |
| 221 | |
merothh | acf1dfa | 2022-01-02 18:21:21 +0530 | [diff] [blame] | 222 | # Inherit the proprietary files |
| 223 | include vendor/fairphone/FP4/BoardConfigVendor.mk |