blob: aaf0d4a04342b3decf24357aec64a4f9531ba171 [file] [log] [blame]
merothh54856102021-11-04 12:07:41 +05301#
Michael Bestas4e1ba2f2024-05-12 06:38:39 +03002# SPDX-FileCopyrightText: 2021-2024 The LineageOS Project
merothh54856102021-11-04 12:07:41 +05303# SPDX-License-Identifier: Apache-2.0
4#
5
Roger Ellis3a515082020-05-13 16:56:10 -07006BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
Cole Faust7ff2b0e2023-10-03 15:51:10 -07007BUILD_BROKEN_INCORRECT_PARTITION_IMAGES := true
merothh750fa002022-01-02 19:42:51 +05308
Michael Bestas10374532023-08-29 19:41:38 +03009DEVICE_PATH := device/fairphone/FP5
merothh54856102021-11-04 12:07:41 +053010
Michael Bestas70190bb2024-05-12 08:00:29 +030011# A/B
12AB_OTA_UPDATER := true
13
14AB_OTA_PARTITIONS += \
15 boot \
16 dtbo \
17 odm \
18 product \
19 recovery \
20 system \
21 system_ext \
22 vbmeta \
23 vbmeta_system \
24 vendor
25
merothh54856102021-11-04 12:07:41 +053026# Architecture
27TARGET_ARCH := arm64
Adithya R87d22e12021-01-24 14:02:20 +053028TARGET_ARCH_VARIANT := armv8-2a-dotprod
merothh54856102021-11-04 12:07:41 +053029TARGET_CPU_ABI := arm64-v8a
30TARGET_CPU_ABI2 :=
31TARGET_CPU_VARIANT := cortex-a76
32
33TARGET_2ND_ARCH := arm
34TARGET_2ND_ARCH_VARIANT := armv8-a
35TARGET_2ND_CPU_ABI := armeabi-v7a
36TARGET_2ND_CPU_ABI2 := armeabi
37TARGET_2ND_CPU_VARIANT := cortex-a76
38
merothh750fa002022-01-02 19:42:51 +053039# Audio
40AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true
Michael Bestas70190bb2024-05-12 08:00:29 +030041AUDIO_FEATURE_ENABLED_EXT_AMPLIFIER := true
Rohit7737da62023-03-17 14:44:12 +053042AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
merothh750fa002022-01-02 19:42:51 +053043AUDIO_FEATURE_ENABLED_INSTANCE_ID := true
Rohit7737da62023-03-17 14:44:12 +053044AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
merothh750fa002022-01-02 19:42:51 +053045AUDIO_FEATURE_ENABLED_SSR := true
Rohit7737da62023-03-17 14:44:12 +053046BOARD_SUPPORTS_SOUND_TRIGGER := true
47BOARD_USES_ALSA_AUDIO := true
merothh750fa002022-01-02 19:42:51 +053048
Michael Bestasb08b3cc2022-02-16 21:47:07 +020049# Bootloader
Michael Bestas10374532023-08-29 19:41:38 +030050TARGET_BOOTLOADER_BOARD_NAME := FP5
Michael Bestasb08b3cc2022-02-16 21:47:07 +020051
merothh54856102021-11-04 12:07:41 +053052# Display
Luofan Chen4fc24e52023-01-18 23:01:48 +080053TARGET_GRALLOC_HANDLE_HAS_RESERVED_SIZE := true
merothh54856102021-11-04 12:07:41 +053054TARGET_SCREEN_DENSITY := 440
merothh7af51cb2022-01-02 20:14:21 +053055TARGET_USES_DISPLAY_RENDER_INTENTS := true
56TARGET_USES_GRALLOC4 := true
57TARGET_USES_HWC2 := true
merothh54856102021-11-04 12:07:41 +053058
merothh1b7e5302022-01-03 00:41:34 +053059# Filesystem
60TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/config.fs
61
Michael Bestasd870a482023-05-04 01:19:43 +030062# GPS
63BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default
64LOC_HIDL_VERSION := 4.0
65
merothh74ca26a2022-01-02 19:12:01 +053066# HIDL
67DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
Michael Bestas82cb3f92024-05-12 08:11:39 +030068 $(DEVICE_PATH)/device_framework_matrix.xml \
Bruno Martinsca30f512022-04-05 10:34:38 +010069 hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml \
merothh74ca26a2022-01-02 19:12:01 +053070 vendor/lineage/config/device_framework_matrix.xml
merothh74ca26a2022-01-02 19:12:01 +053071DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/manifest.xml
Michael Bestas70190bb2024-05-12 08:00:29 +030072DEVICE_MATRIX_FILE := hardware/qcom-caf/common/compatibility_matrix.xml
merothh74ca26a2022-01-02 19:12:01 +053073
merothh54856102021-11-04 12:07:41 +053074# Kernel
Michael Bestasa43ccee2023-08-29 19:42:04 +030075BOARD_BOOT_HEADER_VERSION := 3
Michael Bestas70190bb2024-05-12 08:00:29 +030076BOARD_KERNEL_BASE := 0x00000000
77BOARD_KERNEL_PAGESIZE := 4096
78BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
79
80BOARD_INCLUDE_DTB_IN_BOOTIMG := true
Alexander Koskovich744125d2022-04-11 21:13:13 -070081BOARD_KERNEL_CMDLINE := \
82 androidboot.console=ttyMSM0 \
83 androidboot.hardware=qcom \
84 androidboot.memcg=1 \
85 androidboot.usbcontroller=a600000.dwc3 \
86 cgroup.memory=nokmem,nosocket \
Michael Bestasa43ccee2023-08-29 19:42:04 +030087 ip6table_raw.raw_before_defrag=1 \
88 iptable_raw.raw_before_defrag=1 \
Alexander Koskovich744125d2022-04-11 21:13:13 -070089 loop.max_part=7 \
90 lpm_levels.sleep_disabled=1 \
91 msm_rtb.filter=0x237 \
Michael Bestasa43ccee2023-08-29 19:42:04 +030092 pcie_ports=compat \
Alexander Koskovich744125d2022-04-11 21:13:13 -070093 service_locator.enable=1 \
Michael Bestasa43ccee2023-08-29 19:42:04 +030094 swiotlb=0
Michael Bestas70190bb2024-05-12 08:00:29 +030095
merothh54856102021-11-04 12:07:41 +053096BOARD_KERNEL_IMAGE_NAME := Image
Michael Bestas70190bb2024-05-12 08:00:29 +030097BOARD_KERNEL_SEPARATED_DTBO := true
Michael Bestasa43ccee2023-08-29 19:42:04 +030098TARGET_KERNEL_CONFIG := vendor/fp5-qgki_defconfig vendor/fp5.config
99TARGET_KERNEL_NO_GCC := true
100TARGET_KERNEL_SOURCE := kernel/fairphone/qcm6490
merothh54856102021-11-04 12:07:41 +0530101
Michael Bestas390c82c2023-08-30 03:13:59 +0300102# Kernel modules
Michael Bestas58712e72023-09-04 22:48:18 +0300103BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD := $(strip $(shell cat $(DEVICE_PATH)/modules.load.recovery))
104BOOT_KERNEL_MODULES := $(BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD)
Michael Bestas390c82c2023-08-30 03:13:59 +0300105TARGET_MODULE_ALIASES += wlan.ko:qca_cld3_wlan.ko
Erfan Abdidfd36632020-12-18 01:12:50 +0330106
Hyejin Kim49e328f2015-03-06 14:49:37 +0900107# Media
108TARGET_USES_ION := true
109
merothh726fc3a2022-01-03 04:59:57 +0530110# Metadata
111BOARD_USES_METADATA_PARTITION := true
112
113# Partitions (Sizes)
Michael Bestas70190bb2024-05-12 08:00:29 +0300114BOARD_FLASH_BLOCK_SIZE := 262144 # (BOARD_KERNEL_PAGESIZE * 64)
115
Michael Bestasccc3bbf2023-11-22 15:51:28 +0200116-include vendor/lineage/config/BoardConfigReservedSize.mk
merothh726fc3a2022-01-03 04:59:57 +0530117BOARD_BOOTIMAGE_PARTITION_SIZE := 100663296
118BOARD_DTBOIMG_PARTITION_SIZE := 25165824
merothh726fc3a2022-01-03 04:59:57 +0530119BOARD_METADATAIMAGE_PARTITION_SIZE := 16777216
Michael Bestas70190bb2024-05-12 08:00:29 +0300120BOARD_RECOVERYIMAGE_PARTITION_SIZE := 100663296
merothh726fc3a2022-01-03 04:59:57 +0530121BOARD_SUPER_PARTITION_SIZE := 6442450944
Michael Bestas70190bb2024-05-12 08:00:29 +0300122
merothh726fc3a2022-01-03 04:59:57 +0530123BOARD_SUPER_PARTITION_GROUPS := qti_dynamic_partitions
124BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST := odm product system system_ext vendor
125BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := 6438256640
126
merothh726fc3a2022-01-03 04:59:57 +0530127# Partitions (Other)
128BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
129BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
merothh726fc3a2022-01-03 04:59:57 +0530130BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4
Michael Bestas70190bb2024-05-12 08:00:29 +0300131BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
merothh726fc3a2022-01-03 04:59:57 +0530132BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
133TARGET_COPY_OUT_ODM := odm
134TARGET_COPY_OUT_PRODUCT := product
135TARGET_COPY_OUT_SYSTEM_EXT := system_ext
merothh54856102021-11-04 12:07:41 +0530136TARGET_COPY_OUT_VENDOR := vendor
137
merothh750fa002022-01-02 19:42:51 +0530138# Platform
139BOARD_USES_QCOM_HARDWARE := true
140TARGET_BOARD_PLATFORM := lito
141
merothh54856102021-11-04 12:07:41 +0530142# Recovery
Michael Bestas70190bb2024-05-12 08:00:29 +0300143BOARD_INCLUDE_RECOVERY_DTBO := true
Michael Bestasd4923512024-05-10 02:57:20 +0300144TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/init/fstab.default
merothh54856102021-11-04 12:07:41 +0530145TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
146TARGET_RECOVERY_UI_MARGIN_HEIGHT := 50
147TARGET_RECOVERY_UI_MARGIN_WIDTH := 10
148TARGET_USERIMAGES_USE_EXT4 := true
149TARGET_USERIMAGES_USE_F2FS := true
merothhacf1dfa2022-01-02 18:21:21 +0530150
Sebastiano Barezzid70ce292021-02-10 22:08:35 +0100151# RIL
152ENABLE_VENDOR_RIL_SERVICE := true
153
merothhacf1dfa2022-01-02 18:21:21 +0530154# Security patch level
Michael Bestas02554b22024-04-06 15:44:36 +0300155BOOT_SECURITY_PATCH := 2024-03-05
156VENDOR_SECURITY_PATCH := 2024-03-05
merothhacf1dfa2022-01-02 18:21:21 +0530157
merothh3b429fa2022-01-03 05:10:38 +0530158# SEPolicy
Bruno Martins67b85492023-10-24 18:12:15 +0100159include device/qcom/sepolicy_vndr/SEPolicy.mk
merothh3b429fa2022-01-03 05:10:38 +0530160BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor
Rohit R Sekhar2fc323f2022-12-02 13:06:00 +0530161SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/private
merothh3b429fa2022-01-03 05:10:38 +0530162
merothhbeea4332022-01-03 05:02:03 +0530163# Verified Boot
164BOARD_AVB_ENABLE := true
Rashed Abdel-Tawab95c87ca2019-09-07 11:13:09 -0700165BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3
merothhbeea4332022-01-03 05:02:03 +0530166BOARD_AVB_VBMETA_SYSTEM := system system_ext product
merothhbeea4332022-01-03 05:02:03 +0530167BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048
Michael Bestas70190bb2024-05-12 08:00:29 +0300168BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
merothhbeea4332022-01-03 05:02:03 +0530169BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
170BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 2
171
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100172# Wifi
173BOARD_WLAN_DEVICE := qcwcn
174BOARD_HOSTAPD_DRIVER := NL80211
175BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
Michael Bestas70190bb2024-05-12 08:00:29 +0300176BOARD_WPA_SUPPLICANT_DRIVER := $(BOARD_HOSTAPD_DRIVER)
177BOARD_WPA_SUPPLICANT_PRIVATE_LIB := $(BOARD_HOSTAPD_PRIVATE_LIB)
Mohammad Asaad Akram07f7ba32022-02-28 13:55:13 -0700178BOARD_WPA_SUPPLICANT_PRIVATE_LIB_EVENT := "ON"
Peng Xu80b1cc12017-02-07 15:16:52 -0800179CONFIG_IEEE80211AX := true
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100180WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan"
181WIFI_DRIVER_STATE_OFF := "OFF"
182WIFI_DRIVER_STATE_ON := "ON"
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100183WIFI_HIDL_FEATURE_AWARE := true
Michael Bestas70190bb2024-05-12 08:00:29 +0300184WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
Jimmy Chenacd7fc32019-10-03 11:04:05 +0800185WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100186WPA_SUPPLICANT_VERSION := VER_0_8_X
187
merothhacf1dfa2022-01-02 18:21:21 +0530188# Inherit the proprietary files
Michael Bestas10374532023-08-29 19:41:38 +0300189include vendor/fairphone/FP5/BoardConfigVendor.mk