Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cca76ddc authored by Bowgo Tsai's avatar Bowgo Tsai
Browse files

Adding per-partition SPL into AVB prop descriptors

Bug: 119549677
Test: build and avbtool info_image
Change-Id: I0726d740c532ffd70beb09f98e088abcdfa110ef
parent 59fa4ca9
Loading
Loading
Loading
Loading
+27 −2
Original line number Original line Diff line number Diff line
@@ -2872,6 +2872,33 @@ ifneq ($(words $(sort $(INTERNAL_AVB_PARTITIONS_IN_CHAINED_VBMETA_IMAGES))),$(wo
  $(error BOARD_AVB_VBMETA_SYSTEM and BOARD_AVB_VBMETA_VENDOR cannot have duplicates)
  $(error BOARD_AVB_VBMETA_SYSTEM and BOARD_AVB_VBMETA_VENDOR cannot have duplicates)
endif
endif


# Appends security patch level as a AVB property descriptor

BOARD_AVB_SYSTEM_ADD_HASHTREE_FOOTER_ARGS += \
    --prop com.android.build.system.security_patch:$(PLATFORM_SECURITY_PATCH)

BOARD_AVB_PRODUCT_ADD_HASHTREE_FOOTER_ARGS += \
    --prop com.android.build.product.security_patch:$(PLATFORM_SECURITY_PATCH)

BOARD_AVB_PRODUCT_SERVICES_ADD_HASHTREE_FOOTER_ARGS += \
    --prop com.android.build.product_services.security_patch:$(PLATFORM_SECURITY_PATCH)

# The following vendor- and odm-specific images needs explicitly set per board.
ifdef BOOT_SECURITY_PATCH
BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS += \
    --prop com.android.build.boot.security_patch:$(BOOT_SECURITY_PATCH)
endif

ifdef VENDOR_SECURITY_PATCH
BOARD_AVB_VENDOR_ADD_HASHTREE_FOOTER_ARGS += \
    --prop com.android.build.vendor.security_patch:$(VENDOR_SECURITY_PATCH)
endif

ifdef ODM_SECURITY_PATCH
BOARD_AVB_ODM_ADD_HASHTREE_FOOTER_ARGS += \
    --prop com.android.build.odm.security_patch:$(ODM_SECURITY_PATCH)
endif

BOOT_FOOTER_ARGS := BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS
BOOT_FOOTER_ARGS := BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS
DTBO_FOOTER_ARGS := BOARD_AVB_DTBO_ADD_HASH_FOOTER_ARGS
DTBO_FOOTER_ARGS := BOARD_AVB_DTBO_ADD_HASH_FOOTER_ARGS
SYSTEM_FOOTER_ARGS := BOARD_AVB_SYSTEM_ADD_HASHTREE_FOOTER_ARGS
SYSTEM_FOOTER_ARGS := BOARD_AVB_SYSTEM_ADD_HASHTREE_FOOTER_ARGS
@@ -2982,8 +3009,6 @@ BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --padding_size 4096
BOARD_AVB_MAKE_VBMETA_SYSTEM_IMAGE_ARGS += --padding_size 4096
BOARD_AVB_MAKE_VBMETA_SYSTEM_IMAGE_ARGS += --padding_size 4096
BOARD_AVB_MAKE_VBMETA_VENDOR_IMAGE_ARGS += --padding_size 4096
BOARD_AVB_MAKE_VBMETA_VENDOR_IMAGE_ARGS += --padding_size 4096


BOARD_AVB_SYSTEM_ADD_HASHTREE_FOOTER_ARGS += --prop system_security_patch:$(PLATFORM_SECURITY_PATCH)

ifeq (eng,$(filter eng, $(TARGET_BUILD_VARIANT)))
ifeq (eng,$(filter eng, $(TARGET_BUILD_VARIANT)))
# We only need the flag in top-level vbmeta.img.
# We only need the flag in top-level vbmeta.img.
BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --set_hashtree_disabled_flag
BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --set_hashtree_disabled_flag