blob: 802b8ec3171d1defeab63ac7fc6f0ccccfd268d5 [file] [log] [blame]
merothh54856102021-11-04 12:07:41 +05301#
2# Copyright (C) 2021 The LineageOS Project
3#
4# SPDX-License-Identifier: Apache-2.0
5#
6
merothh750fa002022-01-02 19:42:51 +05307BUILD_BROKEN_DUP_RULES := true
Roger Ellis3a515082020-05-13 16:56:10 -07008BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := 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
43AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true
44AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true
merothh750fa002022-01-02 19:42:51 +053045AUDIO_FEATURE_ENABLED_HDMI_SPK := true
46AUDIO_FEATURE_ENABLED_INSTANCE_ID := true
47AUDIO_FEATURE_ENABLED_SSR := true
48AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
49USE_CUSTOM_AUDIO_POLICY := 1
50
merothh750fa002022-01-02 19:42:51 +053051# Bluetooth
52BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(DEVICE_PATH)/bluetooth/include
merothh750fa002022-01-02 19:42:51 +053053
Michael Bestasb08b3cc2022-02-16 21:47:07 +020054# Bootloader
55TARGET_BOOTLOADER_BOARD_NAME := FP4
56
merothh54856102021-11-04 12:07:41 +053057# Display
merothh7af51cb2022-01-02 20:14:21 +053058MAX_VIRTUAL_DISPLAY_DIMENSION := 4096
59NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
60TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS := true
61TARGET_HAS_HDR_DISPLAY := true
62TARGET_HAS_WIDE_COLOR_DISPLAY := true
merothh54856102021-11-04 12:07:41 +053063TARGET_SCREEN_DENSITY := 440
merothh7af51cb2022-01-02 20:14:21 +053064TARGET_USES_DISPLAY_RENDER_INTENTS := true
65TARGET_USES_GRALLOC4 := true
66TARGET_USES_HWC2 := true
merothh54856102021-11-04 12:07:41 +053067
Sebastiano Barezzi2789dea2021-02-10 22:01:11 +010068# DRM
69TARGET_ENABLE_MEDIADRM_64 := true
70
merothh1b7e5302022-01-03 00:41:34 +053071# Filesystem
72TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/config.fs
73
merothh74ca26a2022-01-02 19:12:01 +053074# HIDL
75DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
76 $(DEVICE_PATH)/framework_compatibility_matrix.xml \
77 vendor/lineage/config/device_framework_matrix.xml
78DEVICE_MATRIX_FILE := $(DEVICE_PATH)/compatibility_matrix.xml
79DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/manifest.xml
80ODM_MANIFEST_FILES := $(DEVICE_PATH)/manifest-qva.xml
81
merothh54856102021-11-04 12:07:41 +053082# Kernel
83BOARD_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
merothh54856102021-11-04 12:07:41 +053084BOARD_INCLUDE_DTB_IN_BOOTIMG := true
85BOARD_INCLUDE_RECOVERY_DTBO := true
86BOARD_KERNEL_SEPARATED_DTBO := true
Michael Bestasffd26a32022-08-04 21:16:52 +030087BOARD_BOOT_HEADER_VERSION := 2
merothh54856102021-11-04 12:07:41 +053088BOARD_KERNEL_BASE := 0x00000000
89BOARD_KERNEL_PAGESIZE := 4096
90BOARD_FLASH_BLOCK_SIZE := 262144 # (BOARD_KERNEL_PAGESIZE * 64)
Michael Bestasffd26a32022-08-04 21:16:52 +030091BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
merothh54856102021-11-04 12:07:41 +053092BOARD_KERNEL_IMAGE_NAME := Image
Daniel Köster1ded3fc2022-01-23 10:24:04 +010093TARGET_KERNEL_SOURCE := kernel/fairphone/sm7225
Michael Bestasba281bc2022-03-01 23:07:06 +020094TARGET_KERNEL_CONFIG := FP4_defconfig
merothh54856102021-11-04 12:07:41 +053095
Erfan Abdidfd36632020-12-18 01:12:50 +033096# Kernel modules - Audio
97TARGET_MODULE_ALIASES += \
98 adsp_loader_dlkm.ko:audio_adsp_loader.ko \
99 apr_dlkm.ko:audio_apr.ko \
100 bolero_cdc_dlkm.ko:audio_bolero_cdc.ko \
101 hdmi_dlkm.ko:audio_hdmi.ko \
102 machine_dlkm.ko:audio_machine_lito.ko \
103 mbhc_dlkm.ko:audio_mbhc.ko \
104 native_dlkm.ko:audio_native.ko \
105 pinctrl_lpi_dlkm.ko:audio_pinctrl_lpi.ko \
106 platform_dlkm.ko:audio_platform.ko \
107 q6_dlkm.ko:audio_q6.ko \
108 q6_notifier_dlkm.ko:audio_q6_notifier.ko \
109 q6_pdr_dlkm.ko:audio_q6_pdr.ko \
110 rx_macro_dlkm.ko:audio_rx_macro.ko \
111 snd_event_dlkm.ko:audio_snd_event.ko \
112 stub_dlkm.ko:audio_stub.ko \
113 swr_ctrl_dlkm.ko:audio_swr_ctrl.ko \
114 swr_dlkm.ko:audio_swr.ko \
115 tx_macro_dlkm.ko:audio_tx_macro.ko \
116 usf_dlkm.ko:audio_usf.ko \
117 va_macro_dlkm.ko:audio_va_macro.ko \
118 wcd937x_dlkm.ko:audio_wcd937x.ko \
119 wcd937x_slave_dlkm.ko:audio_wcd937x_slave.ko \
120 wcd938x_dlkm.ko:audio_wcd938x.ko \
121 wcd938x_slave_dlkm.ko:audio_wcd938x_slave.ko \
122 wcd9xxx_dlkm.ko:audio_wcd9xxx.ko \
123 wcd_core_dlkm.ko:audio_wcd_core.ko \
124 wsa881x_dlkm.ko:audio_wsa881x.ko \
125 wsa883x_dlkm.ko:audio_wsa883x.ko \
126 wsa_macro_dlkm.ko:audio_wsa_macro.ko
127
128# Kernel modules - WLAN
129TARGET_MODULE_ALIASES += \
130 wlan.ko:qca_cld3_wlan.ko
131
Hyejin Kim49e328f2015-03-06 14:49:37 +0900132# Media
133TARGET_USES_ION := true
134
merothh726fc3a2022-01-03 04:59:57 +0530135# Metadata
136BOARD_USES_METADATA_PARTITION := true
137
138# Partitions (Sizes)
139BOARD_BOOTIMAGE_PARTITION_SIZE := 100663296
140BOARD_DTBOIMG_PARTITION_SIZE := 25165824
merothh54856102021-11-04 12:07:41 +0530141BOARD_RECOVERYIMAGE_PARTITION_SIZE := 100663296
merothh726fc3a2022-01-03 04:59:57 +0530142BOARD_METADATAIMAGE_PARTITION_SIZE := 16777216
143BOARD_SUPER_PARTITION_SIZE := 6442450944
144BOARD_SUPER_PARTITION_GROUPS := qti_dynamic_partitions
145BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST := odm product system system_ext vendor
146BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := 6438256640
147
Michael Bestase4aeb222022-02-26 23:24:28 +0200148# Reserve space for gapps install
149ifneq ($(WITH_GMS),true)
150BOARD_PRODUCTIMAGE_EXTFS_INODE_COUNT := -1
151BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE := 614400000
152BOARD_SYSTEMIMAGE_EXTFS_INODE_COUNT := -1
Michael Bestasfbb924c2022-04-04 00:48:47 +0300153BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 3158932684
Michael Bestase4aeb222022-02-26 23:24:28 +0200154BOARD_SYSTEM_EXTIMAGE_EXTFS_INODE_COUNT := -1
155BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE := 92160000
156endif
157BOARD_ODMIMAGE_PARTITION_RESERVED_SIZE:= 30720000
158BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE := 30720000
merothh726fc3a2022-01-03 04:59:57 +0530159
160# Partitions (Other)
161BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
162BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
163BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
164BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4
165BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
166TARGET_COPY_OUT_ODM := odm
167TARGET_COPY_OUT_PRODUCT := product
168TARGET_COPY_OUT_SYSTEM_EXT := system_ext
merothh54856102021-11-04 12:07:41 +0530169TARGET_COPY_OUT_VENDOR := vendor
170
merothh750fa002022-01-02 19:42:51 +0530171# Platform
172BOARD_USES_QCOM_HARDWARE := true
173TARGET_BOARD_PLATFORM := lito
174
merothh397bd7e2022-01-03 01:21:55 +0530175# Properties
176TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop
177TARGET_PRODUCT_PROP += $(DEVICE_PATH)/product.prop
178TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop
179TARGET_ODM_PROP += $(DEVICE_PATH)/odm.prop
180
merothh54856102021-11-04 12:07:41 +0530181# Recovery
182TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/etc/fstab.default
183TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
184TARGET_RECOVERY_UI_MARGIN_HEIGHT := 50
185TARGET_RECOVERY_UI_MARGIN_WIDTH := 10
186TARGET_USERIMAGES_USE_EXT4 := true
187TARGET_USERIMAGES_USE_F2FS := true
merothhacf1dfa2022-01-02 18:21:21 +0530188
Sebastiano Barezzid70ce292021-02-10 22:08:35 +0100189# RIL
190ENABLE_VENDOR_RIL_SERVICE := true
191
merothhacf1dfa2022-01-02 18:21:21 +0530192# Security patch level
Rohite3ad4492022-08-02 14:40:49 +0530193VENDOR_SECURITY_PATCH := 2022-07-05
merothhacf1dfa2022-01-02 18:21:21 +0530194
merothh3b429fa2022-01-03 05:10:38 +0530195# SEPolicy
196include device/qcom/sepolicy_vndr/SEPolicy.mk
197BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor
198
merothhbeea4332022-01-03 05:02:03 +0530199# Verified Boot
200BOARD_AVB_ENABLE := true
Rashed Abdel-Tawab95c87ca2019-09-07 11:13:09 -0700201BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3
merothhbeea4332022-01-03 05:02:03 +0530202BOARD_AVB_VBMETA_SYSTEM := system system_ext product
203BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
204BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048
205BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
206BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 2
207
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100208# Wifi
209BOARD_WLAN_DEVICE := qcwcn
210BOARD_HOSTAPD_DRIVER := NL80211
211BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
212BOARD_WPA_SUPPLICANT_DRIVER := NL80211
213BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
214WIFI_DRIVER_DEFAULT := qca_cld3
215WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan"
216WIFI_DRIVER_STATE_OFF := "OFF"
217WIFI_DRIVER_STATE_ON := "ON"
218WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
219WIFI_HIDL_FEATURE_AWARE := true
Jimmy Chenacd7fc32019-10-03 11:04:05 +0800220WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100221WPA_SUPPLICANT_VERSION := VER_0_8_X
222
merothhacf1dfa2022-01-02 18:21:21 +0530223# Inherit the proprietary files
224include vendor/fairphone/FP4/BoardConfigVendor.mk