[Build&Make] system分区>=6G 编译报错问题

问题描述

partition table 配置 system img 大小6GB以上
出现编译报错
 Could not build verity tree! Error: build_verity_tree: system/extras/verity/build_verity_tree.cpp:96: int hash_chunk(void *, const void *, int): Assertion `len % ctx->block_size == 0′ failed.

Out of space? the tree size of out/target/product/HLTE316T/system is (MB):
3338 out/target/product/HLTE316T/system
The max is 6144 MB

解决方案

1. 合入Google的patch(共5笔change)
https://android-review.googlesource.com/q/%2522Bug:+78432315%2522

2. 打上上面那些patch之後還是會有問題, 需要再做下面的更改
http://mbjswglx817:8010/alps-mp-p0.mp3/xref/system/core/libsparse/output_file.c#287
– int to_write;
+ int64_t to_write;

-to_write = min(off, (int64_t)INT_MAX);
+to_write = min(off, (int64_t)LLONG_MAX);

3.还有
diff –git a/mrdump_host_cmd/protocol.cpp b/mrdump_host_cmd/protocol.cpp
–  to_write = std::min(TRANSPORT_BUF_SIZE – transport_buf_len, len);
+  to_write = std::min(TRANSPORT_BUF_SIZE – transport_buf_len, (int)len);

微信扫码打赏

作者: RESSRC

个人资源站

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据