blob: e57e05c6f05e6d4f05709694503cfbc23fc3b290 [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 Bestas9e3d0d62024-05-28 03:47:26 +03006DEVICE_PATH := device/shift/otter
merothh54856102021-11-04 12:07:41 +05307
Michael Bestas70190bb2024-05-12 08:00:29 +03008# A/B
9AB_OTA_UPDATER := true
10
11AB_OTA_PARTITIONS += \
12 boot \
13 dtbo \
14 odm \
15 product \
Michael Bestas70190bb2024-05-12 08:00:29 +030016 system \
17 system_ext \
18 vbmeta \
19 vbmeta_system \
Michael Bestas99a5c712023-08-30 21:12:04 +030020 vendor \
21 vendor_boot
Michael Bestas70190bb2024-05-12 08:00:29 +030022
merothh54856102021-11-04 12:07:41 +053023# Architecture
24TARGET_ARCH := arm64
Adithya R87d22e12021-01-24 14:02:20 +053025TARGET_ARCH_VARIANT := armv8-2a-dotprod
merothh54856102021-11-04 12:07:41 +053026TARGET_CPU_ABI := arm64-v8a
27TARGET_CPU_ABI2 :=
28TARGET_CPU_VARIANT := cortex-a76
29
30TARGET_2ND_ARCH := arm
31TARGET_2ND_ARCH_VARIANT := armv8-a
32TARGET_2ND_CPU_ABI := armeabi-v7a
33TARGET_2ND_CPU_ABI2 := armeabi
34TARGET_2ND_CPU_VARIANT := cortex-a76
35
merothh750fa002022-01-02 19:42:51 +053036# Audio
37AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true
Rohit7737da62023-03-17 14:44:12 +053038AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
Michael Bestase76ee352023-08-29 22:52:45 +030039AUDIO_FEATURE_ENABLED_GKI := true
merothh750fa002022-01-02 19:42:51 +053040AUDIO_FEATURE_ENABLED_INSTANCE_ID := true
Rohit7737da62023-03-17 14:44:12 +053041AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
merothh750fa002022-01-02 19:42:51 +053042AUDIO_FEATURE_ENABLED_SSR := true
Michael Bestase76ee352023-08-29 22:52:45 +030043AUDIO_FEATURE_ENABLED_SVA_MULTI_STAGE := true
44BOARD_SUPPORTS_OPENSOURCE_STHAL := true
Rohit7737da62023-03-17 14:44:12 +053045BOARD_SUPPORTS_SOUND_TRIGGER := true
46BOARD_USES_ALSA_AUDIO := true
merothh750fa002022-01-02 19:42:51 +053047
Michael Bestasb08b3cc2022-02-16 21:47:07 +020048# Bootloader
Michael Bestas9e3d0d62024-05-28 03:47:26 +030049TARGET_BOOTLOADER_BOARD_NAME := otter
Michael Bestasb08b3cc2022-02-16 21:47:07 +020050
Rohit Sekhar7bd009a2023-09-19 15:51:14 +053051# Camera
52TARGET_CAMERA_OVERRIDE_FORMAT_FROM_RESERVED := true
53
merothh54856102021-11-04 12:07:41 +053054# Display
Luofan Chen4fc24e52023-01-18 23:01:48 +080055TARGET_GRALLOC_HANDLE_HAS_RESERVED_SIZE := true
Michael Bestasb16c8bb2024-05-29 02:00:36 +030056TARGET_SCREEN_DENSITY := 420
merothh7af51cb2022-01-02 20:14:21 +053057TARGET_USES_DISPLAY_RENDER_INTENTS := true
58TARGET_USES_GRALLOC4 := true
59TARGET_USES_HWC2 := true
merothh54856102021-11-04 12:07:41 +053060
merothh1b7e5302022-01-03 00:41:34 +053061# Filesystem
62TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/config.fs
63
Michael Bestasd870a482023-05-04 01:19:43 +030064# GPS
65BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default
Michael Bestasd870a482023-05-04 01:19:43 +030066
merothh74ca26a2022-01-02 19:12:01 +053067# HIDL
68DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
Michael Bestas82cb3f92024-05-12 08:11:39 +030069 $(DEVICE_PATH)/device_framework_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
Michael Bestas502781b2023-08-30 14:18:49 +030072DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/manifest_yupik.xml
Michael Bestas70190bb2024-05-12 08:00:29 +030073DEVICE_MATRIX_FILE := hardware/qcom-caf/common/compatibility_matrix.xml
merothh74ca26a2022-01-02 19:12:01 +053074
merothh54856102021-11-04 12:07:41 +053075# Kernel
Michael Bestasa43ccee2023-08-29 19:42:04 +030076BOARD_BOOT_HEADER_VERSION := 3
Michael Bestas70190bb2024-05-12 08:00:29 +030077BOARD_KERNEL_BASE := 0x00000000
78BOARD_KERNEL_PAGESIZE := 4096
79BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
80
81BOARD_INCLUDE_DTB_IN_BOOTIMG := true
Alexander Koskovich744125d2022-04-11 21:13:13 -070082BOARD_KERNEL_CMDLINE := \
83 androidboot.console=ttyMSM0 \
84 androidboot.hardware=qcom \
85 androidboot.memcg=1 \
86 androidboot.usbcontroller=a600000.dwc3 \
87 cgroup.memory=nokmem,nosocket \
Michael Bestasa43ccee2023-08-29 19:42:04 +030088 ip6table_raw.raw_before_defrag=1 \
89 iptable_raw.raw_before_defrag=1 \
Alexander Koskovich744125d2022-04-11 21:13:13 -070090 loop.max_part=7 \
91 lpm_levels.sleep_disabled=1 \
92 msm_rtb.filter=0x237 \
Michael Bestasa43ccee2023-08-29 19:42:04 +030093 pcie_ports=compat \
Alexander Koskovich744125d2022-04-11 21:13:13 -070094 service_locator.enable=1 \
Michael Bestasa43ccee2023-08-29 19:42:04 +030095 swiotlb=0
Michael Bestas70190bb2024-05-12 08:00:29 +030096
merothh54856102021-11-04 12:07:41 +053097BOARD_KERNEL_IMAGE_NAME := Image
Michael Bestas70190bb2024-05-12 08:00:29 +030098BOARD_KERNEL_SEPARATED_DTBO := true
Michael Bestasd3bda092024-08-31 04:23:45 +030099TARGET_KERNEL_CONFIG := vendor/lahaina-qgki_defconfig vendor/debugfs.config vendor/otter.config
Michael Bestasa43ccee2023-08-29 19:42:04 +0300100TARGET_KERNEL_NO_GCC := true
Michael Bestas9e3d0d62024-05-28 03:47:26 +0300101TARGET_KERNEL_SOURCE := kernel/shift/qcm6490
merothh54856102021-11-04 12:07:41 +0530102
Michael Bestas390c82c2023-08-30 03:13:59 +0300103# Kernel modules
Mohammed Siddiqb04dc9d2021-02-12 23:02:52 +0530104BOARD_VENDOR_KERNEL_MODULES_BLOCKLIST_FILE := $(DEVICE_PATH)/modules.blocklist
Michael Bestas2abd9952024-05-12 21:09:20 +0300105BOARD_VENDOR_KERNEL_MODULES_LOAD := $(strip $(shell cat $(DEVICE_PATH)/modules.load))
Michael Bestas58712e72023-09-04 22:48:18 +0300106BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD := $(strip $(shell cat $(DEVICE_PATH)/modules.load.recovery))
107BOOT_KERNEL_MODULES := $(BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD)
Michael Bestas390c82c2023-08-30 03:13:59 +0300108TARGET_MODULE_ALIASES += wlan.ko:qca_cld3_wlan.ko
Erfan Abdidfd36632020-12-18 01:12:50 +0330109
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 Bestas99a5c712023-08-30 21:12:04 +0300120BOARD_VENDOR_BOOTIMAGE_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
Michael Bestas7daa2d42023-08-29 20:12:57 +0300140TARGET_BOARD_PLATFORM := lahaina
merothh750fa002022-01-02 19:42:51 +0530141
Michael Bestas9ab144c2024-05-19 00:51:00 +0300142# Power
143TARGET_TAP_TO_WAKE_NODE := "/sys/devices/platform/goodix_ts.0/gesture/double_en"
144
merothh54856102021-11-04 12:07:41 +0530145# Recovery
Michael Bestas70190bb2024-05-12 08:00:29 +0300146BOARD_INCLUDE_RECOVERY_DTBO := true
Alexander Koskovichea318042022-02-06 23:53:22 -0700147BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT := true
Michael Bestas9bb5a142024-05-29 00:19:57 +0300148TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/init/fstab.qcom
merothh54856102021-11-04 12:07:41 +0530149TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
Michael Bestasb16c8bb2024-05-29 02:00:36 +0300150TARGET_RECOVERY_UI_MARGIN_HEIGHT := 64
151TARGET_RECOVERY_UI_MARGIN_WIDTH := 32
merothh54856102021-11-04 12:07:41 +0530152TARGET_USERIMAGES_USE_EXT4 := true
153TARGET_USERIMAGES_USE_F2FS := true
merothhacf1dfa2022-01-02 18:21:21 +0530154
Sebastiano Barezzid70ce292021-02-10 22:08:35 +0100155# RIL
156ENABLE_VENDOR_RIL_SERVICE := true
157
merothhacf1dfa2022-01-02 18:21:21 +0530158# Security patch level
Michael Bestas5703ee72024-11-02 03:54:33 +0200159BOOT_SECURITY_PATCH := 2024-10-05
160VENDOR_SECURITY_PATCH := 2024-10-05
merothhacf1dfa2022-01-02 18:21:21 +0530161
merothh3b429fa2022-01-03 05:10:38 +0530162# SEPolicy
Bruno Martins67b85492023-10-24 18:12:15 +0100163include device/qcom/sepolicy_vndr/SEPolicy.mk
merothh3b429fa2022-01-03 05:10:38 +0530164BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor
165
merothhbeea4332022-01-03 05:02:03 +0530166# Verified Boot
Michael Bestas5703ee72024-11-02 03:54:33 +0200167STOCK_SECURITY_PATCH := 2024-10-05 # Latest stock update available
merothhbeea4332022-01-03 05:02:03 +0530168BOARD_AVB_ENABLE := true
Rashed Abdel-Tawab95c87ca2019-09-07 11:13:09 -0700169BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3
merothhbeea4332022-01-03 05:02:03 +0530170BOARD_AVB_VBMETA_SYSTEM := system system_ext product
Michael Bestasf6ee5912023-08-30 21:48:37 +0300171BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA4096
172BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
Michael Bestas78817212024-05-18 11:00:46 +0300173BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(shell date -d 'TZ="GMT" $(STOCK_SECURITY_PATCH)' +%s)
merothhbeea4332022-01-03 05:02:03 +0530174BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 2
175
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100176# Wifi
177BOARD_WLAN_DEVICE := qcwcn
178BOARD_HOSTAPD_DRIVER := NL80211
179BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
Michael Bestas70190bb2024-05-12 08:00:29 +0300180BOARD_WPA_SUPPLICANT_DRIVER := $(BOARD_HOSTAPD_DRIVER)
181BOARD_WPA_SUPPLICANT_PRIVATE_LIB := $(BOARD_HOSTAPD_PRIVATE_LIB)
Mohammad Asaad Akram07f7ba32022-02-28 13:55:13 -0700182BOARD_WPA_SUPPLICANT_PRIVATE_LIB_EVENT := "ON"
Peng Xu80b1cc12017-02-07 15:16:52 -0800183CONFIG_IEEE80211AX := true
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100184WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan"
185WIFI_DRIVER_STATE_OFF := "OFF"
186WIFI_DRIVER_STATE_ON := "ON"
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100187WIFI_HIDL_FEATURE_AWARE := true
Michael Bestas70190bb2024-05-12 08:00:29 +0300188WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
Jimmy Chenacd7fc32019-10-03 11:04:05 +0800189WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
Sebastiano Barezzifd6e1f82021-02-10 22:10:19 +0100190WPA_SUPPLICANT_VERSION := VER_0_8_X
191
merothhacf1dfa2022-01-02 18:21:21 +0530192# Inherit the proprietary files
Michael Bestas9e3d0d62024-05-28 03:47:26 +0300193include vendor/shift/otter/BoardConfigVendor.mk
Alexander Martinzab335912024-12-05 09:12:21 +0100194
195# Include ShiftOS specific BoardConfig if existing
196-include device/shift/otter/shiftos/BoardConfig.mk