c2606eb548
When building a system image with system_root_image enabled, the size computation should include files under both of in_dir (i.e. /system files) and root (pointed by 'root_dir'). Because files from both locations will end up into the built image. The files under root are usually only a few MiBs, but should be accounted for especially in the context of logical partitions (where the partition size will be allocated based on the actual need). Note that we will still need some "reserved space" (defined via BOARD_*_PARTITION_RESERVED_SIZE) to cover the cost for filesystem and/or verity metadata. This CL moves the combination of the two dirs up, before parsing and computing other properties. This doesn't affect anything for a successful image building path. It may however increase the time to error out in certain error path, since it copies the files earlier now. Test: python -m unittest test_build_image Test: `make dist` Test: Setup a target with PRODUCT_USE_LOGICAL_PARTITIONS == true and BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE == 20MiB. Build system image successfully. Test: Setup a target with PRODUCT_USE_LOGICAL_PARTITIONS == true and BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE == 20MiB. Write a large file to root dir (PRODUCT_OUT_ROOT). The image building fails, but reporting a size that accounts for both of /system and root. Change-Id: Idfb26b8e259626ba57ec3bd4f85d357c30e56163 |
||
---|---|---|
.. | ||
testdata | ||
add_img_to_target_files | ||
add_img_to_target_files.py | ||
blockimgdiff.py | ||
build_image.py | ||
check_ota_package_signature.py | ||
check_target_files_signatures | ||
check_target_files_signatures.py | ||
common.py | ||
edify_generator.py | ||
img_from_target_files | ||
img_from_target_files.py | ||
make_recovery_patch | ||
make_recovery_patch.py | ||
ota_from_target_files | ||
ota_from_target_files.py | ||
ota_package_parser.py | ||
OWNERS | ||
pylintrc | ||
rangelib.py | ||
sign_target_files_apks | ||
sign_target_files_apks.py | ||
sparse_img.py | ||
target_files_diff.py | ||
test_add_img_to_target_files.py | ||
test_blockimgdiff.py | ||
test_build_image.py | ||
test_common.py | ||
test_ota_from_target_files.py | ||
test_rangelib.py | ||
test_sign_target_files_apks.py | ||
test_utils.py | ||
test_validate_target_files.py | ||
validate_target_files.py |