Adding vbmeta_system.img and vbmeta_vendor.img to droidcore
In the concept of system/vendor build split, usually vbmeta.img
won't be built in a system-only build and/or a vendor-only build.
Instead, vbmeta.img will be generated later when combining system
and vendor artifacts.
- system-only artifacts: system.img, system_ext.img,
product.img and vbmeta_system.img
- vendor-only artifacts: boot.img, vendor.img, odm.img and
vbmeta_vendor.img
PRODUCT_BUILD_VBMETA_IMAGE can be used to disable building vbmeta.img.
However, it also disables vbmeta_system.img and vbmeta_vendor.img
generation because both are only depended by vbmeta.img.
This change adds both vbmeta_[system|vendor].img into droidcore,
so they will be built even if PRODUCT_BUILD_VBMETA_IMAGE is set
to false, when we're building system-only artifacts or vendor-only
artifacts.
Bug: 161425613
Test: sets PRODUCT_BUILD_VBMETA_IMAGE := false then build, checks
vbmeta_system.img is generated but vbmeta.img is not.
Change-Id: I39d9819da4704195b0e1ee58d13c848ae97d474a
diff --git a/core/main.mk b/core/main.mk
index f6a74f4..c6d2128 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -1541,6 +1541,12 @@
.PHONY: vbmetaimage
vbmetaimage: $(INSTALLED_VBMETAIMAGE_TARGET)
+.PHONY: vbmetasystemimage
+vbmetasystemimage: $(INSTALLED_VBMETA_SYSTEMIMAGE_TARGET)
+
+.PHONY: vbmetavendorimage
+vbmetavendorimage: $(INSTALLED_VBMETA_VENDORIMAGE_TARGET)
+
# Build files and then package it into the rom formats
.PHONY: droidcore
droidcore: $(filter $(HOST_OUT_ROOT)/%,$(modules_to_install)) \
@@ -1552,6 +1558,8 @@
$(INSTALLED_DEBUG_BOOTIMAGE_TARGET) \
$(INSTALLED_RECOVERYIMAGE_TARGET) \
$(INSTALLED_VBMETAIMAGE_TARGET) \
+ $(INSTALLED_VBMETA_SYSTEMIMAGE_TARGET) \
+ $(INSTALLED_VBMETA_VENDORIMAGE_TARGET) \
$(INSTALLED_USERDATAIMAGE_TARGET) \
$(INSTALLED_CACHEIMAGE_TARGET) \
$(INSTALLED_BPTIMAGE_TARGET) \