Bootstrap

android R编译Super.img时size过大报错

编译Android12时最后一步打包Super.img报错:

out/target/product/tt/obj/PACKAGING/check-all-partition-sizes_intermediates/misc_info.txt )"
Traceback (most recent call last):
  File "/home/test/tt_r_temp/android/out/host/linux-x86/bin/check_partition_sizes/internal/stdlib/runpy.py", line 174, in _run_module_as_main
  File "/home/test/tt_r_temp/android/out/host/linux-x86/bin/check_partition_sizes/internal/stdlib/runpy.py", line 72, in _run_code
  File "/home/test/tt_r_temp/android/out/host/linux-x86/bin/check_partition_sizes/__main__.py", line 12, in <module>
  File "/home/test/tt_r_temp/android/out/host/linux-x86/bin/check_partition_sizes/internal/stdlib/runpy.py", line 174, in _run_module_as_main
  File "/home/test/tt_r_temp/android/out/host/linux-x86/bin/check_partition_sizes/internal/stdlib/runpy.py", line 72, in _run_code
  File "/home/test/tt_r_temp/android/out/host/linux-x86/bin/check_partition_sizes/check_partition_sizes.py", line 271, in <module>
  File "/home/test/tt_r_temp/android/out/host/linux-x86/bin/check_partition_sizes/check_partition_sizes.py", line 265, in main
  File "/home/test/tt_r_temp/android/out/host/linux-x86/bin/check_partition_sizes/check_partition_sizes.py", line 253, in CheckPartitionSizes
  File "/home/test/tt_r_temp/android/out/host/linux-x86/bin/check_partition_sizes/check_partition_sizes.py", line 245, in Run
  File "/home/test/tt_r_temp/android/out/host/linux-x86/bin/check_partition_sizes/check_partition_sizes.py", line 242, in _CheckAllPartitionSizes
  File "/home/test/tt_r_temp/android/out/host/linux-x86/bin/check_partition_sizes/check_partition_sizes.py", line 61, in CheckLe
RuntimeError: sum of sizes of ['youroem_dynamic_partitions'] is greater than BOARD_SUPER_PARTITION_SIZE / 2: 2147483648
4290772992 == 4290772992 > 2147483648 == 2147483648
[100% 312/312] Target super fs image for debug: out/target/product/tt/super.img
2021-07-12 10:20:00 - build_super_image.py - INFO    : Building super image from info dict...
2021-07-12 10:20:00 - sparse_img.py - INFO    : Total of 217749 4096-byte output blocks in 20 input chunks.

解决:

修改对应工程下BoardConfig.mk

如device/mediateksample/k62v1_64_bsp/BoardConfig.mk

--- a/alps-mp-s0/device/mediateksample/k62v1_64_bsp/BoardConfig.mk
+++ b/alps-mp-s0/device/mediateksample/k62v1_64_bsp/BoardConfig.mk
@@ -60,4 +60,4 @@ BOARD_VENDOR_RAMDISK_KERNEL_MODULES +=
 # For Wifi
 BOARD_VENDOR_RAMDISK_KERNEL_MODULES +=
 # Super size increased W:22.29
-BOARD_MTK_SUPER_SIZE_KB := 4859904
+BOARD_MTK_SUPER_SIZE_KB := 14859904

;