blob: 7070277dd306c3f4788ca0980d2e03d73bd7085e [file] [log] [blame]
merothh54856102021-11-04 12:07:41 +05301#
Michael Bestasb603e382023-02-02 17:41:45 +02002# Copyright (C) 2021-2023 The LineageOS Project
merothh54856102021-11-04 12:07:41 +05303#
4# SPDX-License-Identifier: Apache-2.0
5#
6
Roger Ellis3a515082020-05-13 16:56:10 -07007BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
Cole Faust7ff2b0e2023-10-03 15:51:10 -07008BUILD_BROKEN_INCORRECT_PARTITION_IMAGES := true
merothh750fa002022-01-02 19:42:51 +05309
merothh54856102021-11-04 12:07:41 +053010DEVICE_PATH := device/fairphone/FP4
11
Luca Stefani82ac4352019-09-12 23:47:56 +020012# APEX
13DEXPREOPT_GENERATE_APEX_IMAGE := true
14
merothh54856102021-11-04 12:07:41 +053015# Architecture
16TARGET_ARCH := arm64
17TARGET_ARCH_VARIANT := armv8-a
18TARGET_CPU_ABI := arm64-v8a
19TARGET_CPU_ABI2 :=
20TARGET_CPU_VARIANT := cortex-a76
21
22TARGET_2ND_ARCH := arm
23TARGET_2ND_ARCH_VARIANT := armv8-a
24TARGET_2ND_CPU_ABI := armeabi-v7a
25TARGET_2ND_CPU_ABI2 := armeabi
26TARGET_2ND_CPU_VARIANT := cortex-a76
27
merothh54856102021-11-04 12:07:41 +053028# A/B
29AB_OTA_UPDATER := true
30AB_OTA_PARTITIONS += \
merothh726fc3a2022-01-03 04:59:57 +053031 boot \
32 dtbo \
33 odm \
34 product \
35 recovery \
36 system \
37 system_ext \
38 vbmeta \
39 vbmeta_system \
40 vendor
merothh54856102021-11-04 12:07:41 +053041
merothh750fa002022-01-02 19:42:51 +053042# Audio
Rohit00be9f42023-03-20 16:00:09 +053043AUDIO_FEATURE_ENABLED_EXT_AMPLIFIER := true
merothh750fa002022-01-02 19:42:51 +053044AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true
Rohit7737da62023-03-17 14:44:12 +053045AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
merothh750fa002022-01-02 19:42:51 +053046AUDIO_FEATURE_ENABLED_INSTANCE_ID := true
Rohit7737da62023-03-17 14:44:12 +053047AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
merothh750fa002022-01-02 19:42:51 +053048AUDIO_FEATURE_ENABLED_SSR := true
Rohit7737da62023-03-17 14:44:12 +053049BOARD_SUPPORTS_SOUND_TRIGGER := true
50BOARD_USES_ALSA_AUDIO := true
merothh750fa002022-01-02 19:42:51 +053051
Michael Bestasb08b3cc2022-02-16 21:47:07 +020052# Bootloader
53TARGET_BOOTLOADER_BOARD_NAME := FP4
54
merothh54856102021-11-04 12:07:41 +053055# Display
Luofan Chen4fc24e52023-01-18 23:01:48 +080056TARGET_GRALLOC_HANDLE_HAS_RESERVED_SIZE := true
merothh54856102021-11-04 12:07:41 +053057TARGET_SCREEN_DENSITY := 440
merothh7af51cb2022-01-02 20:14:21 +053058TARGET_USES_DISPLAY_RENDER_INTENTS := true
59TARGET_USES_GRALLOC4 := true
60TARGET_USES_HWC2 := true
merothh54856102021-11-04 12:07:41 +053061
merothh1b7e5302022-01-03 00:41:34 +053062# Filesystem
63TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/config.fs
64
Michael Bestasd870a482023-05-04 01:19:43 +030065# GPS
66BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default
67LOC_HIDL_VERSION := 4.0
68
merothh74ca26a2022-01-02 19:12:01 +053069# HIDL
70DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
71 $(DEVICE_PATH)/framework_compatibility_matrix.xml \
Bruno Martinsca30f512022-04-05 10:34:38 +010072 hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml \
merothh74ca26a2022-01-02 19:12:01 +053073 vendor/lineage/config/device_framework_matrix.xml
Bruno Martinse0f3fed2024-02-08 17:05:32 +000074DEVICE_MATRIX_FILE := hardware/qcom-caf/common/compatibility_matrix.xml
merothh74ca26a2022-01-02 19:12:01 +053075DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/manifest.xml
76ODM_MANIFEST_FILES := $(DEVICE_PATH)/manifest-qva.xml
77
merothh54856102021-11-04 12:07:41 +053078# Kernel
Alexander Koskovich744125d2022-04-11 21:13:13 -070079BOARD_KERNEL_CMDLINE := \
80 androidboot.console=ttyMSM0 \
81 androidboot.hardware=qcom \
82 androidboot.memcg=1 \
83 androidboot.usbcontroller=a600000.dwc3 \
84 cgroup.memory=nokmem,nosocket \
85 loop.max_part=7 \
86 lpm_levels.sleep_disabled=1 \
87 msm_rtb.filter=0x237 \
88 service_locator.enable=1 \
89 swiotlb=2048 \
90 video=vfb:640x400,bpp=32,memsize=3072000
merothh54856102021-11-04 12:07:41 +053091BOARD_INCLUDE_DTB_IN_BOOTIMG := true
92BOARD_INCLUDE_RECOVERY_DTBO := true
93BOARD_KERNEL_SEPARATED_DTBO := true
Michael Bestasffd26a32022-08-04 21:16:52 +030094BOARD_BOOT_HEADER_VERSION := 2
merothh54856102021-11-04 12:07:41 +053095BOARD_KERNEL_BASE := 0x00000000
96BOARD_KERNEL_PAGESIZE := 4096
97BOARD_FLASH_BLOCK_SIZE := 262144 # (BOARD_KERNEL_PAGESIZE * 64)
Michael Bestasffd26a32022-08-04 21:16:52 +030098BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
merothh54856102021-11-04 12:07:41 +053099BOARD_KERNEL_IMAGE_NAME := Image
Daniel Köster1ded3fc2022-01-23 10:24:04 +0100100TARGET_KERNEL_SOURCE := kernel/fairphone/sm7225
Michael Bestasdf0ba192023-05-22 23:59:10 +0300101TARGET_KERNEL_CONFIG := vendor/lito-perf_defconfig vendor/debugfs.config vendor/fairphone/FP4.config
merothh54856102021-11-04 12:07:41 +0530102
Erfan Abdidfd36632020-12-18 01:12:50 +0330103# Kernel modules - Audio
104TARGET_MODULE_ALIASES += \
105 adsp_loader_dlkm.ko:audio_adsp_loader.ko \
106 apr_dlkm.ko:audio_apr.ko \
107 bolero_cdc_dlkm.ko:audio_bolero_cdc.ko \
108 hdmi_dlkm.ko:audio_hdmi.ko \
109 machine_dlkm.ko:audio_machine_lito.ko \
110 mbhc_dlkm.ko:audio_mbhc.ko \
111 native_dlkm.ko:audio_native.ko \
112 pinctrl_lpi_dlkm.ko:audio_pinctrl_lpi.ko \
113 platform_dlkm.ko:audio_platform.ko \
114 q6_dlkm.ko:audio_q6.ko \
115 q6_notifier_dlkm.ko:audio_q6_notifier.ko \
116 q6_pdr_dlkm.ko:audio_q6_pdr.ko \
117 rx_macro_dlkm.ko:audio_rx_macro.ko \
118 snd_event_dlkm.ko:audio_snd_event.ko \
119 stub_dlkm.ko:audio_stub.ko \
120 swr_ctrl_dlkm.ko:audio_swr_ctrl.ko \
121 swr_dlkm.ko:audio_swr.ko \
122 tx_macro_dlkm.ko:audio_tx_macro.ko \
123 usf_dlkm.ko:audio_usf.ko \
124 va_macro_dlkm.ko:audio_va_macro.ko \
125 wcd937x_dlkm.ko:audio_wcd937x.ko \
126 wcd937x_slave_dlkm.ko:audio_wcd937x_slave.ko \
127 wcd938x_dlkm.ko:audio_wcd938x.ko \
128 wcd938x_slave_dlkm.ko:audio_wcd938x_slave.ko \
129 wcd9xxx_dlkm.ko:audio_wcd9xxx.ko \
130 wcd_core_dlkm.ko:audio_wcd_core.ko \
131 wsa881x_dlkm.ko:audio_wsa881x.ko \
132 wsa883x_dlkm.ko:audio_wsa883x.ko \
133 wsa_macro_dlkm.ko:audio_wsa_macro.ko
134
135# Kernel modules - WLAN
136TARGET_MODULE_ALIASES += \
137 wlan.ko:qca_cld3_wlan.ko
138
Hyejin Kim49e328f2015-03-06 14:49:37 +0900139# Media
140TARGET_USES_ION := true
141
merothh726fc3a2022-01-03 04:59:57 +0530142# Metadata
143BOARD_USES_METADATA_PARTITION := true
144
145# Partitions (Sizes)
Michael Bestasccc3bbf2023-11-22 15:51:28 +0200146-include vendor/lineage/config/BoardConfigReservedSize.mk
merothh726fc3a2022-01-03 04:59:57 +0530147BOARD_BOOTIMAGE_PARTITION_SIZE := 100663296
148BOARD_DTBOIMG_PARTITION_SIZE := 25165824
merothh54856102021-11-04 12:07:41 +0530149BOARD_RECOVERYIMAGE_PARTITION_SIZE := 100663296
merothh726fc3a2022-01-03 04:59:57 +0530150BOARD_METADATAIMAGE_PARTITION_SIZE := 16777216
151BOARD_SUPER_PARTITION_SIZE := 6442450944
152BOARD_SUPER_PARTITION_GROUPS := qti_dynamic_partitions
153BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST := odm product system system_ext vendor
154BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := 6438256640
155
merothh726fc3a2022-01-03 04:59:57 +0530156# Partitions (Other)
157BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
158BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
159BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
160BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4
161BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
162TARGET_COPY_OUT_ODM := odm
163TARGET_COPY_OUT_PRODUCT := product
164TARGET_COPY_OUT_SYSTEM_EXT := system_ext
merothh54856102021-11-04 12:07:41 +0530165TARGET_COPY_OUT_VENDOR := vendor
166
merothh750fa002022-01-02 19:42:51 +0530167# Platform
168BOARD_USES_QCOM_HARDWARE := true
169TARGET_BOARD_PLATFORM := lito
170
merothh54856102021-11-04 12:07:41 +0530171# Recovery
Michael Bestasd4923512024-05-10 02:57:20 +0300172TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/init/fstab.default
merothh54856102021-11-04 12:07:41 +0530173TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
174TARGET_RECOVERY_UI_MARGIN_HEIGHT := 50
175TARGET_RECOVERY_UI_MARGIN_WIDTH := 10
176TARGET_USERIMAGES_USE_EXT4 := true
177TARGET_USERIMAGES_USE_F2FS := true
merothhacf1dfa2022-01-02 18:21:21 +0530178
Sebastiano Barezzid70ce292021-02-10 22:08:35 +0100179# RIL
180ENABLE_VENDOR_RIL_SERVICE := true
181
merothhacf1dfa2022-01-02 18:21:21 +0530182# Security patch level
Michael Bestas02554b22024-04-06 15:44:36 +0300183BOOT_SECURITY_PATCH := 2024-03-05
184VENDOR_SECURITY_PATCH := 2024-03-05
merothhacf1dfa2022-01-02 18:21:21 +0530185
merothh3b429fa2022-01-03 05:10:38 +0530186# SEPolicy
Bruno Martins67b85492023-10-24 18:12:15 +0100187include device/qcom/sepolicy_vndr/SEPolicy.mk
merothh3b429fa2022-01-03 05:10:38 +0530188BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor
Rohit R Sekhar2fc323f2022-12-02 13:06:00 +0530189SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/private
merothh3b429fa2022-01-03 05:10:38 +0530190
merothhbeea4332022-01-03 05:02:03 +0530191# Verified Boot
192BOARD_AVB_ENABLE := true
Rashed Abdel-Tawab95c87ca2019-09-07 11:13:09 -0700193BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3
merothhbeea4332022-01-03 05:02:03 +0530194BOARD_AVB_VBMETA_SYSTEM := system system_ext product
195BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
196BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048
197BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
198BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 2
199
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100200# Wifi
201BOARD_WLAN_DEVICE := qcwcn
202BOARD_HOSTAPD_DRIVER := NL80211
203BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
204BOARD_WPA_SUPPLICANT_DRIVER := NL80211
205BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
Mohammad Asaad Akram07f7ba32022-02-28 13:55:13 -0700206BOARD_WPA_SUPPLICANT_PRIVATE_LIB_EVENT := "ON"
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100207WIFI_DRIVER_DEFAULT := qca_cld3
208WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan"
209WIFI_DRIVER_STATE_OFF := "OFF"
210WIFI_DRIVER_STATE_ON := "ON"
211WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
212WIFI_HIDL_FEATURE_AWARE := true
Jimmy Chenacd7fc32019-10-03 11:04:05 +0800213WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100214WPA_SUPPLICANT_VERSION := VER_0_8_X
215
merothhacf1dfa2022-01-02 18:21:21 +0530216# Inherit the proprietary files
217include vendor/fairphone/FP4/BoardConfigVendor.mk