ERROR:Failed to allocate 119 blocks

  在编译android源码时,出现下面错误: 

 1 make_ext4fs -l 167772160 -a system out/target/product/Mary/system.img.ext4 out/target/product/Mary/system
2 Creating filesystem with parameters:
3 Size: 167772160
4 Block size: 4096
5 Blocks per group: 32768
6 Inodes per group: 5120
7 Inode size: 256
8 Journal blocks: 1024
9 Label:
10 Blocks: 40960
11 Block groups: 2
12 Reserved block group size: 15
13 error: do_inode_allocate_extents: Failed to allocate 119 blocks
14
15 make: *** [out/target/product/Mary/obj/PACKAGING/systemimage_intermediates/system.img] 错误 4
16 make: *** 正在删除文件“out/target/product/Mary/obj/PACKAGING/systemimage_intermediates/system.img”

这个错误是由分配的空间太小导致的。

解决方法:

打开device/odm/Mary/BoardConfig.mk 

扩大BOARD_*_PARTITION_SIZE的大小,如:

  BOARD_SYSTEMIMAGE_PARTITION_SIZE := 251658240 #0x0F000000 #167772160   # 0x0A000000

 

参考资料:

=== error: do_inode_allocate_extents: Failed to allocate blocks ===
One way to workaround this is to increase the system image size.
Please see BOARD_*_PARTITION_SIZE variables in device/<vendor>/$(TARGET_PRODUCT)/BoardConfig.mk in your workspace.

你可能感兴趣的:(error)