Adding Build time flag to specify Cow Version

Adding in build time flag for specifying cow version, in preparation to
add new cow version in libsnapshot

Test: m -> cat misc-info.txt
Bug: 279954153
Change-Id: I148d4e7cdd669496c91213889787172ffd83a5ab
This commit is contained in:
Daniel Zheng
2023-05-02 13:50:27 -07:00
parent e05a15bfed
commit 025099c4bc
3 changed files with 8 additions and 0 deletions

View File

@@ -5763,6 +5763,8 @@ define dump-dynamic-partitions-info
echo "virtual_ab_compression_method=$(PRODUCT_VIRTUAL_AB_COMPRESSION_METHOD)" >> $(1)) echo "virtual_ab_compression_method=$(PRODUCT_VIRTUAL_AB_COMPRESSION_METHOD)" >> $(1))
$(if $(filter true,$(PRODUCT_VIRTUAL_AB_OTA_RETROFIT)), \ $(if $(filter true,$(PRODUCT_VIRTUAL_AB_OTA_RETROFIT)), \
echo "virtual_ab_retrofit=true" >> $(1)) echo "virtual_ab_retrofit=true" >> $(1))
$(if $(PRODUCT_VIRTUAL_AB_COW_VERSION), \
echo "virtual_ab_cow_version=$(PRODUCT_VIRTUAL_AB_COW_VERSION)" >> $(1))
endef endef
# By conditionally including the dependency of the target files package on the # By conditionally including the dependency of the target files package on the

View File

@@ -401,6 +401,10 @@ _product_list_vars += PRODUCT_VENDOR_LINKER_CONFIG_FRAGMENTS
# supports it # supports it
_product_single_value_vars += PRODUCT_ENABLE_UFFD_GC _product_single_value_vars += PRODUCT_ENABLE_UFFD_GC
# Specifies COW version to be used by update_engine and libsnapshot. If this value is not
# specified we default to COW version 2 in update_engine for backwards compatibility
_product_single_value_vars += PRODUCT_VIRTUAL_AB_COW_VERSION
_product_list_vars += PRODUCT_AFDO_PROFILES _product_list_vars += PRODUCT_AFDO_PROFILES
.KATI_READONLY := _product_single_value_vars _product_list_vars .KATI_READONLY := _product_single_value_vars _product_list_vars

View File

@@ -20,3 +20,5 @@
# #
# All U+ launching devices should instead use vabc_features.mk. # All U+ launching devices should instead use vabc_features.mk.
$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota/vabc_features.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota/vabc_features.mk)
PRODUCT_VIRTUAL_AB_COW_VERSION := 2