AVB: support BOARD_BUILD_SYSTEM_ROOT_IMAGE
Passing --setup_rootfs_from_kernel to avbtool when
BOARD_BUILD_SYSTEM_ROOT_IMAGE is true
Bug: 33590159
Test: 'make' sailfish with BOARD_AVB_ENABLE := true
Test: 'make dist' with BOARD_AVB_ENABLE := true
Change-Id: Ieb58dd9ae6be1eceb90a33c739b85cff5cbc6e0a
diff --git a/core/Makefile b/core/Makefile
index 359f460..0a99376 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1698,13 +1698,16 @@
INTERNAL_AVB_MAKE_VBMETA_IMAGE_ARGS := \
--include_descriptors_from_image $(INSTALLED_BOOTIMAGE_TARGET) \
--include_descriptors_from_image $(INSTALLED_SYSTEMIMAGE) \
- --generate_dm_verity_cmdline_from_hashtree $(INSTALLED_SYSTEMIMAGE)
ifdef INSTALLED_VENDORIMAGE_TARGET
INTERNAL_AVB_MAKE_VBMETA_IMAGE_ARGS += \
--include_descriptors_from_image $(INSTALLED_VENDORIMAGE_TARGET)
endif
+ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true)
+INTERNAL_AVB_MAKE_VBMETA_IMAGE_ARGS += --setup_rootfs_from_kernel $(BUILT_SYSTEMIMAGE)
+endif
+
ifdef BOARD_AVB_ROLLBACK_INDEX
INTERNAL_AVB_MAKE_VBMETA_IMAGE_ARGS += --rollback_index $(BOARD_AVB_ROLLBACK_INDEX)
endif