全志编译过程问题与解决方法汇总

全志编译疑难杂症
本文汇总了解决全志编译过程中遇到的各种问题,包括copy_file_range类型冲突、write函数参数转换错误、update_mbr失败、arm-linux-gnueabi-gcc未找到及intltool和automake版本过旧等常见编译难题。

全志编译过程问题与解决方法汇总

 

一、copy_file_range

./../misc/create_inode.c:395:18: error: conflicting types for 'copy_file_range'

static errcode_t copy_file_range(ext2_filsys fs, int fd, ext2_file_t e2_file,

 

修改文件:./out/sun8iw11p1/linux/common/buildroot/build/host-e2fsprogs-1.43.3/misc/create_inode.c

注释掉:#inlucde <unistd.h>

 

./out/sun8iw11p1/linux/common/buildroot/build/e2fsprogs-1.43.3/misc/create_inode.c

 

二、write

问题:pipe.cpp:86:29: error: invalid conversion from 'char' to 'const void*' [-fpermissive]

::write(_fd_write, '\0', 1);

修改调用为::write(_fd_write, “\0”, 1)

 

三、update_mbr failed

问题: 执行./build.sh pack时提示的问题

unable to open file rootfs_nor.fex dl file rootfs_nor.fex size too large

update_for_part_info -1 update mbr file fail

ERROR: update_mbr failed

方法一:安装make的3.81版本 ./build.sh distclean后重新编译

 

方法二:在网上查的,试了没有成功

根据出错信息:dl file rootfs.fex size too large判断是rootfs.fex分区尺寸小了,改大就可以了!至于改多大合适,根据实际情况来确定了。(全志也没有明确给出尺寸的规定!实践中一般倍数放大,具体可以根据您所使用的FLASH的大小来灵活设置)

 

本例相差不大,直接改为2倍就可以了!

dl_file_size = 17920 sector

part_size = 13568 sector

 

 

W:\perf1_r6_tinav2.1\target\allwinner\sitar-perf1\configs\sys_partition_nor.fex

[partition]

    name         = rootfs

    ;size         = 13568

    size         = 27136

    downloadfile = "rootfs.fex"

 

四、arm-linux-gnueabi-gcc

问题:export PATH=$PATH:/home/wang/work/lichee/brandy/gcc-linaro/bin/

 

/bin/sh: arm-linux-gnueabi-gcc: command not found

scripts/Makefile.build:308: recipe for target 'scripts/mod/empty.o' failed

make[2]: *** [scripts/mod/empty.o] Error 127

 

五、intltool

Your intltool is too old. You need intltool 0.35.0 or later. 最后拷贝系统的/usr/bin/intltool-update到构建目录,解决问题。

 

 

六、automake

问题:The error is with automake and perl v5.26.

In perl v5.22, using a literal { in a regular expression was deprecated, and will emit a warning if it isn't escaped: {. In v5.26, this won't just warn, it'll cause a syntax error.

A temporary work around is to edit automake file (buildroot/output/host/usr/bin/automake- and modify):

=================================================

goto line :3936 and change

解决方法:替换3936行的:

$text =~ s/\$\{([^ \t=:+\{\}]+)\}/substitute_ac_subst_variables_worker ($1)/ge;

 

评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值