soong: Allow to specify device specific cryptfs_hw module

Change-Id: Ia0a00afd6952caadfcf0f276277569510faba7b6
This commit is contained in:
me-cafebabe
2022-06-12 04:06:32 +08:00
committed by bigbiff
parent d5e5381746
commit bf884c9089
2 changed files with 25 additions and 3 deletions
+11 -3
View File
@@ -88,6 +88,7 @@ soong_config_module_type {
module_type: "cc_defaults",
config_namespace: "twrpGlobalVars",
bool_variables: ["supports_hw_fde"],
value_variables: ["hw_fde_cryptfs_hw_header_lib_name", "hw_fde_cryptfs_hw_shared_lib_name"],
properties: [
"cflags",
"header_libs",
@@ -100,8 +101,12 @@ vold_hw_fde {
soong_config_variables: {
supports_hw_fde: {
cflags: ["-DCONFIG_HW_DISK_ENCRYPTION"],
header_libs: ["libcryptfs_hw_headers"],
shared_libs: ["libcryptfs_hw"],
},
hw_fde_cryptfs_hw_header_lib_name: {
header_libs: ["%s"],
},
hw_fde_cryptfs_hw_shared_lib_name: {
shared_libs: ["%s"],
},
},
}
@@ -111,6 +116,7 @@ soong_config_module_type {
module_type: "cc_defaults",
config_namespace: "twrpGlobalVars",
bool_variables: ["supports_hw_fde_perf"],
value_variables: ["hw_fde_cryptfs_hw_shared_lib_name"],
properties: [
"cflags",
"shared_libs",
@@ -122,7 +128,9 @@ vold_hw_fde_perf {
soong_config_variables: {
supports_hw_fde_perf: {
cflags: ["-DCONFIG_HW_DISK_ENCRYPT_PERF"],
shared_libs: ["libcryptfs_hw"],
},
hw_fde_cryptfs_hw_shared_lib_name: {
shared_libs: ["%s"],
},
},
}
+14
View File
@@ -33,11 +33,25 @@ SOONG_CONFIG_twrpGlobalVars += \
supports_hw_fde \
supports_hw_fde_perf
ifeq ($(TARGET_HW_DISK_ENCRYPTION),true)
SOONG_CONFIG_twrpGlobalVars += \
hw_fde_cryptfs_hw_header_lib_name \
hw_fde_cryptfs_hw_shared_lib_name
endif
# Soong bool variables
SOONG_CONFIG_twrpGlobalVars_target_enforce_ab_ota_partition_list := $(TARGET_ENFORCE_AB_OTA_PARTITION_LIST)
SOONG_CONFIG_twrpGlobalVars_supports_hw_fde := $(TARGET_HW_DISK_ENCRYPTION)
SOONG_CONFIG_twrpGlobalVars_supports_hw_fde_perf := $(TARGET_HW_DISK_ENCRYPTION_PERF)
ifneq ($(TARGET_CRYPTFS_HW_PATH),)
SOONG_CONFIG_twrpGlobalVars_hw_fde_cryptfs_hw_header_lib_name := //$(TARGET_CRYPTFS_HW_PATH):libcryptfs_hw_headers
SOONG_CONFIG_twrpGlobalVars_hw_fde_cryptfs_hw_shared_lib_name := //$(TARGET_CRYPTFS_HW_PATH):libcryptfs_hw
else
SOONG_CONFIG_twrpGlobalVars_hw_fde_cryptfs_hw_header_lib_name := libcryptfs_hw_headers
SOONG_CONFIG_twrpGlobalVars_hw_fde_cryptfs_hw_shared_lib_name := libcryptfs_hw
endif
# Set default values
TARGET_INIT_VENDOR_LIB ?= vendor_init