|
发表于 2021-5-28 17:25:10
只看该作者
6#
这个问题,在编译其他厂家提供的Android8.1,再一次出现,安装各种编译环境依赖仍无法解决,花了2天时间,终于定位到了问题所在,解决方法如下:
1、编译Kernel,出现:E/get_file_size(316): Failed to get size
E/get_file_size(316): Failed to get size:./arch/arm/boot/dts/pro-rk3288.dtb
E/get_file_size(316): Failed to get size:./arch/arm/boot/dts/pro-rk3288.dtb
E/get_file_size(316): Failed to get size:logo.bmp
E/get_file_size(316): Failed to get size:logo.bmp
E/get_file_size(316): Failed to get size:logo_kernel.bmp
E/get_file_size(316): Failed to get size:logo_kernel.bmp
追踪源码发现,为resource_tool.c下的stat函数获取文件长度失败导致
(原因:部分平台不支持stat64,需将gcc编译命令加上-D_FILE_OFFSET_BITS=64)
解决方法:
cd u-boot/tools/resource_tool
vim Makefile
- #CFLAGS = -fshort-wchar -m32 -ffunction-sections -Os
+ CFLAGS = -D_FILE_OFFSET_BITS=64 -fshort-wchar -m32 -ffunction-sections -Os
重新编译resource_tool,编译后的resource_tool替换kernel/scripts/resource_tool即可
然后./build.sh kernel 重新编译内核 |
|