P treble configuraton相关的配置

P treble configuraton:

  • The project MTK will release is New Launch in Android P, so the default configuration in the release will be New Launch in Android P
  • Need to change to OTA (O to P) configuration for Upgrade to Android P project

Topic New launch in Android P (by default) OTA (O to P)
Overall config device/mediatek/common/device.mk
PRODUCT_SHIPPING_API_LEVEL := 28
device/mediatekprojects/[PROJ]/device.mk
PRODUCT_SHIPPING_API_LEVEL_OVERRIDE := 26
VNDK enforcement Enabled by default when we set PRODUCT_SHIPPING_API_LEVEL as 28 Can support and can enable by setting following config
device/mediatekprojects/[PROJ]/device.mk
BOARD_VNDK_VERSION := current
System property compatibility Enabled by default when we set PRODUCT_SHIPPING_API_LEVEL as 28 Cannot support and need to disable
device/mediatekprojects/[PROJ]/device.mk
PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE := false
System SDK Enabled by default when we set PRODUCT_SHIPPING_API_LEVEL as 28 Can support and can enable by setting following config
device/mediatekprojects/[PROJ]/device.mk
BOARD_SYSTEMSDK_VERSIONS := 28
HIDL Set initial Android version as P and use device/mediatek/common/manifest_target_level_p.xml when we set PRODUCT_SHIPPING_API_LEVEL as 28 Set initial Android version as O and use device/mediatek/common/manifest_target_level_o.xml when we set PRODUCT_SHIPPING_API_LEVEL_OVERRIDE as 26
System as root

Note: kernel-4.4 should enable DM_ANDROID_VERITY and kernel-4.9 should enable AVB2.0

vendor/mediatek/proprietary/bootable/bootloader/lk/project/${PROJ}.mk SYSTEM_AS_ROOT = yeskernel-4.4 platform
kernel-4.4/drivers/misc/mediatek/Kconfig
SYSTEM_AS_ROOT default y
MTK_GROUP_ENABLE_VERITY default y

kernel-4.9 platform
kernel-4.9/drivers/misc/mediatek/Kconfig
SYSTEM_AS_ROOT default y
kernel-4.9/drivers/misc/mediatek/masp/Kconfig
MTK_AVB20_SUPPORT default y
device/mediatek/common/device.mk
MAIN_VBMETA_IN_BOOT := no
BOARD_AVB_ENABLE := true
vendor/mediatek/proprietary/bootable/bootloader/lk/platform/[PLAT]/rules.mk
MTK_AVB20_SUPPORT:=yes

Can support and can enable by setting following config
device/mediatekprojects/[PROJ]/ProjectConfig.mk
SYSTEM_AS_ROOT = yesvendor/mediatek/proprietary/bootable/bootloader/lk/project/${PROJ}.mk
SYSTEM_AS_ROOT = yes

kernel-4.4 platform
kernel-4.4/drivers/misc/mediatek/Kconfig

SYSTEM_AS_ROOT default y
MTK_GROUP_ENABLE_VERITY default y

kernel-4.9 platform
kernel-4.9/drivers/misc/mediatek/Kconfig
SYSTEM_AS_ROOT default y kernel-4.9/drivers/misc/mediatek/masp/Kconfig
MTK_AVB20_SUPPORT default y
device/mediatek/common/device.mk
MAIN_VBMETA_IN_BOOT := yes
BOARD_AVB_ENABLE := true
vendor/mediatek/proprietary/bootable/bootloader/lk/platform/[PLAT]/rules.mk
MTK_AVB20_SUPPORT:=yes
device/mediatekprojects/[PROJ]/device.mk
BOARD_OTA_FRAMEWORK_VBMETA_VERSION_OVERRIDE := 0.0

Additional setting if project already enabled AVB2.0 in O:
device/mediatekprojects/[PROJ]/ProjectConfig.mk
MAIN_VBMETA_IN_BOOT_OVERRIDE := no

64-bit binder Should support in both 32-bit and 64-bit project
devide/mediatek/[PLAT]/BoardConfig.mk
TARGET_USES_64_BIT_BINDER := truekernel-4.4/drivers/misc/mediatek/Kconfig

kernel-4.9/drivers/misc/mediatek/Kconfig

ANDROID_BINDER_IPC_32BIT default n

Can support and can enable by setting following config
devide/mediatek/[PLAT]/BoardConfig.mk
TARGET_USES_64_BIT_BINDER := truekernel-4.4/drivers/misc/mediatek/Kconfig
kernel-4.9/drivers/misc/mediatek/Kconfig

ANDROID_BINDER_IPC_32BIT default n

作者: RESSRC

个人资源站

发表评论

邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据