Firefly开源社区

打印 上一主题 下一主题

[Android] Centos7 编译Android7.1_Industry烧录后启动错误

180

积分

0

威望

0

贡献

技术小白

积分
180

Centos7 编译Android7.1_Industry烧录后启动错误

发表于 2021-5-7 18:32:37      浏览:3556 | 回复:5        打印      只看该作者   [复制链接] 楼主
Centos7安装必要的开发环境后,执行
./FFTools/make.sh  -d rk3399-firefly-face-mipi8 -j8 -l rk3399_firefly_face-userdebug
./FFTools/mkupdate/mkupdate.sh -l rk3399_firefly_face-userdebug
完成编译,烧录固件后,启动失败,串口输出
#Boot ver: 2021-05-07#1.26
empty serial no.
normal boot.
checkKey
vbus = 1
no fuel gauge found
no fuel gauge found
read logo on state from dts [0]
no fuel gauge found
got recovery cmd from misc.
load fdt from resouce.
hwversion: can't find dts node for version
Secure Boot state: 0
kernel   @ 0x00280000 (0x01376808)
ramdisk  @ 0x04bf0000 (0x00755a04)
bootrk: do_bootm_linux...
ERROR: image is not a fdt - must RESET the board to recover.
FDT creation failed! hanging...### ERROR ### Please RESET the board ###

提示fdt,error,使用官方镜像解包后的resource.img,单独下载,启动成功
请问,出现此问题原因是
回复

使用道具 举报

3747

积分

17

威望

18

贡献

官方团队

Rank: 9Rank: 9Rank: 9

积分
3747
发表于 2021-5-8 10:37:34        只看该作者  沙发
hwversion: can't find dts node for version

是否同步sdk到最新
回复

使用道具 举报

180

积分

0

威望

0

贡献

技术小白

积分
180
发表于 2021-5-8 10:48:59        只看该作者  板凳
本帖最后由 szzhangzhen 于 2021-5-8 10:54 编辑

已经使用  git clone https://gitlab.com/TeeFirefly/rk3399-industry-nougat-bundle.git .bundle
.bundle/update
git rebase FETCH_HEAD
同步至最新
单独编译kernel,发现dtb无法打包至resource

导致,resource.img只有2K

回复

使用道具 举报

3747

积分

17

威望

18

贡献

官方团队

Rank: 9Rank: 9Rank: 9

积分
3747
发表于 2021-5-8 11:01:07        只看该作者  地板
szzhangzhen 发表于 2021-5-8 10:48
已经使用  git clone https://gitlab.com/TeeFirefly/rk3399-industry-nougat-bundle.git .bundle
.bundle ...

那应该是环境的问题导致,要么安装ubuntu进行编译试一下,要么在当前的编译环境下解决为什么resource.img出错的问题
回复

使用道具 举报

180

积分

0

威望

0

贡献

技术小白

积分
180
发表于 2021-5-11 14:37:06        只看该作者  5#
又安装了一下编译依赖,问题解决,具体是哪个编译依赖导致,未知{:5_241:}
回复

使用道具 举报

180

积分

0

威望

0

贡献

技术小白

积分
180
发表于 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  重新编译内核
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表