Pass FRAMEWORK_VBMETA_VERSION to assemble_vintf

Note that this depends on a change in avbtool:
  https://android-review.googlesource.com/#/c/406374/

Bug: 38325029
Test: builds system.img, checks $OUT/system/compatibility_matrix.xml
      contains correct vbmeta-version
Change-Id: Iacc0a2687fb39600ad6b8e9cfbfe5c1a3b90b40b
Merged-In: Iacc0a2687fb39600ad6b8e9cfbfe5c1a3b90b40b
This commit is contained in:
Bowgo Tsai 2017-05-19 12:39:07 +08:00 committed by Yifan Hong
parent dae462bdd1
commit eb7b438994
1 changed files with 20 additions and 1 deletions

View File

@ -114,9 +114,28 @@ $(GEN): PRIVATE_FLAGS := -c "$(BUILT_VENDOR_MANIFEST)"
endif
endif
ifeq (true,$(BOARD_AVB_ENABLE))
$(GEN): $(AVBTOOL)
# INTERNAL_AVB_SYSTEM_SIGNING_ARGS consists of BOARD_AVB_SYSTEM_KEY_PATH and
# BOARD_AVB_SYSTEM_ALGORITHM. We should add the dependency of key path, which
# is a file, here.
$(GEN): $(BOARD_AVB_SYSTEM_KEY_PATH)
# Use deferred assignment (=) instead of immediate assignment (:=).
# Otherwise, cannot get INTERNAL_AVB_SYSTEM_SIGNING_ARGS.
FRAMEWORK_VBMETA_VERSION = $$("$(AVBTOOL)" add_hashtree_footer \
--print_required_libavb_version \
$(INTERNAL_AVB_SYSTEM_SIGNING_ARGS) \
$(BOARD_AVB_SYSTEM_ADD_HASHTREE_FOOTER_ARGS))
else
FRAMEWORK_VBMETA_VERSION := 0.0
endif
$(GEN): $(FRAMEWORK_COMPATIBILITY_MATRIX_FILE) $(HOST_OUT_EXECUTABLES)/assemble_vintf
# TODO(b/37405869) (b/37715375) inject avb versions as well for devices that have avb enabled.
POLICYVERS=$(POLICYVERS) BOARD_SEPOLICY_VERS=$(BOARD_SEPOLICY_VERS) $(HOST_OUT_EXECUTABLES)/assemble_vintf -i $< -o $@ $(PRIVATE_FLAGS)
POLICYVERS=$(POLICYVERS) \
BOARD_SEPOLICY_VERS=$(BOARD_SEPOLICY_VERS) \
FRAMEWORK_VBMETA_VERSION=$(FRAMEWORK_VBMETA_VERSION) \
$(HOST_OUT_EXECUTABLES)/assemble_vintf -i $< -o $@ $(PRIVATE_FLAGS)
LOCAL_PREBUILT_MODULE_FILE := $(GEN)
include $(BUILD_PREBUILT)
BUILT_SYSTEM_COMPATIBILITY_MATRIX := $(LOCAL_BUILT_MODULE)