BoardConfigCommon.mk 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. #
  2. # Copyright (C) 2022 The LineageOS Project
  3. #
  4. # SPDX-License-Identifier: Apache-2.0
  5. #
  6. # Inherit from the proprietary version
  7. include vendor/xiaomi/sm8450-common/BoardConfigVendor.mk
  8. COMMON_PATH := device/xiaomi/sm8450-common
  9. # A/B
  10. AB_OTA_UPDATER := true
  11. AB_OTA_PARTITIONS += \
  12. boot \
  13. dtbo \
  14. odm \
  15. product \
  16. recovery \
  17. system \
  18. system_ext \
  19. vbmeta \
  20. vbmeta_system \
  21. vendor \
  22. vendor_boot \
  23. vendor_dlkm
  24. # Architecture
  25. TARGET_ARCH := arm64
  26. TARGET_ARCH_VARIANT := armv8-a-branchprot
  27. TARGET_CPU_ABI := arm64-v8a
  28. TARGET_CPU_ABI2 :=
  29. TARGET_CPU_VARIANT := kryo300
  30. TARGET_2ND_ARCH := arm
  31. TARGET_2ND_ARCH_VARIANT := armv8-2a
  32. TARGET_2ND_CPU_ABI := armeabi-v7a
  33. TARGET_2ND_CPU_ABI2 := armeabi
  34. TARGET_2ND_CPU_VARIANT := cortex-a75
  35. # Audio
  36. $(call soong_config_set, android_hardware_audio, run_64bit, true)
  37. AUDIO_FEATURE_ENABLED_DLKM := true
  38. AUDIO_FEATURE_ENABLED_DTS_EAGLE := false
  39. AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
  40. AUDIO_FEATURE_ENABLED_HW_ACCELERATED_EFFECTS := false
  41. AUDIO_FEATURE_ENABLED_INSTANCE_ID := true
  42. AUDIO_FEATURE_ENABLED_LSM_HIDL := true
  43. AUDIO_FEATURE_ENABLED_PAL_HIDL := true
  44. AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
  45. TARGET_USES_QCOM_MM_AUDIO := true
  46. # Boot control
  47. $(call soong_config_set, ufsbsg, ufsframework, bsg)
  48. # Bootloader
  49. TARGET_BOOTLOADER_BOARD_NAME := taro
  50. TARGET_NO_BOOTLOADER := true
  51. # Camera
  52. TARGET_CAMERA_OVERRIDE_FORMAT_FROM_RESERVED := true
  53. # Display
  54. TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS := true
  55. TARGET_GRALLOC_HANDLE_HAS_CUSTOM_CONTENT_MD_RESERVED_SIZE := false
  56. TARGET_GRALLOC_HANDLE_HAS_RESERVED_SIZE := false
  57. TARGET_USES_DISPLAY_RENDER_INTENTS := true
  58. TARGET_USES_GRALLOC4 := true
  59. TARGET_USES_HWC2 := true
  60. MAX_VIRTUAL_DISPLAY_DIMENSION := 4096
  61. NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
  62. # Filesystem
  63. TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/configs/config.fs
  64. # Metadata
  65. BOARD_USES_METADATA_PARTITION := true
  66. # Partitions
  67. BOARD_FLASH_BLOCK_SIZE := 0x020000 # (BOARD_KERNEL_PAGESIZE * 64)
  68. BOARD_BOOTIMAGE_PARTITION_SIZE := 0x0C000000
  69. BOARD_DTBOIMG_PARTITION_SIZE := 0x01800000
  70. BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x06400000
  71. BOARD_SUPER_PARTITION_SIZE := 9126805504 # 0x220000000
  72. BOARD_USERDATAIMAGE_PARTITION_SIZE := 239033364480 # 0x37A77FB000
  73. BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 0x06000000
  74. BOARD_SUPER_PARTITION_GROUPS := qti_dynamic_partitions
  75. BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST := odm product system system_ext vendor vendor_dlkm
  76. BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := 9122611200 # 0x21FC00000 # BOARD_SUPER_PARTITION_SIZE - overhead (4MiB)
  77. BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
  78. BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
  79. BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4
  80. BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
  81. BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
  82. BOARD_VENDOR_DLKMIMAGE_FILE_SYSTEM_TYPE := ext4
  83. TARGET_COPY_OUT_ODM := odm
  84. TARGET_COPY_OUT_PRODUCT := product
  85. TARGET_COPY_OUT_SYSTEM_EXT := system_ext
  86. TARGET_COPY_OUT_VENDOR := vendor
  87. TARGET_COPY_OUT_VENDOR_DLKM := vendor_dlkm
  88. # Platform
  89. BOARD_USES_QCOM_HARDWARE := true
  90. TARGET_BOARD_PLATFORM := taro
  91. # Power
  92. TARGET_POWERHAL_MODE_EXT := $(COMMON_PATH)/power/power-mode.cpp
  93. # Properties
  94. TARGET_ODM_PROP += $(COMMON_PATH)/properties/odm.prop
  95. TARGET_PRODUCT_PROP += $(COMMON_PATH)/properties/product.prop
  96. TARGET_SYSTEM_PROP += $(COMMON_PATH)/properties/system.prop
  97. TARGET_SYSTEM_EXT_PROP += $(COMMON_PATH)/properties/system_ext.prop
  98. TARGET_VENDOR_PROP += $(COMMON_PATH)/properties/vendor.prop
  99. # Recovery
  100. TARGET_RECOVERY_FSTAB := $(COMMON_PATH)/rootdir/etc/recovery.fstab
  101. TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
  102. TARGET_USERIMAGES_USE_EXT4 := true
  103. TARGET_USERIMAGES_USE_F2FS := true
  104. BOARD_EXCLUDE_KERNEL_FROM_RECOVERY_IMAGE := true
  105. # RIL
  106. ENABLE_VENDOR_RIL_SERVICE := true
  107. # Sepolicy
  108. include device/qcom/sepolicy_vndr/SEPolicy.mk
  109. SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/private
  110. SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/public
  111. BOARD_VENDOR_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/vendor
  112. # VINTF
  113. DEVICE_MATRIX_FILE := $(COMMON_PATH)/vintf/compatibility_matrix.xml
  114. DEVICE_MANIFEST_SKUS := taro diwali cape ukee
  115. $(foreach sku, $(call to-upper, $(DEVICE_MANIFEST_SKUS)), \
  116. $(eval DEVICE_MANIFEST_$(sku)_FILES := \
  117. $(COMMON_PATH)/vintf/manifest.xml \
  118. $(COMMON_PATH)/vintf/manifest_xiaomi.xml \
  119. ))
  120. DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
  121. $(COMMON_PATH)/vintf/xiaomi_framework_compatibility_matrix.xml \
  122. hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml \
  123. hardware/xiaomi/vintf/xiaomi_framework_compatibility_matrix.xml \
  124. vendor/lineage/config/device_framework_matrix.xml
  125. # Verified Boot
  126. BOARD_AVB_ENABLE := true
  127. BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3
  128. BOARD_AVB_RECOVERY_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
  129. BOARD_AVB_RECOVERY_ALGORITHM := SHA256_RSA2048
  130. BOARD_AVB_RECOVERY_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
  131. BOARD_AVB_RECOVERY_ROLLBACK_INDEX_LOCATION := 1
  132. BOARD_AVB_VBMETA_SYSTEM := system system_ext product
  133. BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
  134. BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048
  135. BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
  136. BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 2
  137. BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT := true
  138. # WiFi
  139. BOARD_WLAN_DEVICE := qcwcn
  140. BOARD_HOSTAPD_DRIVER := NL80211
  141. BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
  142. BOARD_WPA_SUPPLICANT_DRIVER := NL80211
  143. BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
  144. QC_WIFI_HIDL_FEATURE_DUAL_AP := true
  145. QC_WIFI_HIDL_FEATURE_DUAL_STA := true
  146. WIFI_DRIVER_BUILT := qca_cld3
  147. WIFI_DRIVER_DEFAULT := qca_cld3
  148. WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan"
  149. WIFI_DRIVER_STATE_OFF := "OFF"
  150. WIFI_DRIVER_STATE_ON := "ON"
  151. WIFI_HIDL_FEATURE_AWARE := true
  152. WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
  153. WPA_SUPPLICANT_VERSION := VER_0_8_X