转-error: do_inode_allocate_extents: Failed to allocate

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

http://blog.sina.com.cn/s/blog_63f31f34010178aa.html

http://blog.csdn.net/pengjin1985/article/details/7535165

http://blog.csdn.net/suwenqiang_2011/article/details/7770130

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.

 

out/target/product/rk2928sdk/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/rk2928sdk/system + make_ext4fs -s -l 419430400 -a system out/target/product/rk2928sdk/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/rk2928sdk/system Creating filesystem with parameters:     Size: 419430400     Block size: 4096     Blocks per group: 32768     Inodes per group: 6400     Inode size: 256     Journal blocks: 1600    Label:      Blocks: 102400     Block groups: 4     Reserved block group size: 31 error: do_inode_allocate_extents: Failed to allocate 963 blocks 
+ ‘[‘ 1 -ne 0 ‘]’ + exit 4 error: failed to build out/target/product/rk2928sdk/obj/PACKAGING/systemimage_intermediates/system.img from out/target/product/rk2928sdk/system make: *** [out/target/product/rk2928sdk/obj/PACKAGING/systemimage_intermediates/system.img] 错误 1 make: *** 正在删除文件“out/target/product/rk2928sdk/obj/PACKAGING/systemimage_intermediates/system.img” incar@incar-desktop:~/RK2926_86V/sdk-4.1.1$ error: do_inode_allocate_extents: Failed to allocate 963 blocks error::找不到命令 
解决办法: 这个错误是由system分配的空间太小导致的。 incar@incar-desktop:~/RK2926_86V/sdk-4.1.1$ sdiff -s device/rockchip/rk2928sdk/BoardConfig.mk  ../sdk-4.1.1_old/device/rockchip/rk2928sdk/BoardConfig.mk      BOARD_SYSTEMIMAGE_PARTITION_SIZE := 419430400                 | BOARD_SYSTEMIMAGE_PARTITION_SIZE := 524288000 

①打开device/rockchip/rk2928sdk/BoardConfig.mk

扩大BOARD_*_PARTITION_SIZE的大小,如:

BOARD_SYSTEMIMAGE_PARTITION_SIZE := 524288000    #500M

BOARD_SYSTEMIMAGE_PARTITION_SIZE := 734003200    #700M

②如果 BOARD_SYSTEMIMAGE_PARTITION_SIZE超过512,还需要修改rockdev下的parameter,将

0x00100000@0x00282000(system),-@0x00382000(user)调大。

说明:

@前面的是大小 :0x00100000/2048=512MB

@后面的是起始地址:0x00282000

修改如下:

     0x0015E000@0x00282000(system),-@0x003E0000(user)    #700M