treble_common.mk: add the vbmeta.img to disable verification
AVB should be disabled for Treble VTS. Otherwise, OEM devices cannot boot
the generic system.img provided by Google.
Bug: 64055917
Test: Compiles and boot a device with the vbmeta.img
Change-Id: I0eaae7beebc8b901d0b4766c2cdc34a27ad02b59
diff --git a/core/Makefile b/core/Makefile
index af3c4cb..966c134 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -2013,6 +2013,14 @@
vbmetaimage-nodeps:
$(build-vbmetaimage-target)
+else ifeq (true,$(BOARD_BUILD_DISABLED_VBMETAIMAGE))
+BUILT_DISABLED_VBMETAIMAGE := $(PRODUCT_OUT)/vbmeta.img
+
+INSTALLED_VBMETAIMAGE_TARGET := $(BUILT_DISABLED_VBMETAIMAGE)
+$(INSTALLED_VBMETAIMAGE_TARGET): $(AVBTOOL)
+ $(hide) $(AVBTOOL) make_vbmeta_image \
+ --flag 2 --padding_size 4096 --output $@
+
endif # BOARD_AVB_ENABLE
# -----------------------------------------------------------------