build_image.py recognize BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE
Test: `make vendorimage`
Test: `make vendorimage` with the following:
- install a large file to vendor image
fails as expected (because _PARTITION_SIZE is exceeded)
Test: `make vendorimage` with the following:
- set PRODUCT_USE_LOGICAL_PARTITIONS to true
- set BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE
fails as expected (BOARD_VENDORIMAGE_PARTITION_SIZE needs
to be undefined)
Test: `make vendorimage` with the following:
- install a large file to vendor image
- set PRODUCT_USE_LOGICAL_PARTIIONS to true
- add a small BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE
- remove BOARD_VENDORIMAGE_PARTITION_SIZE
build succeeds.
Bug: 79106666
Change-Id: Ica8fdce64e8f37d91e66e3d49c0c74fadd15a832
diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py
index 4e690fe..7b4831f 100755
--- a/tools/releasetools/build_image.py
+++ b/tools/releasetools/build_image.py
@@ -855,6 +855,7 @@
copy_prop("vendor_extfs_inode_count", "extfs_inode_count")
if not copy_prop("vendor_extfs_rsv_pct", "extfs_rsv_pct"):
d["extfs_rsv_pct"] = "0"
+ copy_prop("vendor_reserved_size", "partition_reserved_size")
elif mount_point == "product":
copy_prop("avb_product_hashtree_enable", "avb_hashtree_enable")
copy_prop("avb_product_add_hashtree_footer_args",
@@ -911,6 +912,8 @@
copy_prop("partition_size", "system_size")
elif mount_point == "system_other":
copy_prop("partition_size", "system_size")
+ elif mount_point == "vendor":
+ copy_prop("partition_size", "vendor_size")
return d