blob: d2ddc075c10cd2b35e5900926fe42ce26865b149 [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
merothh750fa002022-01-02 19:42:51 +053044AUDIO_FEATURE_ENABLED_INSTANCE_ID := true
45AUDIO_FEATURE_ENABLED_SSR := true
merothh750fa002022-01-02 19:42:51 +053046
Michael Bestasb08b3cc2022-02-16 21:47:07 +020047# Bootloader
48TARGET_BOOTLOADER_BOARD_NAME := FP4
49
merothh54856102021-11-04 12:07:41 +053050# Display
51TARGET_SCREEN_DENSITY := 440
merothh7af51cb2022-01-02 20:14:21 +053052TARGET_USES_DISPLAY_RENDER_INTENTS := true
53TARGET_USES_GRALLOC4 := true
54TARGET_USES_HWC2 := true
merothh54856102021-11-04 12:07:41 +053055
merothh1b7e5302022-01-03 00:41:34 +053056# Filesystem
57TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/config.fs
58
merothh74ca26a2022-01-02 19:12:01 +053059# HIDL
60DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
61 $(DEVICE_PATH)/framework_compatibility_matrix.xml \
Bruno Martinsca30f512022-04-05 10:34:38 +010062 hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml \
merothh74ca26a2022-01-02 19:12:01 +053063 vendor/lineage/config/device_framework_matrix.xml
64DEVICE_MATRIX_FILE := $(DEVICE_PATH)/compatibility_matrix.xml
65DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/manifest.xml
66ODM_MANIFEST_FILES := $(DEVICE_PATH)/manifest-qva.xml
67
merothh54856102021-11-04 12:07:41 +053068# Kernel
Alexander Koskovich744125d2022-04-11 21:13:13 -070069BOARD_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
merothh54856102021-11-04 12:07:41 +053081BOARD_INCLUDE_DTB_IN_BOOTIMG := true
82BOARD_INCLUDE_RECOVERY_DTBO := true
83BOARD_KERNEL_SEPARATED_DTBO := true
Michael Bestasffd26a32022-08-04 21:16:52 +030084BOARD_BOOT_HEADER_VERSION := 2
merothh54856102021-11-04 12:07:41 +053085BOARD_KERNEL_BASE := 0x00000000
86BOARD_KERNEL_PAGESIZE := 4096
87BOARD_FLASH_BLOCK_SIZE := 262144 # (BOARD_KERNEL_PAGESIZE * 64)
Michael Bestasffd26a32022-08-04 21:16:52 +030088BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
merothh54856102021-11-04 12:07:41 +053089BOARD_KERNEL_IMAGE_NAME := Image
Daniel Köster1ded3fc2022-01-23 10:24:04 +010090TARGET_KERNEL_SOURCE := kernel/fairphone/sm7225
Michael Bestasba281bc2022-03-01 23:07:06 +020091TARGET_KERNEL_CONFIG := FP4_defconfig
merothh54856102021-11-04 12:07:41 +053092
Erfan Abdidfd36632020-12-18 01:12:50 +033093# Kernel modules - Audio
94TARGET_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
126TARGET_MODULE_ALIASES += \
127 wlan.ko:qca_cld3_wlan.ko
128
Hyejin Kim49e328f2015-03-06 14:49:37 +0900129# Media
130TARGET_USES_ION := true
131
merothh726fc3a2022-01-03 04:59:57 +0530132# Metadata
133BOARD_USES_METADATA_PARTITION := true
134
135# Partitions (Sizes)
136BOARD_BOOTIMAGE_PARTITION_SIZE := 100663296
137BOARD_DTBOIMG_PARTITION_SIZE := 25165824
merothh54856102021-11-04 12:07:41 +0530138BOARD_RECOVERYIMAGE_PARTITION_SIZE := 100663296
merothh726fc3a2022-01-03 04:59:57 +0530139BOARD_METADATAIMAGE_PARTITION_SIZE := 16777216
140BOARD_SUPER_PARTITION_SIZE := 6442450944
141BOARD_SUPER_PARTITION_GROUPS := qti_dynamic_partitions
142BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST := odm product system system_ext vendor
143BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := 6438256640
144
Michael Bestase4aeb222022-02-26 23:24:28 +0200145# Reserve space for gapps install
146ifneq ($(WITH_GMS),true)
147BOARD_PRODUCTIMAGE_EXTFS_INODE_COUNT := -1
148BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE := 614400000
149BOARD_SYSTEMIMAGE_EXTFS_INODE_COUNT := -1
Michael Bestasfbb924c2022-04-04 00:48:47 +0300150BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 3158932684
Michael Bestase4aeb222022-02-26 23:24:28 +0200151BOARD_SYSTEM_EXTIMAGE_EXTFS_INODE_COUNT := -1
152BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE := 92160000
153endif
154BOARD_ODMIMAGE_PARTITION_RESERVED_SIZE:= 30720000
155BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE := 30720000
merothh726fc3a2022-01-03 04:59:57 +0530156
157# Partitions (Other)
158BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
159BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
160BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
161BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4
162BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
163TARGET_COPY_OUT_ODM := odm
164TARGET_COPY_OUT_PRODUCT := product
165TARGET_COPY_OUT_SYSTEM_EXT := system_ext
merothh54856102021-11-04 12:07:41 +0530166TARGET_COPY_OUT_VENDOR := vendor
167
merothh750fa002022-01-02 19:42:51 +0530168# Platform
169BOARD_USES_QCOM_HARDWARE := true
170TARGET_BOARD_PLATFORM := lito
171
merothh397bd7e2022-01-03 01:21:55 +0530172# Properties
173TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop
174TARGET_PRODUCT_PROP += $(DEVICE_PATH)/product.prop
175TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop
176TARGET_ODM_PROP += $(DEVICE_PATH)/odm.prop
177
merothh54856102021-11-04 12:07:41 +0530178# Recovery
179TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/etc/fstab.default
180TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
181TARGET_RECOVERY_UI_MARGIN_HEIGHT := 50
182TARGET_RECOVERY_UI_MARGIN_WIDTH := 10
183TARGET_USERIMAGES_USE_EXT4 := true
184TARGET_USERIMAGES_USE_F2FS := true
merothhacf1dfa2022-01-02 18:21:21 +0530185
Sebastiano Barezzid70ce292021-02-10 22:08:35 +0100186# RIL
187ENABLE_VENDOR_RIL_SERVICE := true
188
merothhacf1dfa2022-01-02 18:21:21 +0530189# Security patch level
Chirayu Desai5becee12022-09-20 04:09:01 +0530190BOOT_SECURITY_PATCH := 2022-08-05
Rohitec673de2022-09-07 15:39:43 +0530191VENDOR_SECURITY_PATCH := 2022-08-05
merothhacf1dfa2022-01-02 18:21:21 +0530192
merothh3b429fa2022-01-03 05:10:38 +0530193# SEPolicy
Edwin Moquetec4467e62022-08-29 01:37:22 +0000194include device/qcom/sepolicy_vndr-legacy-um/SEPolicy.mk
merothh3b429fa2022-01-03 05:10:38 +0530195BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor
196
merothhbeea4332022-01-03 05:02:03 +0530197# Verified Boot
198BOARD_AVB_ENABLE := true
Rashed Abdel-Tawab95c87ca2019-09-07 11:13:09 -0700199BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3
merothhbeea4332022-01-03 05:02:03 +0530200BOARD_AVB_VBMETA_SYSTEM := system system_ext product
201BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
202BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048
203BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
204BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 2
205
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100206# Wifi
207BOARD_WLAN_DEVICE := qcwcn
208BOARD_HOSTAPD_DRIVER := NL80211
209BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
210BOARD_WPA_SUPPLICANT_DRIVER := NL80211
211BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
Mohammad Asaad Akram07f7ba32022-02-28 13:55:13 -0700212BOARD_WPA_SUPPLICANT_PRIVATE_LIB_EVENT := "ON"
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100213WIFI_DRIVER_DEFAULT := qca_cld3
214WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan"
215WIFI_DRIVER_STATE_OFF := "OFF"
216WIFI_DRIVER_STATE_ON := "ON"
217WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
218WIFI_HIDL_FEATURE_AWARE := true
Jimmy Chenacd7fc32019-10-03 11:04:05 +0800219WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100220WPA_SUPPLICANT_VERSION := VER_0_8_X
221
merothhacf1dfa2022-01-02 18:21:21 +0530222# Inherit the proprietary files
223include vendor/fairphone/FP4/BoardConfigVendor.mk