2020-07-05 08:25:24 -04:00
|
|
|
#
|
|
|
|
# Copyright (C) 2020 The LineageOS Project
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
#
|
|
|
|
|
2021-08-29 05:22:31 -04:00
|
|
|
COMMON_PATH := device/xiaomi/sm8350-common
|
2020-07-05 08:37:56 -04:00
|
|
|
|
2020-05-13 19:56:10 -04:00
|
|
|
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
|
|
|
|
|
2019-02-22 10:38:22 -05:00
|
|
|
# APEX image
|
|
|
|
DEXPREOPT_GENERATE_APEX_IMAGE := true
|
|
|
|
|
2021-09-03 13:18:06 -04:00
|
|
|
# A/B
|
|
|
|
AB_OTA_UPDATER := true
|
|
|
|
|
|
|
|
AB_OTA_PARTITIONS += \
|
|
|
|
boot \
|
|
|
|
dtbo \
|
|
|
|
odm \
|
|
|
|
product \
|
|
|
|
system \
|
|
|
|
system_ext \
|
|
|
|
vbmeta \
|
|
|
|
vbmeta_system \
|
|
|
|
vendor \
|
|
|
|
vendor_boot
|
|
|
|
|
2020-07-05 08:37:56 -04:00
|
|
|
# Architecture
|
|
|
|
TARGET_ARCH := arm64
|
2021-12-11 19:55:24 -05:00
|
|
|
TARGET_ARCH_VARIANT := armv8-2a
|
2020-07-05 08:37:56 -04:00
|
|
|
TARGET_CPU_ABI := arm64-v8a
|
|
|
|
TARGET_CPU_ABI2 :=
|
|
|
|
TARGET_CPU_VARIANT := generic
|
2021-09-03 13:18:06 -04:00
|
|
|
TARGET_CPU_VARIANT_RUNTIME := kryo385
|
2020-07-05 08:37:56 -04:00
|
|
|
|
|
|
|
TARGET_2ND_ARCH := arm
|
2019-10-30 09:16:14 -04:00
|
|
|
TARGET_2ND_ARCH_VARIANT := armv8-a
|
2020-07-05 08:37:56 -04:00
|
|
|
TARGET_2ND_CPU_ABI := armeabi-v7a
|
|
|
|
TARGET_2ND_CPU_ABI2 := armeabi
|
2019-10-30 09:16:14 -04:00
|
|
|
TARGET_2ND_CPU_VARIANT := generic
|
2021-09-03 13:18:06 -04:00
|
|
|
TARGET_2ND_CPU_VARIANT_RUNTIME := kryo385
|
2020-07-05 08:38:57 -04:00
|
|
|
|
2020-07-05 17:10:06 -04:00
|
|
|
# Audio
|
|
|
|
AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true
|
|
|
|
AUDIO_FEATURE_ENABLED_HDMI_SPK := true
|
|
|
|
AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
|
|
|
|
|
2020-09-15 08:28:55 -04:00
|
|
|
AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true
|
2021-08-29 13:01:29 -04:00
|
|
|
AUDIO_FEATURE_ENABLED_GKI := true
|
2020-09-15 08:28:55 -04:00
|
|
|
BOARD_SUPPORTS_SOUND_TRIGGER := true
|
|
|
|
|
2020-07-05 16:56:51 -04:00
|
|
|
# Audio policy
|
|
|
|
USE_CUSTOM_AUDIO_POLICY := 1
|
|
|
|
|
2018-06-30 05:49:31 -04:00
|
|
|
# Bluetooth
|
|
|
|
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(COMMON_PATH)/bluetooth/include
|
2020-11-11 20:36:09 -05:00
|
|
|
TARGET_USE_QTI_BT_STACK := true
|
2018-06-30 05:49:31 -04:00
|
|
|
|
2020-07-05 08:48:09 -04:00
|
|
|
# Bootloader
|
|
|
|
TARGET_NO_BOOTLOADER := true
|
|
|
|
|
2020-07-12 05:34:22 -04:00
|
|
|
# Display
|
|
|
|
TARGET_SCREEN_DENSITY := 440
|
|
|
|
|
2017-08-08 20:15:24 -04:00
|
|
|
# Filesystem
|
|
|
|
TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/config.fs
|
|
|
|
|
2022-03-07 08:00:40 -05:00
|
|
|
# GPS
|
|
|
|
BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default
|
|
|
|
LOC_HIDL_VERSION := 4.0
|
|
|
|
|
2022-03-07 07:54:43 -05:00
|
|
|
# HIDL
|
|
|
|
DEVICE_MATRIX_FILE := $(COMMON_PATH)/hidl/compatibility_matrix.xml
|
|
|
|
|
|
|
|
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
|
|
|
|
$(COMMON_PATH)/hidl/vendor_framework_compatibility_matrix.xml \
|
|
|
|
$(COMMON_PATH)/hidl/xiaomi_framework_compatibility_matrix.xml \
|
|
|
|
vendor/lineage/config/device_framework_matrix.xml
|
|
|
|
|
|
|
|
DEVICE_MANIFEST_FILE := \
|
|
|
|
$(COMMON_PATH)/hidl/manifest_lahaina.xml \
|
|
|
|
$(COMMON_PATH)/hidl/manifest_lineage.xml \
|
|
|
|
$(COMMON_PATH)/hidl/manifest_xiaomi.xml
|
|
|
|
|
2020-07-05 09:06:18 -04:00
|
|
|
# Kernel
|
|
|
|
BOARD_KERNEL_BASE := 0x00000000
|
2021-09-03 13:20:02 -04:00
|
|
|
BOARD_KERNEL_IMAGE_NAME := Image
|
2020-07-05 09:06:18 -04:00
|
|
|
BOARD_KERNEL_PAGESIZE := 4096
|
|
|
|
BOARD_KERNEL_SEPARATED_DTBO := true
|
2020-07-17 22:02:31 -04:00
|
|
|
|
2021-09-03 13:20:02 -04:00
|
|
|
BOARD_BOOT_HEADER_VERSION := 3
|
2020-07-17 22:02:31 -04:00
|
|
|
BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
|
|
|
|
|
2022-06-15 23:03:02 -04:00
|
|
|
TARGET_KERNEL_ADDITIONAL_FLAGS := TARGET_PRODUCT=$(PRODUCT_DEVICE)
|
2021-08-29 05:22:31 -04:00
|
|
|
TARGET_KERNEL_SOURCE := kernel/xiaomi/sm8350
|
2020-07-05 09:06:18 -04:00
|
|
|
|
|
|
|
BOARD_KERNEL_CMDLINE += androidboot.console=ttyMSM0
|
|
|
|
BOARD_KERNEL_CMDLINE += androidboot.hardware=qcom
|
|
|
|
BOARD_KERNEL_CMDLINE += androidboot.memcg=1
|
|
|
|
BOARD_KERNEL_CMDLINE += androidboot.usbcontroller=a600000.dwc3
|
|
|
|
BOARD_KERNEL_CMDLINE += cgroup.memory=nokmem,nosocket
|
|
|
|
BOARD_KERNEL_CMDLINE += console=ttyMSM0,115200n8
|
|
|
|
BOARD_KERNEL_CMDLINE += loop.max_part=7
|
|
|
|
BOARD_KERNEL_CMDLINE += msm_rtb.filter=0x237
|
|
|
|
BOARD_KERNEL_CMDLINE += service_locator.enable=1
|
2021-09-03 13:20:02 -04:00
|
|
|
BOARD_KERNEL_CMDLINE += swiotlb=0
|
|
|
|
BOARD_KERNEL_CMDLINE += pcie_ports=compat
|
|
|
|
BOARD_KERNEL_CMDLINE += iptable_raw.raw_before_defrag=1
|
|
|
|
BOARD_KERNEL_CMDLINE += ip6table_raw.raw_before_defrag=1
|
2020-07-05 09:06:18 -04:00
|
|
|
|
2020-07-05 18:39:16 -04:00
|
|
|
# Partitions
|
2021-12-11 20:01:10 -05:00
|
|
|
BOARD_FLASH_BLOCK_SIZE := 131072
|
2021-09-03 13:21:54 -04:00
|
|
|
BOARD_BOOTIMAGE_PARTITION_SIZE := 201326592
|
|
|
|
BOARD_SUPER_PARTITION_SIZE := 9126805504
|
|
|
|
BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 100663296
|
2021-12-11 20:01:10 -05:00
|
|
|
BOARD_USES_METADATA_PARTITION := true
|
2020-07-05 18:39:16 -04:00
|
|
|
|
|
|
|
BOARD_SUPER_PARTITION_GROUPS := qti_dynamic_partitions
|
2021-09-03 13:21:54 -04:00
|
|
|
BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST := odm system system_ext vendor product
|
|
|
|
BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := 9122611200 # BOARD_SUPER_PARTITION_SIZE - 4MB
|
2020-07-05 18:39:16 -04:00
|
|
|
|
2021-09-03 13:21:54 -04:00
|
|
|
BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
|
2020-07-05 18:39:16 -04:00
|
|
|
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
|
2020-10-09 04:59:27 -04:00
|
|
|
BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
|
2020-07-05 18:39:16 -04:00
|
|
|
BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4
|
|
|
|
BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := f2fs
|
|
|
|
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
|
|
|
|
|
2020-12-01 05:46:52 -05:00
|
|
|
ifeq ($(WITH_GMS),true)
|
|
|
|
BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE := 104857600
|
|
|
|
BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 104857600
|
|
|
|
else
|
2020-09-07 17:56:46 -04:00
|
|
|
BOARD_PRODUCTIMAGE_EXTFS_INODE_COUNT := -1
|
|
|
|
BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE := 1887436800
|
|
|
|
BOARD_SYSTEMIMAGE_EXTFS_INODE_COUNT := -1
|
|
|
|
BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 1887436800
|
2020-12-01 05:46:52 -05:00
|
|
|
endif
|
|
|
|
BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE := 104857600
|
2020-07-15 14:01:05 -04:00
|
|
|
BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE := 104857600
|
|
|
|
|
2021-09-03 13:21:54 -04:00
|
|
|
TARGET_COPY_OUT_ODM := odm
|
2020-10-09 04:59:27 -04:00
|
|
|
TARGET_COPY_OUT_SYSTEM_EXT := system_ext
|
2020-07-05 18:39:16 -04:00
|
|
|
TARGET_COPY_OUT_VENDOR := vendor
|
|
|
|
TARGET_COPY_OUT_PRODUCT := product
|
|
|
|
|
2020-07-05 08:38:57 -04:00
|
|
|
# Platform
|
2021-08-29 07:06:09 -04:00
|
|
|
TARGET_BOARD_PLATFORM := lahaina
|
2019-08-08 23:46:39 -04:00
|
|
|
|
2021-09-17 12:22:53 -04:00
|
|
|
# Power
|
2021-11-05 11:44:55 -04:00
|
|
|
TARGET_POWERHAL_MODE_EXT := $(COMMON_PATH)/power/power-mode.cpp
|
2021-09-17 12:22:53 -04:00
|
|
|
|
2020-07-05 19:10:57 -04:00
|
|
|
# Properties
|
2020-07-18 11:23:51 -04:00
|
|
|
TARGET_ODM_PROP += $(COMMON_PATH)/odm.prop
|
2020-07-05 19:10:57 -04:00
|
|
|
TARGET_SYSTEM_PROP += $(COMMON_PATH)/system.prop
|
2021-09-07 04:57:49 -04:00
|
|
|
TARGET_SYSTEM_EXT_PROP += $(COMMON_PATH)/system_ext.prop
|
2020-07-05 19:10:57 -04:00
|
|
|
TARGET_VENDOR_PROP += $(COMMON_PATH)/vendor.prop
|
|
|
|
|
2019-08-08 23:46:39 -04:00
|
|
|
# QCOM
|
2020-07-18 06:05:11 -04:00
|
|
|
BOARD_USES_QCOM_HARDWARE := true
|
2020-05-24 23:15:11 -04:00
|
|
|
TARGET_FWK_SUPPORTS_FULL_VALUEADDS := true
|
2019-07-21 08:02:26 -04:00
|
|
|
|
2020-07-05 19:51:49 -04:00
|
|
|
# Recovery
|
2021-09-03 13:23:13 -04:00
|
|
|
BOARD_INCLUDE_DTB_IN_BOOTIMG := true
|
2022-02-07 01:53:22 -05:00
|
|
|
BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT := true
|
2020-07-05 20:08:40 -04:00
|
|
|
TARGET_RECOVERY_FSTAB := $(COMMON_PATH)/rootdir/etc/fstab.qcom
|
2020-07-05 19:51:49 -04:00
|
|
|
TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
|
|
|
|
TARGET_USERIMAGES_USE_EXT4 := true
|
|
|
|
TARGET_USERIMAGES_USE_F2FS := true
|
|
|
|
|
2019-07-31 19:11:51 -04:00
|
|
|
# RIL
|
|
|
|
ENABLE_VENDOR_RIL_SERVICE := true
|
|
|
|
|
2019-07-21 08:02:26 -04:00
|
|
|
# Security patch level
|
2022-02-17 19:12:28 -05:00
|
|
|
VENDOR_SECURITY_PATCH := 2021-10-01
|
2018-06-27 21:14:43 -04:00
|
|
|
|
2020-07-05 19:25:42 -04:00
|
|
|
# Sepolicy
|
2020-05-20 00:23:29 -04:00
|
|
|
include device/qcom/sepolicy_vndr/SEPolicy.mk
|
2020-07-05 19:25:42 -04:00
|
|
|
|
2021-10-07 15:04:41 -04:00
|
|
|
SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/private
|
|
|
|
SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/public
|
2019-05-28 08:05:51 -04:00
|
|
|
BOARD_VENDOR_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/vendor
|
2020-07-05 19:25:50 -04:00
|
|
|
|
2022-02-24 12:40:09 -05:00
|
|
|
# Soong
|
|
|
|
SOONG_CONFIG_NAMESPACES += xiaomiSm8350Vars
|
|
|
|
SOONG_CONFIG_xiaomiSm8350Vars += \
|
2020-05-18 13:04:57 -04:00
|
|
|
fingerprint_use_extension \
|
2022-02-24 12:40:09 -05:00
|
|
|
vibrator_use_effect_stream
|
2020-05-18 13:04:57 -04:00
|
|
|
SOONG_CONFIG_xiaomiSm8350Vars_fingerprint_use_extension ?= false
|
2022-02-24 12:40:09 -05:00
|
|
|
SOONG_CONFIG_xiaomiSm8350Vars_vibrator_use_effect_stream ?= false
|
|
|
|
|
2018-06-27 21:14:43 -04:00
|
|
|
# Verified Boot
|
|
|
|
BOARD_AVB_ENABLE := true
|
2021-05-09 16:04:34 -04:00
|
|
|
BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3
|
2018-03-01 21:50:06 -05:00
|
|
|
BOARD_AVB_RECOVERY_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
|
|
|
|
BOARD_AVB_RECOVERY_ALGORITHM := SHA256_RSA2048
|
|
|
|
BOARD_AVB_RECOVERY_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
|
|
|
|
BOARD_AVB_RECOVERY_ROLLBACK_INDEX_LOCATION := 1
|
2021-09-03 13:23:58 -04:00
|
|
|
BOARD_AVB_VBMETA_SYSTEM := system system_ext product
|
2018-06-27 21:14:43 -04:00
|
|
|
BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
|
|
|
|
BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048
|
|
|
|
BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
|
|
|
|
BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 1
|
2022-02-07 02:22:22 -05:00
|
|
|
BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT := true
|
2020-07-05 19:33:40 -04:00
|
|
|
|
2020-08-18 07:56:37 -04:00
|
|
|
# WiFi
|
|
|
|
BOARD_WLAN_DEVICE := qcwcn
|
|
|
|
BOARD_HOSTAPD_DRIVER := NL80211
|
|
|
|
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
|
|
|
|
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
|
|
|
|
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
|
|
|
|
QC_WIFI_HIDL_FEATURE_DUAL_AP := true
|
2021-09-05 05:27:45 -04:00
|
|
|
WIFI_DRIVER_DEFAULT := wlan
|
2020-08-18 07:56:37 -04:00
|
|
|
WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan"
|
|
|
|
WIFI_DRIVER_STATE_OFF := "OFF"
|
|
|
|
WIFI_DRIVER_STATE_ON := "ON"
|
|
|
|
WIFI_HIDL_FEATURE_AWARE := true
|
|
|
|
WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
|
2019-10-02 23:06:25 -04:00
|
|
|
WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
|
2020-08-18 07:56:37 -04:00
|
|
|
WPA_SUPPLICANT_VERSION := VER_0_8_X
|
|
|
|
|
2020-07-05 19:33:40 -04:00
|
|
|
# Inherit proprietary blobs
|
2017-04-18 03:22:49 -04:00
|
|
|
include vendor/xiaomi/sm8350-common/BoardConfigVendor.mk
|