SDK编译

固件类型:官方提供的固件
固件文件名称:/
固件下载地址:repo
Log日志:errorlog.txt

通过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 (300 KB)

‘编译环境搭建’ 章节有说明
https://wiki.t-firefly.com/zh_CN/ROC-RK3568-PC/linux_compile.html#bian-yi-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: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-20 16:41
在普通用户下编译直接过不了,环境是Ubuntu18.04,刚刚尝试编译Ubuntu固件编译成功了

root@bst-YangTi …

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

时间的蝴蝶 发表于 2023-9-20 16:15
‘编译环境搭建’ 章节有说明
编译 Linux4.19 固件 — Firefly Wiki

借楼请教问题,因为我发不出来帖子。问题如下:
固件文件名称: k3588_linux_release_20250114_v1.4.0g
固件下载地址: 百度网盘attach://16527.rar

根据wiki :2. 编译 Linux 固件 (内核版本 5.10) — Firefly Wiki (t-firefly.com) 步骤 执行./build.sh 编译buildroot固件失败,以下是部分失败log:
请问如何解决,之前用这个sdk编译过ubuntu的固件并且成功运行。
以下是错误log:我看libiberty.a这个库编译时候是带着-fPIC的
“2025-08-13T14:25:45 /usr/bin/ld: ../build-x86_64-pc-linux-gnu/libiberty/libiberty.a(xstrerror.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC 2025-08-13T14:25:45 /usr/bin/ld: final link failed: Nonrepresentable section on output 2025-08-13T14:25:45 collect2: error: ld returned 1 exit status 2025-08-13T14:25:45 Makefile:3011: recipe for target 'build/genchecksum' failed 2025-08-13T14:25:45 make[3]: *** [build/genchecksum] Error 1 2025-08-13T14:25:45 make[3]: *** Waiting for unfinished jobs.... 2025-08-13T14:25:45 /usr/bin/ld: ../build-x86_64-pc-linux-gnu/libiberty/libiberty.a(hashtab.o): relocation R_X86_64_32S against .rodata’ can not be used when making a PIE object; recompile with -fPIC”