Firefly开源社区

标题: SDK编译 [打印本页]

作者: 度假。    时间: 2023-9-20 13:16
标题: SDK编译
通过repo下的代码buildroot编译失败
/home/bst/code/rk3568/device/rockchip/common/mk-buildroot.sh: line 21: /home/bst/code/rk3568/buildroot/build/envsetup.sh: No such file or directory
Command exited with non-zero status 1
you take 0:00.01 to build builroot
ERROR: Running build_buildroot failed!
ERROR: exit code 1 from line 1306:
    /usr/bin/time -f "you take %E to build builroot" $COMMON_DIR/mk-buildroot.sh $BOARD_CONFIG

请教这是为什么
tchip_askquestions

errorlog.txt

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


作者: 时间的蝴蝶    时间: 2023-9-20 16:15
'编译环境搭建' 章节有说明
https://wiki.t-firefly.com/zh_CN ... i-huan-jing-da-jian

编译 buildroot 要下载完整 SDK,repo init --no-clone-bundle --repo-url https://gitlab.com/firefly-linux/git-repo.git --no-repo-verify -u https://gitlab.com/firefly-linux/manifests.git -b master -m rk356x_linux_release.xml

不要用 root 用户编译
作者: 度假。    时间: 2023-9-20 16:41
时间的蝴蝶 发表于 2023-9-20 16:15
'编译环境搭建' 章节有说明
https://wiki.t-firefly.com/zh_CN/ROC-RK3568-PC/linux_compile.html#bian-yi ...

在普通用户下编译直接过不了,环境是Ubuntu18.04,刚刚尝试编译Ubuntu固件编译成功了

root@bst-YangTianM400-16IAQ:/home/bst/code/rk3568# ./build.sh roc-rk3568-pc-buildroot.mk
processing option: roc-rk3568-pc-buildroot.mk
switching to board: /home/bst/code/rk3568/device/rockchip/rk356x/roc-rk3568-pc-buildroot.mk
root@bst-YangTianM400-16IAQ:/home/bst/code/rk3568# su bst
bst@bst-YangTianM400-16IAQ:~/code/rk3568$ ./build.sh roc-rk3568-pc-buildroot.mk
processing option: roc-rk3568-pc-buildroot.mk
switching to board: /home/bst/code/rk3568/device/rockchip/rk356x/roc-rk3568-pc-buildroot.mk
ln: failed to create symbolic link '/home/bst/code/rk3568/device/rockchip/.BoardConfig.mk': Permission denied
ERROR: Running main failed!
ERROR: exit code 1 from line 2612:
    ln -rsf $CONF $BOARD_CONFIG
bst@bst-YangTianM400-16IAQ:~/code/rk3568$ su
密码:
root@bst-YangTianM400-16IAQ:/home/bst/code/rk3568# ./build.sh roc-rk3568-pc-buildroot.mk
processing option: roc-rk3568-pc-buildroot.mk
switching to board: /home/bst/code/rk3568/device/rockchip/rk356x/roc-rk3568-pc-buildroot.mk
root@bst-YangTianM400-16IAQ:/home/bst/code/rk3568# su bst
bst@bst-YangTianM400-16IAQ:~/code/rk3568$ ./build.sh
processing option: allff
============================================
TARGET_ARCH=arm64
TARGET_PLATFORM=rk356x
TARGET_UBOOT_CONFIG=firefly-rk3568
TARGET_SPL_CONFIG=
TARGET_KERNEL_CONFIG=firefly_linux_defconfig
TARGET_KERNEL_DTS=rk3568-firefly-roc-pc
TARGET_TOOLCHAIN_CONFIG=
TARGET_BUILDROOT_CONFIG=rockchip_rk3568
TARGET_RECOVERY_CONFIG=rockchip_rk356x_recovery
TARGET_PCBA_CONFIG=
TARGET_RAMBOOT_CONFIG=
============================================
============Start building uboot============
TARGET_UBOOT_CONFIG=firefly-rk3568
=========================================
grep: .config: No such file or directory
## make firefly-rk3568_defconfig -j24
  HOSTCC  scripts/basic/fixdep
scripts/basic/fixdep.c:481:1: fatal error: opening dependency file scripts/basic/.fixdep.d: 权限不够
}
^
compilation terminated.
scripts/Makefile.host:99: recipe for target 'scripts/basic/fixdep' failed
make[1]: *** [scripts/basic/fixdep] Error 1
Makefile:399: recipe for target 'scripts_basic' failed
make: *** [scripts_basic] Error 2
ERROR: Running build_uboot failed!
ERROR: exit code 2 from line 640:
    ./make.sh $RK_UBOOT_DEFCONFIG $UBOOT_COMPILE_COMMANDS CROSS_COMPILE=$CROSS_COMPILE
bst@bst-YangTianM400-16IAQ:~/code/rk3568$
作者: 时间的蝴蝶    时间: 2023-9-21 09:40
度假。 发表于 2023-9-20 16:41
在普通用户下编译直接过不了,环境是Ubuntu18.04,刚刚尝试编译Ubuntu固件编译成功了

root@bst-YangTi ...

你在 root 用户下操作过,会导致某些文件普通用户没有权限,要清理一下
最简单的方法就是重新同步SDK




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