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

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

Support PRODUCT_BUILD_VBMETA_IMAGE for target files

Currently we support skip building vbmeta.img when
PRODUCT_BUILD_VBMETA_IMAGE is set to false, which is used
when generating a system-only or vendor-only build artifacts.

However, when using `make dist` to build target files,
vbmeta.img is still generated. This change fixes this by
passing the related info to misc_info.txt for the release
tool to skip building vbmeta.img when necessary.

To make this happen, a device config should:
 1. Set PRODUCT_BUILD_VBMETA_IMAGE := false
 2. Remove 'vbmeta' from AB_OTA_PARTITIONS:
     AB_OTA_PARTITIONS += \
	 boot \
	 system \
    -    vbmeta \
	 dtbo \
	 product \
	 system_ext \
         vbmeta_system

Bug: 161659370
Test: `make dist` and checks the target file does not include vbmeta.img
Change-Id: Iddca9fe0b171a50a80e5a88aa462e118f18a7e6f
parent 544b5568
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4144,6 +4144,9 @@ ifdef BOARD_USES_VENDORIMAGE
	$(hide) echo "board_uses_vendorimage=true" >> $@
endif
ifeq ($(BOARD_AVB_ENABLE),true)
ifeq ($(BUILDING_VBMETA_IMAGE),true)
	$(hide) echo "avb_building_vbmeta_image=true" >> $@
endif # BUILDING_VBMETA_IMAGE
	$(hide) echo "avb_enable=true" >> $@
	$(hide) echo "avb_vbmeta_key_path=$(BOARD_AVB_KEY_PATH)" >> $@
	$(hide) echo "avb_vbmeta_algorithm=$(BOARD_AVB_ALGORITHM)" >> $@
+3 −2
Original line number Diff line number Diff line
@@ -959,6 +959,7 @@ def AddImagesToTargetFiles(filename):
          if item not in vbmeta_vendor.split()]
      vbmeta_partitions.append("vbmeta_vendor")

    if OPTIONS.info_dict.get("avb_building_vbmeta_image") == "true":
      banner("vbmeta")
      AddVBMeta(output_zip, partitions, "vbmeta", vbmeta_partitions)