laobanliang 发表于 2022-4-6 19:30:28

RK356X_Android11.0源码编译不过


复现步骤:
1、source build/envsetup.sh
2、lunch rk3568_firefly_roc_pc-userdebug
3、make installclean
4、make -j24



lrs@lrs-YangTianM4000e-08:/mnt/data/lrs_share/RK356X_Android11.0$ make -j24
19:22:06 ************************************************************
19:22:06 You are building on a machine with 15.6GB of RAM
19:22:06
19:22:06 The minimum required amount of free memory is around 16GB,
19:22:06 and even with that, some configurations may not work.
19:22:06
19:22:06 If you run into segfaults or other errors, try reducing your
19:22:06 -j value.
19:22:06 ************************************************************
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=11
TARGET_PRODUCT=rk3568_firefly_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.13.0-35-generic-x86_64-Ubuntu-20.04.4-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
============================================
wildcard(out/target/product/rk3568_firefly_roc_pc/clean_steps.mk) was changed, regenerating...
$(shell date +%y%m%d%H%M) was changed, regenerating...
initializing build system ...
device/rockchip/common/prebuild.mk:2: warning: Generating manifest snapshot at out/commit_id.xml...
device/rockchip/common/prebuild.mk:3: warning: You can disable this by removing this and setting BOARD_RECORD_COMMIT_ID := false in BoardConfig.mk
[ 98% 24092/24369] including build/make/target/board/Android.mk ...
build fstab file with device/rockchip/common/scripts/fstab_tools/fstab.in....
rebuilding dtbo image with device/rockchip/rk356x/rk3568_firefly_roc_pc/dt-overlay.in....
build parameter.txt with device/rockchip/common/scripts/parameter_tools/parameter.in....
[ 99% 24149/24369] including external/rk_tee_user/v2/Android.mk ...
'building rk_tee_user v2'
[ 99% 24210/24369] including hardware/rockchip/camera_engine_rkisp/Android.mk ...
TARGET_BOARD_PLATFORM=rk356x
[ 99% 24217/24369] including hardware/rockchip/libhwjpeg/Android.mk ...

[ 99% 24220/24369] including hardware/rockchip/librga/Android.mk ...
RGA is compiling with Android.mk Generated version.h
[ 99% 24222/24369] including hardware/rockchip/omx_il/Android.mk ...
date: Unknown option 'R' (see "date --help")
cp: .git/hooks/pre-commit: No such file or directory
tools/hooks .git/hooks
[ 99% 24368/24369] finishing build rules ...
packages/apps/Camera2/Android.mk: warning: "Camera2 (app:platform) should not link against libjni_jpegutil (native:ndk:libc++:static)"
FAILED: ninja: 'kernel/arch/arm64/boot/Image', needed by 'out/target/product/rk3568_firefly_roc_pc/kernel', missing and no known rule to make it
19:23:44 ninja failed with: exit status 1

#### failed to build some targets (01:39 (mm:ss)) ####

lrs@lrs-YangTianM4000e-08:/mnt/data/lrs_share/RK356X_Android11.0$

laobanliang 发表于 2022-4-6 19:54:55

SDK更新到哪个COMMIT: 47b12149d90dc56b3ef7a8e99a3848f82c1e4

zyk 发表于 2022-4-6 22:15:24

是否有编译内核,第一次编译建议先用以下命令跑一次
./FFTools/make.sh -d rk3568-firefly-roc-pc -j8 -l rk3568_firefly_roc_pc-userdebug
./FFTools/mkupdate/mkupdate.sh -l rk3568_firefly_roc_pc-userdebug

laobanliang 发表于 2022-4-7 10:04:54

还是报错:


lrs@lrs-YangTianM4000e-08:/mnt/data/lrs_share/RK356X_Android11.0$ ./FFTools/mkupdate/mkupdate.sh -l rk3568_firefly_roc_pc-userdebug
will build update.img
-------------------KERNEL_DTS:rk3568-firefly-roc-pc

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=11
TARGET_PRODUCT=rk3568_firefly_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.13.0-35-generic-x86_64-Ubuntu-20.04.4-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

ERROR: No ../kernel/resource.img
cp: 无法获取'rockdev/Image-rk3568_firefly_roc_pc/*' 的文件状态(stat): 没有那个文件或目录
Make update.img
./build.sh: 行 182: ./mkupdate_rk356x.sh: 没有那个文件或目录
Make update image failed!
lrs@lrs-YangTianM4000e-08:/mnt/data/lrs_share/RK356X_Android11.0$

zyk 发表于 2022-4-7 14:28:33

本帖最后由 zyk 于 2022-4-7 14:30 编辑

前一条命令是否编译正常,源码是保存在共享目录下进行编译的?

另外请问使用的pc环境系统是什么,有下面这种打印的
9:22:06 ************************************************************
19:22:06 You are building on a machine with 15.6GB of RAM
19:22:06
19:22:06 The minimum required amount of free memory is around 16GB,
19:22:06 and even with that, some configurations may not work.
19:22:06
19:22:06 If you run into segfaults or other errors, try reducing your
19:22:06 -j value.
19:22:06 ************************************************************

laobanliang 发表于 2022-4-7 16:02:02

已解决,Ubuntu版本太高导致丢失文件了。

zyk 发表于 2022-4-7 16:39:57

laobanliang 发表于 2022-4-7 16:02
已解决,Ubuntu版本太高导致丢失文件了。

请问用的是Ubuntu哪个版本

laobanliang 发表于 2022-4-7 19:38:41

本帖最后由 laobanliang 于 2022-4-7 19:41 编辑

Ubuntu 20.04

但是我在Ubuntu 14.04上编译到80%左右也报错了,错误log如下:
mkbootimg: error: argument --second: can't open 'kernel/resource.img': No such file or directory: 'kernel/resource.img'
18:53:53 ninja failed with: exit status 1

#### failed to build some targets (03:57 (mm:ss)) ####


请问是文件丢失么,我是通过远程ssh控制编译的,单独编译kernel也报错:
/bin/sh: 1: lz4c: not found
make: *** Error 1

也确实没有Image.lz4文件,源码中是否有这个文件?

laobanliang 发表于 2022-4-7 19:49:02


```
cd ~/proj/
7z x ./Firefly-RK356X_Android11.0_git_20210824.7z.001 -oRK356X_Android11.0
cd ./RK356X_Android11.0
git reset --hard

```

1、以上方式,解压后通过git reset --hard获取代码为何不同的Ubuntu版本获取的源码不同?
2、是否必须在Ubuntu 18.04上编译?

zyk 发表于 2022-4-7 20:40:29

laobanliang 发表于 2022-4-7 19:49
```
cd ~/proj/
7z x ./Firefly-RK356X_Android11.0_git_20210824.7z.001 -oRK356X_Android11.0


ubuntu20.04没有试过,理论上不影响;获取的源码版本不同是怎么确认的,下载的源码如果md5sum是一样的说明都是一样的。需要确认一下是否是依赖的工具问题,例如liblz4-tool
页: [1] 2 3
查看完整版本: RK356X_Android11.0源码编译不过