Merge "Support per-partition settings for os_version AVB props" am: 4a723d0ecf am: f2ed2638d2

Original change: https://android-review.googlesource.com/c/platform/build/+/2049103

Change-Id: Ib984b03d68527107043ad4c43517e8240fd2e345
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2022-03-31 03:02:58 +00:00
committed by Automerger Merge Worker

View File

@@ -4032,29 +4032,65 @@ $(if $(BOARD_AVB_RECOVERY_KEY_PATH),,\
endif endif
endif endif
# Appends os version and security patch level as a AVB property descriptor # Appends os version as a AVB property descriptor.
SYSTEM_OS_VERSION ?= $(PLATFORM_VERSION_LAST_STABLE)
BOARD_AVB_SYSTEM_ADD_HASHTREE_FOOTER_ARGS += \
--prop com.android.build.system.os_version:$(SYSTEM_OS_VERSION)
PRODUCT_OS_VERSION ?= $(PLATFORM_VERSION_LAST_STABLE)
BOARD_AVB_PRODUCT_ADD_HASHTREE_FOOTER_ARGS += \
--prop com.android.build.product.os_version:$(PRODUCT_OS_VERSION)
SYSTEM_EXT_OS_VERSION ?= $(PLATFORM_VERSION_LAST_STABLE)
BOARD_AVB_SYSTEM_EXT_ADD_HASHTREE_FOOTER_ARGS += \
--prop com.android.build.system_ext.os_version:$(SYSTEM_EXT_OS_VERSION)
INIT_BOOT_OS_VERSION ?= $(PLATFORM_VERSION_LAST_STABLE)
BOARD_AVB_INIT_BOOT_ADD_HASH_FOOTER_ARGS += \
--prop com.android.build.init_boot.os_version:$(INIT_BOOT_OS_VERSION)
BOOT_OS_VERSION ?= $(PLATFORM_VERSION_LAST_STABLE)
BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS += \
--prop com.android.build.boot.os_version:$(BOOT_OS_VERSION)
VENDOR_OS_VERSION ?= $(PLATFORM_VERSION_LAST_STABLE)
BOARD_AVB_VENDOR_ADD_HASHTREE_FOOTER_ARGS += \
--prop com.android.build.vendor.os_version:$(VENDOR_OS_VERSION)
ODM_OS_VERSION ?= $(PLATFORM_VERSION_LAST_STABLE)
BOARD_AVB_ODM_ADD_HASHTREE_FOOTER_ARGS += \
--prop com.android.build.odm.os_version:$(ODM_OS_VERSION)
VENDOR_DLKM_OS_VERSION ?= $(PLATFORM_VERSION_LAST_STABLE)
BOARD_AVB_VENDOR_DLKM_ADD_HASHTREE_FOOTER_ARGS += \
--prop com.android.build.vendor_dlkm.os_version:$(VENDOR_DLKM_OS_VERSION)
ODM_DLKM_OS_VERSION ?= $(PLATFORM_VERSION_LAST_STABLE)
BOARD_AVB_ODM_DLKM_ADD_HASHTREE_FOOTER_ARGS += \
--prop com.android.build.odm_dlkm.os_version:$(ODM_DLKM_OS_VERSION)
SYSTEM_DLKM_OS_VERSION ?= $(PLATFORM_VERSION_LAST_STABLE)
BOARD_AVB_SYSTEM_DLKM_ADD_HASHTREE_FOOTER_ARGS += \
--prop com.android.build.system_dlkm.os_version:$(SYSTEM_DLKM_OS_VERSION)
# Appends fingerprint and security patch level as a AVB property descriptor.
BOARD_AVB_SYSTEM_ADD_HASHTREE_FOOTER_ARGS += \ BOARD_AVB_SYSTEM_ADD_HASHTREE_FOOTER_ARGS += \
--prop com.android.build.system.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \ --prop com.android.build.system.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \
--prop com.android.build.system.os_version:$(PLATFORM_VERSION_LAST_STABLE) \
--prop com.android.build.system.security_patch:$(PLATFORM_SECURITY_PATCH) --prop com.android.build.system.security_patch:$(PLATFORM_SECURITY_PATCH)
BOARD_AVB_PRODUCT_ADD_HASHTREE_FOOTER_ARGS += \ BOARD_AVB_PRODUCT_ADD_HASHTREE_FOOTER_ARGS += \
--prop com.android.build.product.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \ --prop com.android.build.product.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \
--prop com.android.build.product.os_version:$(PLATFORM_VERSION_LAST_STABLE) \
--prop com.android.build.product.security_patch:$(PLATFORM_SECURITY_PATCH) --prop com.android.build.product.security_patch:$(PLATFORM_SECURITY_PATCH)
BOARD_AVB_SYSTEM_EXT_ADD_HASHTREE_FOOTER_ARGS += \ BOARD_AVB_SYSTEM_EXT_ADD_HASHTREE_FOOTER_ARGS += \
--prop com.android.build.system_ext.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \ --prop com.android.build.system_ext.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \
--prop com.android.build.system_ext.os_version:$(PLATFORM_VERSION_LAST_STABLE) \
--prop com.android.build.system_ext.security_patch:$(PLATFORM_SECURITY_PATCH) --prop com.android.build.system_ext.security_patch:$(PLATFORM_SECURITY_PATCH)
BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS += \ BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS += \
--prop com.android.build.boot.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) --prop com.android.build.boot.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE)
BOARD_AVB_INIT_BOOT_ADD_HASH_FOOTER_ARGS += \ BOARD_AVB_INIT_BOOT_ADD_HASH_FOOTER_ARGS += \
--prop com.android.build.init_boot.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \ --prop com.android.build.init_boot.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE)
--prop com.android.build.init_boot.os_version:$(PLATFORM_VERSION_LAST_STABLE)
BOARD_AVB_VENDOR_BOOT_ADD_HASH_FOOTER_ARGS += \ BOARD_AVB_VENDOR_BOOT_ADD_HASH_FOOTER_ARGS += \
--prop com.android.build.vendor_boot.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \ --prop com.android.build.vendor_boot.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \
@@ -4066,24 +4102,19 @@ BOARD_AVB_RECOVERY_ADD_HASH_FOOTER_ARGS += \
--prop com.android.build.recovery.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) --prop com.android.build.recovery.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE)
BOARD_AVB_VENDOR_ADD_HASHTREE_FOOTER_ARGS += \ BOARD_AVB_VENDOR_ADD_HASHTREE_FOOTER_ARGS += \
--prop com.android.build.vendor.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \ --prop com.android.build.vendor.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE)
--prop com.android.build.vendor.os_version:$(PLATFORM_VERSION_LAST_STABLE)
BOARD_AVB_ODM_ADD_HASHTREE_FOOTER_ARGS += \ BOARD_AVB_ODM_ADD_HASHTREE_FOOTER_ARGS += \
--prop com.android.build.odm.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \ --prop com.android.build.odm.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE)
--prop com.android.build.odm.os_version:$(PLATFORM_VERSION_LAST_STABLE)
BOARD_AVB_VENDOR_DLKM_ADD_HASHTREE_FOOTER_ARGS += \ BOARD_AVB_VENDOR_DLKM_ADD_HASHTREE_FOOTER_ARGS += \
--prop com.android.build.vendor_dlkm.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \ --prop com.android.build.vendor_dlkm.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE)
--prop com.android.build.vendor_dlkm.os_version:$(PLATFORM_VERSION_LAST_STABLE)
BOARD_AVB_ODM_DLKM_ADD_HASHTREE_FOOTER_ARGS += \ BOARD_AVB_ODM_DLKM_ADD_HASHTREE_FOOTER_ARGS += \
--prop com.android.build.odm_dlkm.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \ --prop com.android.build.odm_dlkm.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE)
--prop com.android.build.odm_dlkm.os_version:$(PLATFORM_VERSION_LAST_STABLE)
BOARD_AVB_SYSTEM_DLKM_ADD_HASHTREE_FOOTER_ARGS += \ BOARD_AVB_SYSTEM_DLKM_ADD_HASHTREE_FOOTER_ARGS += \
--prop com.android.build.system_dlkm.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \ --prop com.android.build.system_dlkm.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE)
--prop com.android.build.system_dlkm.os_version:$(PLATFORM_VERSION_LAST_STABLE)
BOARD_AVB_DTBO_ADD_HASH_FOOTER_ARGS += \ BOARD_AVB_DTBO_ADD_HASH_FOOTER_ARGS += \
--prop com.android.build.dtbo.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) --prop com.android.build.dtbo.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE)
@@ -4094,14 +4125,6 @@ BOARD_AVB_PVMFW_ADD_HASH_FOOTER_ARGS += \
# The following vendor- and odm-specific images needs explicit SPL set per board. # The following vendor- and odm-specific images needs explicit SPL set per board.
# TODO(b/210875415) Is this security_patch property used? Should it be removed from # TODO(b/210875415) Is this security_patch property used? Should it be removed from
# boot.img when there is no platform ramdisk included in it? # boot.img when there is no platform ramdisk included in it?
ifdef BOOT_OS_VERSION
BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS += \
--prop com.android.build.boot.os_version:$(BOOT_OS_VERSION)
else
BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS += \
--prop com.android.build.boot.os_version:$(PLATFORM_VERSION_LAST_STABLE)
endif
ifdef BOOT_SECURITY_PATCH ifdef BOOT_SECURITY_PATCH
BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS += \ BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS += \
--prop com.android.build.boot.security_patch:$(BOOT_SECURITY_PATCH) --prop com.android.build.boot.security_patch:$(BOOT_SECURITY_PATCH)