blob: bc6d03c274db9e870714ad4347d3726574cdb814 [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
8
merothh54856102021-11-04 12:07:41 +05309BOARD_VENDOR := fairphone
10DEVICE_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
28# Assert
29TARGET_OTA_ASSERT_DEVICE := FP4
30
31# A/B
32AB_OTA_UPDATER := true
33AB_OTA_PARTITIONS += \
34 recovery
35
merothh750fa002022-01-02 19:42:51 +053036# Audio
37AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true
38AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true
39AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true
40AUDIO_FEATURE_ENABLED_HDMI_SPK := true
41AUDIO_FEATURE_ENABLED_INSTANCE_ID := true
42AUDIO_FEATURE_ENABLED_SSR := true
43AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
44USE_CUSTOM_AUDIO_POLICY := 1
45
merothh54856102021-11-04 12:07:41 +053046# Binder API version
47TARGET_USES_64_BIT_BINDER := true
48
merothh750fa002022-01-02 19:42:51 +053049# Bluetooth
50BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(DEVICE_PATH)/bluetooth/include
51TARGET_USE_QTI_BT_STACK := true
52
merothh54856102021-11-04 12:07:41 +053053# Display
merothh7af51cb2022-01-02 20:14:21 +053054MAX_VIRTUAL_DISPLAY_DIMENSION := 4096
55NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
56TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS := true
57TARGET_HAS_HDR_DISPLAY := true
58TARGET_HAS_WIDE_COLOR_DISPLAY := true
merothh54856102021-11-04 12:07:41 +053059TARGET_SCREEN_DENSITY := 440
merothh7af51cb2022-01-02 20:14:21 +053060TARGET_USES_DISPLAY_RENDER_INTENTS := true
61TARGET_USES_GRALLOC4 := true
62TARGET_USES_HWC2 := true
merothh54856102021-11-04 12:07:41 +053063
Sebastiano Barezzi2789dea2021-02-10 22:01:11 +010064# DRM
65TARGET_ENABLE_MEDIADRM_64 := true
66
merothh1b7e5302022-01-03 00:41:34 +053067# Filesystem
68TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/config.fs
69
merothh74ca26a2022-01-02 19:12:01 +053070# HIDL
71DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
72 $(DEVICE_PATH)/framework_compatibility_matrix.xml \
73 vendor/lineage/config/device_framework_matrix.xml
74DEVICE_MATRIX_FILE := $(DEVICE_PATH)/compatibility_matrix.xml
75DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/manifest.xml
76ODM_MANIFEST_FILES := $(DEVICE_PATH)/manifest-qva.xml
77
merothh54856102021-11-04 12:07:41 +053078# Kernel
79BOARD_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 +053080BOARD_INCLUDE_DTB_IN_BOOTIMG := true
81BOARD_INCLUDE_RECOVERY_DTBO := true
82BOARD_KERNEL_SEPARATED_DTBO := true
83BOARD_BOOTIMG_HEADER_VERSION := 2
84BOARD_KERNEL_BASE := 0x00000000
85BOARD_KERNEL_PAGESIZE := 4096
86BOARD_FLASH_BLOCK_SIZE := 262144 # (BOARD_KERNEL_PAGESIZE * 64)
87BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOTIMG_HEADER_VERSION)
88BOARD_KERNEL_IMAGE_NAME := Image
89TARGET_KERNEL_ARCH := arm64
90TARGET_KERNEL_ADDITIONAL_FLAGS := DTC_EXT=$(shell pwd)/prebuilts/misc/linux-x86/dtc/dtc
91TARGET_KERNEL_CLANG_COMPILE := true
92TARGET_KERNEL_SOURCE := kernel/fairphone/FP4
93TARGET_KERNEL_CONFIG := lineage_FP4_defconfig
94
Erfan Abdidfd36632020-12-18 01:12:50 +033095# Kernel modules - Audio
96TARGET_MODULE_ALIASES += \
97 adsp_loader_dlkm.ko:audio_adsp_loader.ko \
98 apr_dlkm.ko:audio_apr.ko \
99 bolero_cdc_dlkm.ko:audio_bolero_cdc.ko \
100 hdmi_dlkm.ko:audio_hdmi.ko \
101 machine_dlkm.ko:audio_machine_lito.ko \
102 mbhc_dlkm.ko:audio_mbhc.ko \
103 native_dlkm.ko:audio_native.ko \
104 pinctrl_lpi_dlkm.ko:audio_pinctrl_lpi.ko \
105 platform_dlkm.ko:audio_platform.ko \
106 q6_dlkm.ko:audio_q6.ko \
107 q6_notifier_dlkm.ko:audio_q6_notifier.ko \
108 q6_pdr_dlkm.ko:audio_q6_pdr.ko \
109 rx_macro_dlkm.ko:audio_rx_macro.ko \
110 snd_event_dlkm.ko:audio_snd_event.ko \
111 stub_dlkm.ko:audio_stub.ko \
112 swr_ctrl_dlkm.ko:audio_swr_ctrl.ko \
113 swr_dlkm.ko:audio_swr.ko \
114 tx_macro_dlkm.ko:audio_tx_macro.ko \
115 usf_dlkm.ko:audio_usf.ko \
116 va_macro_dlkm.ko:audio_va_macro.ko \
117 wcd937x_dlkm.ko:audio_wcd937x.ko \
118 wcd937x_slave_dlkm.ko:audio_wcd937x_slave.ko \
119 wcd938x_dlkm.ko:audio_wcd938x.ko \
120 wcd938x_slave_dlkm.ko:audio_wcd938x_slave.ko \
121 wcd9xxx_dlkm.ko:audio_wcd9xxx.ko \
122 wcd_core_dlkm.ko:audio_wcd_core.ko \
123 wsa881x_dlkm.ko:audio_wsa881x.ko \
124 wsa883x_dlkm.ko:audio_wsa883x.ko \
125 wsa_macro_dlkm.ko:audio_wsa_macro.ko
126
127# Kernel modules - WLAN
128TARGET_MODULE_ALIASES += \
129 wlan.ko:qca_cld3_wlan.ko
130
Hyejin Kim49e328f2015-03-06 14:49:37 +0900131# Media
132TARGET_USES_ION := true
133
merothh54856102021-11-04 12:07:41 +0530134# Partitions
135BOARD_RECOVERYIMAGE_PARTITION_SIZE := 100663296
136TARGET_COPY_OUT_VENDOR := vendor
137
merothh750fa002022-01-02 19:42:51 +0530138# Platform
139BOARD_USES_QCOM_HARDWARE := true
140TARGET_BOARD_PLATFORM := lito
141
merothh397bd7e2022-01-03 01:21:55 +0530142# Properties
143TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop
144TARGET_PRODUCT_PROP += $(DEVICE_PATH)/product.prop
145TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop
146TARGET_ODM_PROP += $(DEVICE_PATH)/odm.prop
147
merothh54856102021-11-04 12:07:41 +0530148# Recovery
149TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/etc/fstab.default
150TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
151TARGET_RECOVERY_UI_MARGIN_HEIGHT := 50
152TARGET_RECOVERY_UI_MARGIN_WIDTH := 10
153TARGET_USERIMAGES_USE_EXT4 := true
154TARGET_USERIMAGES_USE_F2FS := true
merothhacf1dfa2022-01-02 18:21:21 +0530155
Sebastiano Barezzid70ce292021-02-10 22:08:35 +0100156# RIL
157ENABLE_VENDOR_RIL_SERVICE := true
158
merothhacf1dfa2022-01-02 18:21:21 +0530159# Security patch level
160VENDOR_SECURITY_PATCH := 2021-11-05
161
merothh3b429fa2022-01-03 05:10:38 +0530162# SEPolicy
163include device/qcom/sepolicy_vndr/SEPolicy.mk
164BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor
165
merothhbeea4332022-01-03 05:02:03 +0530166# Verified Boot
167BOARD_AVB_ENABLE := true
168BOARD_AVB_VBMETA_SYSTEM := system system_ext product
169BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
170BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048
171BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
172BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 2
173
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100174# Wifi
175BOARD_WLAN_DEVICE := qcwcn
176BOARD_HOSTAPD_DRIVER := NL80211
177BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
178BOARD_WPA_SUPPLICANT_DRIVER := NL80211
179BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
180WIFI_DRIVER_DEFAULT := qca_cld3
181WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan"
182WIFI_DRIVER_STATE_OFF := "OFF"
183WIFI_DRIVER_STATE_ON := "ON"
184WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
185WIFI_HIDL_FEATURE_AWARE := true
186WPA_SUPPLICANT_VERSION := VER_0_8_X
187
merothhacf1dfa2022-01-02 18:21:21 +0530188# Inherit the proprietary files
189include vendor/fairphone/FP4/BoardConfigVendor.mk