blob: 2eebd3b8dcf241b812d12626798b2c59698140ab [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
Michael Bestas5191be32023-08-29 22:42:36 +03006BUILD_BROKEN_DUP_RULES := true
Roger Ellis3a515082020-05-13 16:56:10 -07007BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := 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 \
Michael Bestas70190bb2024-05-12 08:00:29 +030019 system \
20 system_ext \
21 vbmeta \
22 vbmeta_system \
Michael Bestas99a5c712023-08-30 21:12:04 +030023 vendor \
24 vendor_boot
Michael Bestas70190bb2024-05-12 08:00:29 +030025
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
Michael Bestase76ee352023-08-29 22:52:45 +030043AUDIO_FEATURE_ENABLED_GKI := true
merothh750fa002022-01-02 19:42:51 +053044AUDIO_FEATURE_ENABLED_INSTANCE_ID := true
Rohit7737da62023-03-17 14:44:12 +053045AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
merothh750fa002022-01-02 19:42:51 +053046AUDIO_FEATURE_ENABLED_SSR := true
Michael Bestase76ee352023-08-29 22:52:45 +030047AUDIO_FEATURE_ENABLED_SVA_MULTI_STAGE := true
48BOARD_SUPPORTS_OPENSOURCE_STHAL := true
Rohit7737da62023-03-17 14:44:12 +053049BOARD_SUPPORTS_SOUND_TRIGGER := true
50BOARD_USES_ALSA_AUDIO := true
merothh750fa002022-01-02 19:42:51 +053051
Michael Bestasb08b3cc2022-02-16 21:47:07 +020052# Bootloader
Michael Bestas10374532023-08-29 19:41:38 +030053TARGET_BOOTLOADER_BOARD_NAME := FP5
Michael Bestasb08b3cc2022-02-16 21:47:07 +020054
Rohit Sekhar7bd009a2023-09-19 15:51:14 +053055# Camera
56TARGET_CAMERA_OVERRIDE_FORMAT_FROM_RESERVED := true
57
merothh54856102021-11-04 12:07:41 +053058# Display
Luofan Chen4fc24e52023-01-18 23:01:48 +080059TARGET_GRALLOC_HANDLE_HAS_RESERVED_SIZE := true
Michael Bestas179da592023-08-30 21:14:32 +030060TARGET_SCREEN_DENSITY := 480
merothh7af51cb2022-01-02 20:14:21 +053061TARGET_USES_DISPLAY_RENDER_INTENTS := true
62TARGET_USES_GRALLOC4 := true
63TARGET_USES_HWC2 := true
merothh54856102021-11-04 12:07:41 +053064
merothh1b7e5302022-01-03 00:41:34 +053065# Filesystem
66TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/config.fs
67
Michael Bestasd870a482023-05-04 01:19:43 +030068# GPS
69BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default
Michael Bestasa06dbf62024-08-16 03:55:37 +030070LOC_HIDL_VERSION := 4.2
Michael Bestasd870a482023-05-04 01:19:43 +030071
merothh74ca26a2022-01-02 19:12:01 +053072# HIDL
73DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
Michael Bestas82cb3f92024-05-12 08:11:39 +030074 $(DEVICE_PATH)/device_framework_matrix.xml \
Bruno Martinsca30f512022-04-05 10:34:38 +010075 hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml \
merothh74ca26a2022-01-02 19:12:01 +053076 vendor/lineage/config/device_framework_matrix.xml
Michael Bestas502781b2023-08-30 14:18:49 +030077DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/manifest_yupik.xml
Michael Bestas70190bb2024-05-12 08:00:29 +030078DEVICE_MATRIX_FILE := hardware/qcom-caf/common/compatibility_matrix.xml
merothh74ca26a2022-01-02 19:12:01 +053079
merothh54856102021-11-04 12:07:41 +053080# Kernel
Michael Bestasa43ccee2023-08-29 19:42:04 +030081BOARD_BOOT_HEADER_VERSION := 3
Michael Bestas70190bb2024-05-12 08:00:29 +030082BOARD_KERNEL_BASE := 0x00000000
83BOARD_KERNEL_PAGESIZE := 4096
84BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
85
86BOARD_INCLUDE_DTB_IN_BOOTIMG := true
Alexander Koskovich744125d2022-04-11 21:13:13 -070087BOARD_KERNEL_CMDLINE := \
88 androidboot.console=ttyMSM0 \
89 androidboot.hardware=qcom \
90 androidboot.memcg=1 \
91 androidboot.usbcontroller=a600000.dwc3 \
92 cgroup.memory=nokmem,nosocket \
Michael Bestasa43ccee2023-08-29 19:42:04 +030093 ip6table_raw.raw_before_defrag=1 \
94 iptable_raw.raw_before_defrag=1 \
Alexander Koskovich744125d2022-04-11 21:13:13 -070095 loop.max_part=7 \
96 lpm_levels.sleep_disabled=1 \
97 msm_rtb.filter=0x237 \
Michael Bestasa43ccee2023-08-29 19:42:04 +030098 pcie_ports=compat \
Alexander Koskovich744125d2022-04-11 21:13:13 -070099 service_locator.enable=1 \
Michael Bestasa43ccee2023-08-29 19:42:04 +0300100 swiotlb=0
Michael Bestas70190bb2024-05-12 08:00:29 +0300101
merothh54856102021-11-04 12:07:41 +0530102BOARD_KERNEL_IMAGE_NAME := Image
Michael Bestas70190bb2024-05-12 08:00:29 +0300103BOARD_KERNEL_SEPARATED_DTBO := true
LuK13375f022ea2022-03-30 00:30:07 +0200104TARGET_KERNEL_CONFIG := vendor/fp5-qgki_defconfig vendor/debugfs.config vendor/fp5.config
Michael Bestasa43ccee2023-08-29 19:42:04 +0300105TARGET_KERNEL_NO_GCC := true
106TARGET_KERNEL_SOURCE := kernel/fairphone/qcm6490
merothh54856102021-11-04 12:07:41 +0530107
Michael Bestas390c82c2023-08-30 03:13:59 +0300108# Kernel modules
Mohammed Siddiqb04dc9d2021-02-12 23:02:52 +0530109BOARD_VENDOR_KERNEL_MODULES_BLOCKLIST_FILE := $(DEVICE_PATH)/modules.blocklist
Michael Bestas2abd9952024-05-12 21:09:20 +0300110BOARD_VENDOR_KERNEL_MODULES_LOAD := $(strip $(shell cat $(DEVICE_PATH)/modules.load))
Michael Bestas58712e72023-09-04 22:48:18 +0300111BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD := $(strip $(shell cat $(DEVICE_PATH)/modules.load.recovery))
112BOOT_KERNEL_MODULES := $(BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD)
Michael Bestas390c82c2023-08-30 03:13:59 +0300113TARGET_MODULE_ALIASES += wlan.ko:qca_cld3_wlan.ko
Erfan Abdidfd36632020-12-18 01:12:50 +0330114
merothh726fc3a2022-01-03 04:59:57 +0530115# Metadata
116BOARD_USES_METADATA_PARTITION := true
117
118# Partitions (Sizes)
Michael Bestas70190bb2024-05-12 08:00:29 +0300119BOARD_FLASH_BLOCK_SIZE := 262144 # (BOARD_KERNEL_PAGESIZE * 64)
120
Michael Bestasccc3bbf2023-11-22 15:51:28 +0200121-include vendor/lineage/config/BoardConfigReservedSize.mk
merothh726fc3a2022-01-03 04:59:57 +0530122BOARD_BOOTIMAGE_PARTITION_SIZE := 100663296
123BOARD_DTBOIMG_PARTITION_SIZE := 25165824
merothh726fc3a2022-01-03 04:59:57 +0530124BOARD_METADATAIMAGE_PARTITION_SIZE := 16777216
Michael Bestas99a5c712023-08-30 21:12:04 +0300125BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 100663296
merothh726fc3a2022-01-03 04:59:57 +0530126BOARD_SUPER_PARTITION_SIZE := 6442450944
Michael Bestas70190bb2024-05-12 08:00:29 +0300127
merothh726fc3a2022-01-03 04:59:57 +0530128BOARD_SUPER_PARTITION_GROUPS := qti_dynamic_partitions
129BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST := odm product system system_ext vendor
130BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := 6438256640
131
merothh726fc3a2022-01-03 04:59:57 +0530132# Partitions (Other)
133BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
134BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
merothh726fc3a2022-01-03 04:59:57 +0530135BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4
Michael Bestas70190bb2024-05-12 08:00:29 +0300136BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
merothh726fc3a2022-01-03 04:59:57 +0530137BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
138TARGET_COPY_OUT_ODM := odm
139TARGET_COPY_OUT_PRODUCT := product
140TARGET_COPY_OUT_SYSTEM_EXT := system_ext
merothh54856102021-11-04 12:07:41 +0530141TARGET_COPY_OUT_VENDOR := vendor
142
merothh750fa002022-01-02 19:42:51 +0530143# Platform
144BOARD_USES_QCOM_HARDWARE := true
Michael Bestas7daa2d42023-08-29 20:12:57 +0300145TARGET_BOARD_PLATFORM := lahaina
merothh750fa002022-01-02 19:42:51 +0530146
Michael Bestas9ab144c2024-05-19 00:51:00 +0300147# Power
148TARGET_TAP_TO_WAKE_NODE := "/sys/devices/platform/goodix_ts.0/gesture/double_en"
149
merothh54856102021-11-04 12:07:41 +0530150# Recovery
Michael Bestas70190bb2024-05-12 08:00:29 +0300151BOARD_INCLUDE_RECOVERY_DTBO := true
Alexander Koskovichea318042022-02-06 23:53:22 -0700152BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT := true
Michael Bestasd4923512024-05-10 02:57:20 +0300153TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/init/fstab.default
merothh54856102021-11-04 12:07:41 +0530154TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
Michael Bestas38331822023-08-30 21:52:11 +0300155TARGET_RECOVERY_UI_MARGIN_HEIGHT := 110
merothh54856102021-11-04 12:07:41 +0530156TARGET_RECOVERY_UI_MARGIN_WIDTH := 10
157TARGET_USERIMAGES_USE_EXT4 := true
158TARGET_USERIMAGES_USE_F2FS := true
merothhacf1dfa2022-01-02 18:21:21 +0530159
Sebastiano Barezzid70ce292021-02-10 22:08:35 +0100160# RIL
161ENABLE_VENDOR_RIL_SERVICE := true
162
merothhacf1dfa2022-01-02 18:21:21 +0530163# Security patch level
Michael Bestas26f3c9d2024-07-16 13:45:52 -0400164BOOT_SECURITY_PATCH := 2024-07-05
165VENDOR_SECURITY_PATCH := 2024-07-05
merothhacf1dfa2022-01-02 18:21:21 +0530166
merothh3b429fa2022-01-03 05:10:38 +0530167# SEPolicy
Bruno Martins67b85492023-10-24 18:12:15 +0100168include device/qcom/sepolicy_vndr/SEPolicy.mk
merothh3b429fa2022-01-03 05:10:38 +0530169BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor
170
merothhbeea4332022-01-03 05:02:03 +0530171# Verified Boot
Michael Bestas3a6ef272024-06-26 10:33:44 +0300172STOCK_SECURITY_PATCH := 2024-06-05 # Latest stock update available
merothhbeea4332022-01-03 05:02:03 +0530173BOARD_AVB_ENABLE := true
Rashed Abdel-Tawab95c87ca2019-09-07 11:13:09 -0700174BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3
merothhbeea4332022-01-03 05:02:03 +0530175BOARD_AVB_VBMETA_SYSTEM := system system_ext product
Michael Bestasf6ee5912023-08-30 21:48:37 +0300176BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA4096
177BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
Michael Bestas78817212024-05-18 11:00:46 +0300178BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(shell date -d 'TZ="GMT" $(STOCK_SECURITY_PATCH)' +%s)
merothhbeea4332022-01-03 05:02:03 +0530179BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 2
180
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100181# Wifi
182BOARD_WLAN_DEVICE := qcwcn
183BOARD_HOSTAPD_DRIVER := NL80211
184BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
Michael Bestas70190bb2024-05-12 08:00:29 +0300185BOARD_WPA_SUPPLICANT_DRIVER := $(BOARD_HOSTAPD_DRIVER)
186BOARD_WPA_SUPPLICANT_PRIVATE_LIB := $(BOARD_HOSTAPD_PRIVATE_LIB)
Mohammad Asaad Akram07f7ba32022-02-28 13:55:13 -0700187BOARD_WPA_SUPPLICANT_PRIVATE_LIB_EVENT := "ON"
Peng Xu80b1cc12017-02-07 15:16:52 -0800188CONFIG_IEEE80211AX := true
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100189WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan"
190WIFI_DRIVER_STATE_OFF := "OFF"
191WIFI_DRIVER_STATE_ON := "ON"
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100192WIFI_HIDL_FEATURE_AWARE := true
Michael Bestas70190bb2024-05-12 08:00:29 +0300193WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
Jimmy Chenacd7fc32019-10-03 11:04:05 +0800194WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100195WPA_SUPPLICANT_VERSION := VER_0_8_X
196
merothhacf1dfa2022-01-02 18:21:21 +0530197# Inherit the proprietary files
Michael Bestas10374532023-08-29 19:41:38 +0300198include vendor/fairphone/FP5/BoardConfigVendor.mk