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
|
|
|
|
2019-10-20 14:18:30 -04:00
|
|
|
BUILD_BROKEN_DUP_RULES := 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
|
|
|
|
TARGET_ARCH_VARIANT := armv8-a
|
|
|
|
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-07-12 17:47:58 -04:00
|
|
|
#AUDIO_FEATURE_ENABLED_AHAL_EXT := true
|
2020-07-05 17:10:06 -04:00
|
|
|
|
2020-09-15 08:28:55 -04:00
|
|
|
AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true
|
|
|
|
AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
|
|
|
|
BOARD_SUPPORTS_SOUND_TRIGGER := true
|
|
|
|
BOARD_USES_ALSA_AUDIO := true
|
|
|
|
|
2020-07-05 16:56:51 -04:00
|
|
|
# Audio policy
|
|
|
|
USE_CUSTOM_AUDIO_POLICY := 1
|
|
|
|
USE_XML_AUDIO_POLICY_CONF := 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-01-29 13:38:13 -05:00
|
|
|
# Build broken
|
|
|
|
BUILD_BROKEN_USES_BUILD_COPY_HEADERS := true
|
|
|
|
|
2020-07-05 17:21:46 -04:00
|
|
|
# Camera
|
|
|
|
TARGET_USES_QTI_CAMERA_DEVICE := true
|
|
|
|
|
2020-07-05 17:29:02 -04:00
|
|
|
# Dex
|
|
|
|
ifeq ($(HOST_OS),linux)
|
|
|
|
ifneq ($(TARGET_BUILD_VARIANT),eng)
|
|
|
|
WITH_DEXPREOPT ?= true
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2020-07-12 05:34:22 -04:00
|
|
|
# Display
|
|
|
|
TARGET_SCREEN_DENSITY := 440
|
2020-10-19 06:40:15 -04:00
|
|
|
TARGET_USES_HWC2 := true
|
2020-07-12 05:34:22 -04:00
|
|
|
|
2017-08-08 20:15:24 -04:00
|
|
|
# Filesystem
|
|
|
|
TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/config.fs
|
|
|
|
|
2020-08-25 04:39:08 -04:00
|
|
|
# FM
|
|
|
|
AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true
|
|
|
|
BOARD_HAS_QCA_FM_SOC := cherokee
|
|
|
|
BOARD_HAVE_QCOM_FM := true
|
|
|
|
|
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
|
|
|
|
BOARD_KERNEL_TAGS_OFFSET := 0x00000100
|
|
|
|
BOARD_RAMDISK_OFFSET := 0x01000000
|
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)
|
|
|
|
BOARD_INCLUDE_DTB_IN_BOOTIMG := true
|
|
|
|
|
2021-09-03 13:20:02 -04:00
|
|
|
TARGET_KERNEL_ADDITIONAL_FLAGS := DTC_EXT=$(shell pwd)/prebuilts/misc/linux-x86/dtc/dtc LLVM=1
|
2020-07-05 09:06:18 -04:00
|
|
|
TARGET_KERNEL_ARCH := arm64
|
|
|
|
TARGET_KERNEL_CLANG_COMPILE := true
|
2021-09-03 13:20:02 -04:00
|
|
|
TARGET_KERNEL_CONFIG := vendor/venus-qgki_defconfig
|
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 += lpm_levels.sleep_disabled=1
|
|
|
|
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
|
|
|
BOARD_KERNEL_CMDLINE += video=vfb:640x400,bpp=32,memsize=3072000
|
2020-07-12 05:57:02 -04:00
|
|
|
BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
|
2020-07-05 09:06:18 -04:00
|
|
|
|
2019-08-02 11:59:49 -04:00
|
|
|
# HIDL
|
|
|
|
DEVICE_MANIFEST_FILE := $(COMMON_PATH)/manifest.xml
|
2017-07-12 08:02:34 -04:00
|
|
|
DEVICE_MATRIX_FILE := $(COMMON_PATH)/compatibility_matrix.xml
|
2019-08-02 11:59:49 -04:00
|
|
|
|
2020-07-18 07:24:40 -04:00
|
|
|
# Media
|
|
|
|
TARGET_USES_ION := true
|
2020-02-02 08:21:16 -05:00
|
|
|
TARGET_DISABLED_UBWC := true
|
2020-07-18 07:24:40 -04:00
|
|
|
|
2020-07-05 18:39:16 -04:00
|
|
|
# Partitions
|
2021-09-03 13:21:54 -04:00
|
|
|
BOARD_BOOTIMAGE_PARTITION_SIZE := 201326592
|
2020-07-05 18:39:16 -04:00
|
|
|
BOARD_DTBOIMG_PARTITION_SIZE := 8388608
|
2021-09-03 13:21:54 -04:00
|
|
|
BOARD_SUPER_PARTITION_SIZE := 9126805504
|
2020-07-05 18:39:16 -04:00
|
|
|
BOARD_USERDATAIMAGE_PARTITION_SIZE := 112421842944
|
2021-09-03 13:21:54 -04:00
|
|
|
BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 100663296
|
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
|
|
|
|
|
2021-09-03 13:21:54 -04:00
|
|
|
BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true
|
|
|
|
|
2020-07-05 18:39:16 -04:00
|
|
|
BOARD_USES_METADATA_PARTITION := true
|
|
|
|
|
|
|
|
BOARD_FLASH_BLOCK_SIZE := 131072
|
|
|
|
|
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
|
|
|
|
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_PRODUCT_PROP += $(COMMON_PATH)/product.prop
|
|
|
|
TARGET_SYSTEM_PROP += $(COMMON_PATH)/system.prop
|
|
|
|
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
|
|
|
|
BOARD_USES_RECOVERY_AS_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
|
|
|
|
TARGET_USES_MKE2FS := true
|
|
|
|
|
2019-04-28 15:23:26 -04:00
|
|
|
# Releasetools
|
|
|
|
TARGET_RELEASETOOLS_EXTENSIONS := $(COMMON_PATH)
|
|
|
|
|
2020-10-19 19:38:54 -04:00
|
|
|
# RenderScript
|
|
|
|
OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
|
|
|
|
|
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
|
2021-09-03 13:18:46 -04:00
|
|
|
VENDOR_SECURITY_PATCH := 2021-07-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
|
|
|
|
2020-07-05 19:25:50 -04:00
|
|
|
BOARD_PLAT_PRIVATE_SEPOLICY_DIR += $(COMMON_PATH)/sepolicy/private
|
|
|
|
BOARD_PLAT_PUBLIC_SEPOLICY_DIR += $(COMMON_PATH)/sepolicy/public
|
|
|
|
BOARD_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/vendor
|
|
|
|
|
2018-06-27 21:14:43 -04:00
|
|
|
# Verified Boot
|
|
|
|
BOARD_AVB_ENABLE := true
|
|
|
|
BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --set_hashtree_disabled_flag
|
|
|
|
BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 2
|
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
|
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
|
|
|
|
WIFI_DRIVER_DEFAULT := qca_cld3
|
|
|
|
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
|
2021-08-29 05:22:31 -04:00
|
|
|
-include vendor/xiaomi/sm8350-common/BoardConfigVendor.mk
|