yy3568编译ubuntu 20.04失败
硬件主板型号:yy3568
固件名称/系统版本:
自编的或固件下载地址:yy3568-ubuntu-linux-sdk-231112.tar.gz
Log日志:
编译环境:ubuntu 22.04 amd_64
问题描述及复现步骤:
我参考 https://wiki.youyeetoo.cn/zh/YY3568/ubuntu 这篇文章“SDK编译固件”章节进行,过程中发现这篇文章中有些问题,最后也编译失败,问题和情况如下:
1、从百度网盘中下载SDK文件没有.git文件目录,无法执行git checkout HEAD .命令
按照这个文档的链接我下载了yy3568-ubuntu-linux-sdk-231112.tar.gz文件并解压,但是文件中没有.git目录,所以根本不能执行git命令,pull到最新版本
国内用户请从网盘中获取Ubuntu Linux SDK。这里教程对应的是yy3568-ubuntu-linux-sdk-230821.tar.gz。后面有更新的,请最新的包。
链接: https://pan.baidu.com/s/1mEaK6tjmsPyO2z6-9nx4CA?pwd=yy35
提取码: yy35
$ mkdir yy3568
$ cd yy3568
$ tar -xf ../yy3568-ubuntu-linux-sdk-230821.tar.gz
$ cd sdk
$ git checkout HEAD .
export YY_SDK_ROOT={PWD}# 可选,为后面方面描述方便设置了该环境变量
<div>root@ubuntu:~/yy3568/sdk# git checkout HEAD .
fatal: not a git repository (or any of the parent directories): .git
root@ubuntu:~/yy3568/sdk# ll -a
total 52
drwxrwxr-x 13 root root 4096 Nov 22 02:38 ./
drwxr-xr-x3 root root 4096 Nov 21 07:53 ../
drwxrwxr-x9 root root 4096 Nov 122023 app/
drwxrwxr-x 17 root root 4096 Nov 22 02:37 buildroot/
lrwxrwxrwx1 root root 39 Nov 122023 build.sh -> device/rockchip/common/scripts/build.sh*
drwxrwxr-x3 root root 4096 Nov 122023 device/
drwxrwxr-x 25 root root 4096 Nov 122023 external/
drwxrwxr-x 26 root root 4096 Nov 22 02:36 kernel/
lrwxrwxrwx1 root root 31 Nov 122023 Makefile -> device/rockchip/common/Makefile
drwxr-xr-x8 root root 4096 Nov 22 02:37 output/
drwxrwxr-x3 root root 4096 Nov 122023 prebuilts/
lrwxrwxrwx1 root root 32 Nov 21 07:55 README.md -> device/rockchip/common/README.md
drwxrwxr-x9 root root 4096 Nov 122023 rkbin/
lrwxrwxrwx1 root root 41 Nov 122023 rkflash.sh -> device/rockchip/common/scripts/rkflash.sh*
drwxrwxr-x5 root root 4096 Nov 122023 tools/
drwxrwxr-x 25 root root 4096 Nov 122023 u-boot/
drwxrwxr-x4 root root 4096 Nov 22 02:37 ubuntu/</div>
2、不能pull最新版本我就用这个版本来编译吧,遇到了第二个问题,一方面该文章要求ubuntu 22.04的Python 3.10以上版本,但是这个版本的命令是python3,而SDK文件使用的命令是python,所以我自己搞了一个链接解决这个问题
<div># 解决编译过程中需要python命令的错误
root@ubuntu:~# which python3.10
/usr/bin/python3.10
root@ubuntu:~# sudo ln -s /usr/bin/python3.10 /usr/bin/python
root@ubuntu:~# python --version
Python 3.10.12</div>
3、但是最后编译到recovery文件时还是失败了,我分析了半天,不知道问题出在哪里,附件build.rar是执行./build.sh的全部日志
因为报错是在执行这行时:/usr/bin/time -f "you take %E to build recovery(buildroot)" "$SCRIPTS_DIR/mk-buildroot.sh" $RK_RECOVERY_CFG "$DST_DIR"
我打印出了参数,并手动执行该命令和参数,结果见附件“mk-buildroot.sh命令执行结果”
看上去与没有.git目录有关,但编译过程中多次出现了这个错误,也都继续下去了。
请帮我看一下问题出在哪里,如何解决
https://wiki.youyeetoo.cn/zh/YY3568/environment
参考上面这个
本帖最后由 kursk 于 2024-11-25 08:39 编辑
参考这篇文档进行编译还是报错 https://wiki.youyeetoo.cn/zh/YY3568/environment
我从这里下载了4个gz文件并解压http://dd.youyeetoo.cn:5000/sharing/2bkwX9vRn
执行过程如下
# 准备环境
sudo apt-get install -y repo git ssh make gcc libssl-dev liblz4-tool expect g++ patchelf chrpath gawk texinfo chrpath \
diffstat binfmt-support qemu-user-static live-build bison flex fakeroot cmake gcc-multilib g++-multilib unzip \
device-tree-compiler python-pip libncurses-dev
root@3568:~/yy3568/sdk#sudo ln -s /usr/bin/python3.10 /usr/bin/python
root@3568:~/yy3568/sdk# python --version
Python 3.10.12
mkdir yy3568
cd yy3568
root@privatehub:~/yy3568# ll
total 15021264
drwxr-xr-x 4 root root 4096 Nov 13 15:17 ./
drwx------ 9 root root 4096 Nov 13 14:55 ../
-rw-r--r-- 1 root root 4294967296 Nov 12 15:49 yy3568_linux_release_v1.1_20241014_sdk.tar.gz00
-rw-r--r-- 1 root root 4294967296 Nov 12 15:52 yy3568_linux_release_v1.1_20241014_sdk.tar.gz01
-rw-r--r-- 1 root root 4294967296 Nov 12 15:53 yy3568_linux_release_v1.1_20241014_sdk.tar.gz02
-rw-r--r-- 1 root root 2496838384 Nov 12 15:42 yy3568_linux_release_v1.1_20241014_sdk.tar.gz03
cat yy3568_linux_release_v1.1_20241014_sdk.tar.gz0* | tar -xzvf -
git config --global --add safe.directory /root/yy3568/sdk/.repo/manifests
# 我的路由器上有透明代理,从外网同步代码可以成功,以下命令成功执行完毕
.repo/repo/repo sync -l
# compile ubuntu source
./build.sh lunch
10
./build.sh #最后执行失败,整个编译日志如附件
而且失败报错以第一个方法相同
Command exited with non-zero status 1
you take 0:48.29 to build recovery(buildroot)
ERROR: Running /root/yy3568/sdk/device/rockchip/common/scripts/mk-recovery.sh - build_hook failed!
ERROR: exit code 1 from line 29:
/usr/bin/time -f "you take %E to build recovery(buildroot)" "$SCRIPTS_DIR/mk-buildroot.sh" $RK_RECOVERY_CFG "$DST_DIR"
ERROR: call stack:
mk-recovery.sh: build_hook(29)
mk-recovery.sh: main(42)
ERROR: Running /root/yy3568/sdk/device/rockchip/common/build-hooks/99-all.sh - build_all failed!
ERROR: exit code 1 from line 27:
"$SCRIPTS_DIR/mk-recovery.sh"
ERROR: call stack:
99-all.sh: build_all(27)
99-all.sh: build_hook(123)
build-helper: try_func(63)
build-helper: try_hook(95)
build-helper: source(173)
99-all.sh: main(134)
ERROR: Running /root/yy3568/sdk/device/rockchip/common/build-hooks/99-all.sh - try_func build_hook all failed!
ERROR: exit code 1 from line 67:
build_hook
ERROR: call stack:
build-helper: try_func(67)
build-helper: try_hook(95)
build-helper: source(173)
99-all.sh: main(134)
ERROR: Running ./build.sh - run_hooks build all failed!
ERROR: exit code 1 from line 160:
/root/yy3568/sdk/device/rockchip/common/build-hooks/99-all.sh build all
ERROR: call stack:
build.sh: run_hooks(160)
build.sh: run_build_hooks(179)
build.sh: main(474)
build.sh: main(489)
ERROR: Running ./build.sh - run_build_hooks build all failed!
ERROR: exit code 1 from line 182:
build
ERROR: call stack:
build.sh: run_build_hooks(182)
build.sh: main(474)
build.sh: main(489)
kursk 发表于 2024-11-23 16:21
参考这篇文档进行编译还是报错 https://wiki.youyeetoo.cn/zh/YY3568/environment
我从这里下载了4个gz文 ...
用普通用户试试,不行的话,用我们SDK中提供的docker试试 问题解决了
参考这篇文章 https://blog.csdn.net/haosou98/article/details/135296069
安装了这个包就可以通过
sudo apt install bsdmainutils
页:
[1]