Firefly开源社区

标题: 编译sdk在最后报错 [打印本页]

作者: 子在川    时间: 2022-11-9 16:19
标题: 编译sdk在最后报错
本帖最后由 子在川 于 2022-11-9 16:19 编辑


按这篇说明来操作:“https://wiki.t-firefly.com/iCore ... d11.0_firmware.html
tchip_askquestions

settings.txt

65 Bytes, 下载次数: 3, 下载积分: 灯泡 -1 , 经验 -1

sdk_error_2022-11-09_15_53_41.log

779.69 KB, 下载次数: 4, 下载积分: 灯泡 -1 , 经验 -1


作者: firefly_zhongw    时间: 2022-11-9 17:00
本帖最后由 firefly_zhongw 于 2022-11-9 17:09 编辑

1. 我这边在 kernel目录下的 kernel/configs/rk356x.config中 添加了一行 CONFIG_SYSVIPC=y,是可以编译过的

2. 确定编译环境是否正确,详细看 https://wiki.t-firefly.com/zh_CN ... ompile_android.html,根据报错信息来排查

作者: 子在川    时间: 2022-11-9 17:06
firefly_zhongw 发表于 2022-11-9 17:00
1. 我这边在 kernel目录下的 kernel/configs/rk356x.config中 添加了一行 CONFIG_SYSVIPC=y,是可以编译过 ...

没有别的改动。

出错原因是因为trust.img没有还是boot.img没有?

谢谢先。

作者: 子在川    时间: 2022-11-9 17:10
firefly_zhongw 发表于 2022-11-9 17:00
1. 我这边在 kernel目录下的 kernel/configs/rk356x.config中 添加了一行 CONFIG_SYSVIPC=y,是可以编译过 ...

请问下结尾的这段打印是哪个文件打印的呢?


will build update.img
-------------------KERNEL_DTS:rk3566-roc-pc

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=11
TARGET_PRODUCT=rk3566_roc_pc
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a55
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-2a
TARGET_2ND_CPU_VARIANT=cortex-a55
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.15.0-50-generic-x86_64-Ubuntu-22.04-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=RQ3A.210705.001
OUT_DIR=out
============================================
package resoure.img with charger images

Pack ./tools/images/ & ../kernel/resource.img to resource.img ...
Unpacking old image(../kernel/resource.img):
rk-kernel.dtb logo.bmp logo_kernel.bmp 3
Pack to resource.img successed!

Packed resources:
rk-kernel.dtb battery_1.bmp battery_2.bmp battery_3.bmp battery_4.bmp battery_5.bmp battery_fail.bmp logo.bmp logo_kernel.bmp battery_0.bmp 10

./resource.img with battery images is ready
/home/sgai/rk/RK3566_demo/Android11.0/Firefly-RK356X_Android11.0_git_20210824/RK356X_Android11.0
make and copy android images
TARGET_PRODUCT=rk3566_roc_pc
TARGET_BASE_PARAMETER_IMAGE==device/rockchip/rk356x_box/etc/baseparameter_auto.img
HIGH_RELIABLE_RECOVERY_OTA=
BOARD_AVB_ENABLE=false
system filesysystem is ext4
create dtbo.img...
done.
create resource.img...
done.
skip copy images: boot.img
skip copy images: boot-debug.img
skip copy images: vendor_boot.img
skip copy images: vendor_boot-debug.img
skip copy images: recovery.img
skip copy images: super.img
create vbmeta.img...
BOARD_AVB_ENABLE is false, use default vbmeta.img
create misc.img.... done.
create uboot.img...
make oem images...
u-boot/trust.img not fount! Please make it from u-boot first!
create loader...
create config.cfg...
create baseparameter...done.
Make image ok!
Make update.img
start to make update.img...
Android Firmware Package Tool v2.0
------ PACKAGE ------
Add file: ./package-file
package-file,Add file: ./package-file done,offset=0x800,size=0x2d3,userspace=0x1
Add file: ./Image/MiniLoaderAll.bin
bootloader,Add file: ./Image/MiniLoaderAll.bin done,offset=0x1000,size=0x721c0,userspace=0xe5
Add file: ./Image/parameter.txt
parameter,Add file: ./Image/parameter.txt done,offset=0x73800,size=0x2a5,userspace=0x1
Add file: ./Image/uboot.img
uboot,Add file: ./Image/uboot.img done,offset=0x74000,size=0x400000,userspace=0x800
Add file: ./Image/misc.img
misc,Add file: ./Image/misc.img done,offset=0x474000,size=0xc000,userspace=0x18
Add file: ./Image/boot.img
Error:<AddFile> open file failed,err=2!
------ FAILED ------
Press any key to quit:
Make update image failed!

作者: firefly_zhongw    时间: 2022-11-9 17:17
本帖最后由 firefly_zhongw 于 2022-11-9 17:19 编辑

1. 编译android失败,下载的SDK md5sum 与 官网维基教程上的是不是一致
2. 先按照https://wiki.t-firefly.com/zh_CN ... ompile_android.html 排查下编译环境

作者: 子在川    时间: 2022-11-9 17:57
firefly_zhongw 发表于 2022-11-9 17:17
1. 编译android失败,下载的SDK md5sum 与 官网维基教程上的是不是一致
2. 先按照https://wiki.t-firefly. ...

1.md5sum 比对无误
2.编译环境也对
作者: firefly_zhongw    时间: 2022-11-10 17:47
提供的log信息有如下提示:
  1. 16:00:40 ************************************************************
  2. 16:00:40 You are building on a machine with 15.3GB of RAM
  3. 16:00:40
  4. 16:00:40 The minimum required amount of free memory is around 16GB,
  5. 16:00:40 and even with that, some configurations may not work.
  6. 16:00:40
  7. 16:00:40 If you run into segfaults or other errors, try reducing your
  8. 16:00:40 -j value.
  9. 16:00:40 ************************************************************
复制代码

尝试增大内存
作者: 子在川    时间: 2022-11-11 10:38
firefly_zhongw 发表于 2022-11-10 17:47
提供的log信息有如下提示:

尝试增大内存

你好,你这样的怀疑是不对的 。

经我反复的编译测试,以下报错就是因为没有boot.img造成的。
make bootimg可以成功编译,并且将boot.img更新到“out/target/product/rk3566_roc_pc/”目录下。

在此基础上运行命令“FFTools/mkupdate/mkupdate.sh -l rk3566_roc_pc-userdebug”就会报此错。

谢谢,在线等。
########################################
Make update.img
start to make update.img...
Android Firmware Package Tool v1.67
------ PACKAGE ------
Add file: ./package-file
package-file,Add file: ./package-file done,offset=0x800,size=0x2d4,userspace=0x1
Add file: ./Image/MiniLoaderAll.bin
bootloader,Add file: ./Image/MiniLoaderAll.bin done,offset=0x1000,size=0x6e9c0,userspace=0xde
Add file: ./Image/parameter.txt
parameter,Add file: ./Image/parameter.txt done,offset=0x70000,size=0x280,userspace=0x1
Add file: ./Image/uboot.img
uboot,Add file: ./Image/uboot.img done,offset=0x70800,size=0x400000,userspace=0x800
Add file: ./Image/misc.img
misc,Add file: ./Image/misc.img done,offset=0x470800,size=0xc000,userspace=0x18
Add file: ./Image/boot.img
Error:<AddFile> open file failed,err=2!
------ FAILED ------
Press any key to quit:
############################################

作者: 子在川    时间: 2022-11-11 11:29

请问下为什么boot.img文件会有区别:

#file out/target/product/rk3566_roc_pc/boot.img kernel/boot.img
out/target/product/rk3566_roc_pc/boot.img: Android bootimg, kernel (0x10008000), ramdisk (0x11000000), second stage (0x10f00000), page size: 2048, cmdline (console=ttyFIQ0 androidboot.baseband=N/A androidboot.wificountrycode=CN androidboot.veritymode=enforcing androidboot.hardware=r)

kernel/boot.img:                           Android bootimg, kernel (0x10008000), second stage (0x10f00000), page size: 2048
作者: firefly_zhongw    时间: 2022-11-11 15:16
  1. checkvintf E 11-09 16:03:25 14315 14315 check_vintf.cpp:554] For kernel requirements at matrix level 5, For config CONFIG_SYSVIPC, value = y but required n
  2. checkvintf E 11-09 16:03:25 14315 14315 check_vintf.cpp:554] : Success
  3. INCOMPATIBLE
  4. [ 13% 4057/29657] depmod out/target/product/rk3566_roc_pc/obj/PACKAGING/depmod_VENDOR_intermediates
  5. depmod: WARNING: could not open modules.order at /home/sgai/rk/RK3566_demo/Android11.0/Firefly-RK356X_Android11.0_git_20210824/RK356X_Android11.0/out/target/product/rk3566_roc_pc/obj/PACKAGING/depmod_VENDOR_intermediates/lib/modules/0.0: No such file or directory
  6. depmod: WARNING: could not open modules.builtin at /home/sgai/rk/RK3566_demo/Android11.0/Firefly-RK356X_Android11.0_git_20210824/RK356X_Android11.0/out/target/product/rk3566_roc_pc/obj/PACKAGING/depmod_VENDOR_intermediates/lib/modules/0.0: No such file or directory
  7. 16:03:29 ninja failed with: exit status 1
复制代码


有上述错误的话,kernel 做如下修改
  1. diff --git a/kernel/configs/r/android-4.19/android-base.config b/kernel/configs/r/android-4.19/android-base.config
  2. index 77fa4b8c3af..1da62ab6afb 100644
  3. --- a/kernel/configs/r/android-4.19/android-base.config
  4. +++ b/kernel/configs/r/android-4.19/android-base.config
  5. @@ -9,7 +9,6 @@
  6. # CONFIG_NFSD is not set
  7. # CONFIG_PM_AUTOSLEEP is not set
  8. # CONFIG_RT_GROUP_SCHED is not set
  9. -# CONFIG_SYSVIPC is not set
  10. # CONFIG_USELIB is not set
  11. # CONFIG_VHOST is not set
  12. CONFIG_ADVISE_SYSCALLS=y
复制代码

作者: 子在川    时间: 2022-11-15 09:43
firefly_zhongw 发表于 2022-11-11 15:16
有上述错误的话,kernel 做如下修改

1.已修改
kernel/configs/r/android-4.19/android-base.config

# CONFIG_NFS_FS is not set
# CONFIG_PM_AUTOSLEEP is not set
# CONFIG_RT_GROUP_SCHED is not set
-# CONFIG_SYSVIPC is not set
# CONFIG_USELIB is not set
# CONFIG_VHOST is not set
CONFIG_ADVISE_SYSCALLS=y

2.问题还是存在
will build update.img
-------------------KERNEL_DTS:rk3566-roc-pc

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=11
TARGET_PRODUCT=rk3566_roc_pc
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a55
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-2a
TARGET_2ND_CPU_VARIANT=cortex-a55
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.15.0-50-generic-x86_64-Ubuntu-22.04-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=RQ2A.210505.003
OUT_DIR=out
============================================
package resoure.img with charger images

Pack ./tools/images/ & ../kernel/resource.img to resource.img ...
Unpacking old image(../kernel/resource.img):
rk-kernel.dtb logo.bmp logo_kernel.bmp 3
Pack to resource.img successed!

Packed resources:
rk-kernel.dtb battery_1.bmp battery_2.bmp battery_3.bmp battery_4.bmp battery_5.bmp battery_fail.bmp logo.bmp logo_kernel.bmp battery_0.bmp 10

./resource.img with battery images is ready
/home/sgai/rk/221110_RK3566_demo_sdk
Make update.img
start to make update.img...
Android Firmware Package Tool v1.67
------ PACKAGE ------
Add file: ./package-file
package-file,Add file: ./package-file done,offset=0x800,size=0x2d4,userspace=0x1
Add file: ./Image/MiniLoaderAll.bin
bootloader,Add file: ./Image/MiniLoaderAll.bin done,offset=0x1000,size=0x6e9c0,userspace=0xde
Add file: ./Image/parameter.txt
parameter,Add file: ./Image/parameter.txt done,offset=0x70000,size=0x280,userspace=0x1
Add file: ./Image/uboot.img
uboot,Add file: ./Image/uboot.img done,offset=0x70800,size=0x400000,userspace=0x800
Add file: ./Image/misc.img
misc,Add file: ./Image/misc.img done,offset=0x470800,size=0xc000,userspace=0x18
Add file: ./Image/boot.img
Error:<AddFile> open file failed,err=2!
------ FAILED ------
Press any key to quit:
Make update image failed!


作者: firefly_zhongw    时间: 2022-11-15 10:18
本帖最后由 firefly_zhongw 于 2022-11-15 10:26 编辑

改完后要整个编译,而不是只打包。
作者: 子在川    时间: 2022-11-15 11:42
firefly_zhongw 发表于 2022-11-15 10:18
改完后要整个编译,而不是只打包。

整体编译,过了。




欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/) Powered by Discuz! X3.1