blob: de66b321d213465077dd32f571e6bd294635a013 [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
merothh750fa002022-01-02 19:42:51 +05308
merothh54856102021-11-04 12:07:41 +05309DEVICE_PATH := device/fairphone/FP4
10
Luca Stefani82ac4352019-09-12 23:47:56 +020011# APEX
12DEXPREOPT_GENERATE_APEX_IMAGE := true
13
merothh54856102021-11-04 12:07:41 +053014# Architecture
15TARGET_ARCH := arm64
16TARGET_ARCH_VARIANT := armv8-a
17TARGET_CPU_ABI := arm64-v8a
18TARGET_CPU_ABI2 :=
19TARGET_CPU_VARIANT := cortex-a76
20
21TARGET_2ND_ARCH := arm
22TARGET_2ND_ARCH_VARIANT := armv8-a
23TARGET_2ND_CPU_ABI := armeabi-v7a
24TARGET_2ND_CPU_ABI2 := armeabi
25TARGET_2ND_CPU_VARIANT := cortex-a76
26
merothh54856102021-11-04 12:07:41 +053027# A/B
28AB_OTA_UPDATER := true
29AB_OTA_PARTITIONS += \
merothh726fc3a2022-01-03 04:59:57 +053030 boot \
31 dtbo \
32 odm \
33 product \
34 recovery \
35 system \
36 system_ext \
37 vbmeta \
38 vbmeta_system \
39 vendor
merothh54856102021-11-04 12:07:41 +053040
merothh750fa002022-01-02 19:42:51 +053041# Audio
Rohit00be9f42023-03-20 16:00:09 +053042AUDIO_FEATURE_ENABLED_EXT_AMPLIFIER := true
merothh750fa002022-01-02 19:42:51 +053043AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true
Rohit7737da62023-03-17 14:44:12 +053044AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
merothh750fa002022-01-02 19:42:51 +053045AUDIO_FEATURE_ENABLED_INSTANCE_ID := true
Rohit7737da62023-03-17 14:44:12 +053046AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
merothh750fa002022-01-02 19:42:51 +053047AUDIO_FEATURE_ENABLED_SSR := true
Rohit7737da62023-03-17 14:44:12 +053048BOARD_SUPPORTS_SOUND_TRIGGER := true
49BOARD_USES_ALSA_AUDIO := true
merothh750fa002022-01-02 19:42:51 +053050
Michael Bestasb08b3cc2022-02-16 21:47:07 +020051# Bootloader
52TARGET_BOOTLOADER_BOARD_NAME := FP4
53
merothh54856102021-11-04 12:07:41 +053054# Display
55TARGET_SCREEN_DENSITY := 440
merothh7af51cb2022-01-02 20:14:21 +053056TARGET_USES_DISPLAY_RENDER_INTENTS := true
57TARGET_USES_GRALLOC4 := true
58TARGET_USES_HWC2 := true
merothh54856102021-11-04 12:07:41 +053059
merothh1b7e5302022-01-03 00:41:34 +053060# Filesystem
61TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/config.fs
62
Michael Bestasd870a482023-05-04 01:19:43 +030063# GPS
64BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default
65LOC_HIDL_VERSION := 4.0
66
merothh74ca26a2022-01-02 19:12:01 +053067# HIDL
68DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
69 $(DEVICE_PATH)/framework_compatibility_matrix.xml \
Bruno Martinsca30f512022-04-05 10:34:38 +010070 hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml \
merothh74ca26a2022-01-02 19:12:01 +053071 vendor/lineage/config/device_framework_matrix.xml
72DEVICE_MATRIX_FILE := $(DEVICE_PATH)/compatibility_matrix.xml
73DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/manifest.xml
74ODM_MANIFEST_FILES := $(DEVICE_PATH)/manifest-qva.xml
75
merothh54856102021-11-04 12:07:41 +053076# Kernel
Alexander Koskovich744125d2022-04-11 21:13:13 -070077BOARD_KERNEL_CMDLINE := \
78 androidboot.console=ttyMSM0 \
79 androidboot.hardware=qcom \
80 androidboot.memcg=1 \
81 androidboot.usbcontroller=a600000.dwc3 \
82 cgroup.memory=nokmem,nosocket \
83 loop.max_part=7 \
84 lpm_levels.sleep_disabled=1 \
85 msm_rtb.filter=0x237 \
86 service_locator.enable=1 \
87 swiotlb=2048 \
88 video=vfb:640x400,bpp=32,memsize=3072000
merothh54856102021-11-04 12:07:41 +053089BOARD_INCLUDE_DTB_IN_BOOTIMG := true
90BOARD_INCLUDE_RECOVERY_DTBO := true
91BOARD_KERNEL_SEPARATED_DTBO := true
Michael Bestasffd26a32022-08-04 21:16:52 +030092BOARD_BOOT_HEADER_VERSION := 2
merothh54856102021-11-04 12:07:41 +053093BOARD_KERNEL_BASE := 0x00000000
94BOARD_KERNEL_PAGESIZE := 4096
95BOARD_FLASH_BLOCK_SIZE := 262144 # (BOARD_KERNEL_PAGESIZE * 64)
Michael Bestasffd26a32022-08-04 21:16:52 +030096BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
merothh54856102021-11-04 12:07:41 +053097BOARD_KERNEL_IMAGE_NAME := Image
Daniel Köster1ded3fc2022-01-23 10:24:04 +010098TARGET_KERNEL_SOURCE := kernel/fairphone/sm7225
Michael Bestasdf0ba192023-05-22 23:59:10 +030099TARGET_KERNEL_CONFIG := vendor/lito-perf_defconfig vendor/debugfs.config vendor/fairphone/FP4.config
merothh54856102021-11-04 12:07:41 +0530100
Erfan Abdidfd36632020-12-18 01:12:50 +0330101# Kernel modules - Audio
102TARGET_MODULE_ALIASES += \
103 adsp_loader_dlkm.ko:audio_adsp_loader.ko \
104 apr_dlkm.ko:audio_apr.ko \
105 bolero_cdc_dlkm.ko:audio_bolero_cdc.ko \
106 hdmi_dlkm.ko:audio_hdmi.ko \
107 machine_dlkm.ko:audio_machine_lito.ko \
108 mbhc_dlkm.ko:audio_mbhc.ko \
109 native_dlkm.ko:audio_native.ko \
110 pinctrl_lpi_dlkm.ko:audio_pinctrl_lpi.ko \
111 platform_dlkm.ko:audio_platform.ko \
112 q6_dlkm.ko:audio_q6.ko \
113 q6_notifier_dlkm.ko:audio_q6_notifier.ko \
114 q6_pdr_dlkm.ko:audio_q6_pdr.ko \
115 rx_macro_dlkm.ko:audio_rx_macro.ko \
116 snd_event_dlkm.ko:audio_snd_event.ko \
117 stub_dlkm.ko:audio_stub.ko \
118 swr_ctrl_dlkm.ko:audio_swr_ctrl.ko \
119 swr_dlkm.ko:audio_swr.ko \
120 tx_macro_dlkm.ko:audio_tx_macro.ko \
121 usf_dlkm.ko:audio_usf.ko \
122 va_macro_dlkm.ko:audio_va_macro.ko \
123 wcd937x_dlkm.ko:audio_wcd937x.ko \
124 wcd937x_slave_dlkm.ko:audio_wcd937x_slave.ko \
125 wcd938x_dlkm.ko:audio_wcd938x.ko \
126 wcd938x_slave_dlkm.ko:audio_wcd938x_slave.ko \
127 wcd9xxx_dlkm.ko:audio_wcd9xxx.ko \
128 wcd_core_dlkm.ko:audio_wcd_core.ko \
129 wsa881x_dlkm.ko:audio_wsa881x.ko \
130 wsa883x_dlkm.ko:audio_wsa883x.ko \
131 wsa_macro_dlkm.ko:audio_wsa_macro.ko
132
133# Kernel modules - WLAN
134TARGET_MODULE_ALIASES += \
135 wlan.ko:qca_cld3_wlan.ko
136
Hyejin Kim49e328f2015-03-06 14:49:37 +0900137# Media
138TARGET_USES_ION := true
139
merothh726fc3a2022-01-03 04:59:57 +0530140# Metadata
141BOARD_USES_METADATA_PARTITION := true
142
143# Partitions (Sizes)
144BOARD_BOOTIMAGE_PARTITION_SIZE := 100663296
145BOARD_DTBOIMG_PARTITION_SIZE := 25165824
merothh54856102021-11-04 12:07:41 +0530146BOARD_RECOVERYIMAGE_PARTITION_SIZE := 100663296
merothh726fc3a2022-01-03 04:59:57 +0530147BOARD_METADATAIMAGE_PARTITION_SIZE := 16777216
148BOARD_SUPER_PARTITION_SIZE := 6442450944
149BOARD_SUPER_PARTITION_GROUPS := qti_dynamic_partitions
150BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST := odm product system system_ext vendor
151BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := 6438256640
152
Michael Bestase4aeb222022-02-26 23:24:28 +0200153# Reserve space for gapps install
154ifneq ($(WITH_GMS),true)
155BOARD_PRODUCTIMAGE_EXTFS_INODE_COUNT := -1
156BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE := 614400000
157BOARD_SYSTEMIMAGE_EXTFS_INODE_COUNT := -1
Michael Bestasfbb924c2022-04-04 00:48:47 +0300158BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 3158932684
Michael Bestase4aeb222022-02-26 23:24:28 +0200159BOARD_SYSTEM_EXTIMAGE_EXTFS_INODE_COUNT := -1
160BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE := 92160000
161endif
162BOARD_ODMIMAGE_PARTITION_RESERVED_SIZE:= 30720000
163BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE := 30720000
merothh726fc3a2022-01-03 04:59:57 +0530164
165# Partitions (Other)
166BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
167BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
168BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
169BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4
170BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
171TARGET_COPY_OUT_ODM := odm
172TARGET_COPY_OUT_PRODUCT := product
173TARGET_COPY_OUT_SYSTEM_EXT := system_ext
merothh54856102021-11-04 12:07:41 +0530174TARGET_COPY_OUT_VENDOR := vendor
175
merothh750fa002022-01-02 19:42:51 +0530176# Platform
177BOARD_USES_QCOM_HARDWARE := true
178TARGET_BOARD_PLATFORM := lito
179
merothh397bd7e2022-01-03 01:21:55 +0530180# Properties
181TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop
182TARGET_PRODUCT_PROP += $(DEVICE_PATH)/product.prop
183TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop
184TARGET_ODM_PROP += $(DEVICE_PATH)/odm.prop
185
merothh54856102021-11-04 12:07:41 +0530186# Recovery
187TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/etc/fstab.default
188TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
189TARGET_RECOVERY_UI_MARGIN_HEIGHT := 50
190TARGET_RECOVERY_UI_MARGIN_WIDTH := 10
191TARGET_USERIMAGES_USE_EXT4 := true
192TARGET_USERIMAGES_USE_F2FS := true
merothhacf1dfa2022-01-02 18:21:21 +0530193
Sebastiano Barezzid70ce292021-02-10 22:08:35 +0100194# RIL
195ENABLE_VENDOR_RIL_SERVICE := true
196
merothhacf1dfa2022-01-02 18:21:21 +0530197# Security patch level
merothh634beee2023-05-03 13:28:09 +0530198BOOT_SECURITY_PATCH := 2023-04-05
199VENDOR_SECURITY_PATCH := 2023-04-05
merothhacf1dfa2022-01-02 18:21:21 +0530200
merothh3b429fa2022-01-03 05:10:38 +0530201# SEPolicy
Edwin Moquetec4467e62022-08-29 01:37:22 +0000202include device/qcom/sepolicy_vndr-legacy-um/SEPolicy.mk
merothh3b429fa2022-01-03 05:10:38 +0530203BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor
Rohit R Sekhar2fc323f2022-12-02 13:06:00 +0530204SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/private
merothh3b429fa2022-01-03 05:10:38 +0530205
merothhbeea4332022-01-03 05:02:03 +0530206# Verified Boot
207BOARD_AVB_ENABLE := true
Rashed Abdel-Tawab95c87ca2019-09-07 11:13:09 -0700208BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3
merothhbeea4332022-01-03 05:02:03 +0530209BOARD_AVB_VBMETA_SYSTEM := system system_ext product
210BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
211BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048
212BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
213BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 2
214
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100215# Wifi
216BOARD_WLAN_DEVICE := qcwcn
217BOARD_HOSTAPD_DRIVER := NL80211
218BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
219BOARD_WPA_SUPPLICANT_DRIVER := NL80211
220BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
Mohammad Asaad Akram07f7ba32022-02-28 13:55:13 -0700221BOARD_WPA_SUPPLICANT_PRIVATE_LIB_EVENT := "ON"
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100222WIFI_DRIVER_DEFAULT := qca_cld3
223WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan"
224WIFI_DRIVER_STATE_OFF := "OFF"
225WIFI_DRIVER_STATE_ON := "ON"
226WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
227WIFI_HIDL_FEATURE_AWARE := true
Jimmy Chenacd7fc32019-10-03 11:04:05 +0800228WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100229WPA_SUPPLICANT_VERSION := VER_0_8_X
230
merothhacf1dfa2022-01-02 18:21:21 +0530231# Inherit the proprietary files
232include vendor/fairphone/FP4/BoardConfigVendor.mk