1:安装软件
终端下输入安装命名:
sudo apt install openssh-server
sudo apt install android-tools-adb
sudo apt install vim net-tools git
sudo apt install cmake
sudo apt install tree
sudo apt install minicom
sudo apt install gawk
sudo apt install bison
sudo apt install flex
sudo apt install libssl-dev
sudo apt install device-tree-compiler
sudo apt install gcc-aarch64-linux-gnu mtools partedlibudev-dev
E: 无法定位软件包 partedlibudev-dev
sudo apt install libusb-1.0-0-dev autoconf autotools-devlibsigsegv2 m4 intltool libdrm-dev curl sed
E: 无法定位软件包 autotools-devlibsigsegv2
sudo apt install make binutils build-essential gcc g++ bashpatch gzip gawk bzip2
E: 无法定位软件包 bashpatch
sudo apt install perl tar cpio python unzip rsync file bcwget libncurses5 u-boot-tools
E: 无法定位软件包 bcwget
sudo apt install cvs mercurial rsync openssh-clientsubversion expect
E: 无法定位软件包 openssh-clientsubversion
sudo apt install fakeroot liblz4-toollibtool keychain libncurses-dev texinfo –y
E: 无法定位软件包 liblz4-toollibtool
2:解压SDK,新建文件夹RV1126,将SDK拷贝过来。进行解压:
tar -xvf rv1126_rv1109_linux_release_20211022.tgz
3:编译
su 下进行.ROOT.
安 装 完 成 后 在 工 程 的 根 目 录 下 执 行 命 令 “ source envsetup.sh ”会 出 现 很 多 选 项 , 选 择
rockchip_rv1126_rv1109
接着在工程的根目录下执行 “./build.sh lunch”,这时会出现很多
选项,选择BoardConfig-aybering.mk
在完前提操作下在工程根目录下执行命令“./build.sh”
/build.sh lunch
sudo ./build.sh
错误:
you need to install 'unbuffer' (from package expect or expect-dev)
log saved on /home/h00003/RV1126/rv1126_rv1109_v2.2.0_20210825/br.log
tail: cannot open '/home/h00003/RV1126/rv1126_rv1109_v2.2.0_20210825/br.log' for reading: No such file or directory
Command exited with non-zero status 1
you take 0:00.85 to build builroot
ERROR: Running build_buildroot failed!
出现问题,输入:
sudo apt install expect
重新编译。
错误:
2023-03-01T21:54:25 checking whether mkfifo rejects trailing slashes... yes
2023-03-01T21:54:25 checking whether mknod can create fifo without root privileges... configure: error: in `/home/h00003/RV1126/rv1126_rv1109_v2.2.0_20210825/buildroot/output/rockchip_rv1126_rv1109/build/host-tar-1.29':
2023-03-01T21:54:25 configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
2023-03-01T21:54:25 See `config.log' for more details
2023-03-01T21:54:25 make[1]: *** [package/pkg-generic.mk:221: /home/h00003/RV1126/rv1126_rv1109_v2.2.0_20210825/buildroot/output/rockchip_rv1126_rv1109/build/host-tar-1.29/.stamp_configured] Error 1
2023-03-01T21:54:25 make: *** [/home/h00003/RV1126/rv1126_rv1109_v2.2.0_20210825/buildroot/output/rockchip_rv1126_rv1109/Makefile:16: _all] Error 2
Command exited with non-zero status 1
you take 0:44.29 to build builroot
ERROR: Running build_buildroot failed!
ERROR: exit code 1 from line 547:
解决:
1.su 回车-----------进入root用户模式
2.export FORCE_UNSAFE_CONFIGURE=1 回车------设置
3.重新编译
错误:
/bin/sh: 1: lz4c: not found
arch/arm/boot/compressed/Makefile:191: recipe for target 'arch/arm/boot/compressed/piggy_data' failed
make[2]: *** [arch/arm/boot/compressed/piggy_data] Error 1
arch/arm/boot/Makefile:71: recipe for target 'arch/arm/boot/compressed/vmlinux' failed
make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
arch/arm/Makefile:351: recipe for target 'zImage' failed
make: *** [zImage] Error 2
ERROR: Running build_kernel failed!
ERROR: exit code 2 from line 500:
解决:
sudo apt-get install liblz4-tool
错误:
2023-03-02T00:24:58 make[2]: g++: Command not found
解决:
sudo apt-get install g++
错误:
2023-03-02T01:09:28 Resolving cdn.kernel.org (cdn.kernel.org)... 151.101.109.176, 2a04:4e42:1a::432
2023-03-02T01:09:28 Connecting to cdn.kernel.org (cdn.kernel.org)|151.101.109.176|:443... connected.
2023-03-02T01:10:06 Unable to establish SSL connection.
2023-03-02T01:10:06 --2023-03-02 01:10:06-- http://sources.buildroot.net/iw-4.9.tar.xz
2023-03-02T01:10:06 Resolving sources.buildroot.net (sources.buildroot.net)... 172.67.72.56, 2606:4700:20::681a:25, 2606:4700:20::681a:125, ...
2023-03-02T01:10:27 Connecting to sources.buildroot.net (sources.buildroot.net)|172.67.72.56|:80... failed: Connection refused.
2023-03-02T01:10:27 Connecting to sources.buildroot.net (sources.buildroot.net)|2606:4700:20::681a:25|:80... failed: Network is unreachable.
2023-03-02T01:10:27 Connecting to sources.buildroot.net (sources.buildroot.net)|2606:4700:20::681a:125|:80... failed: Network is unreachable.
2023-03-02T01:10:27 Connecting to sources.buildroot.net (sources.buildroot.net)|2606:4700:20::ac43:4838|:80... failed: Network is unreachable.
2023-03-02T01:10:27 package/pkg-generic.mk:138: recipe for target '/home/han/RV1126/rv1126_rv1109_v2.2.0_20210825/buildroot/output/rockchip_rv1126_rv1109/build/iw-4.9/.stamp_downloaded' failed
2023-03-02T01:10:27 make[1]: *** [/home/han/RV1126/rv1126_rv1109_v2.2.0_20210825/buildroot/output/rockchip_rv1126_rv1109/build/iw-4.9/.stamp_downloaded] Error 1
2023-03-02T01:10:27 /home/han/RV1126/rv1126_rv1109_v2.2.0_20210825/buildroot/output/rockchip_rv1126_rv1109/Makefile:16: recipe for target '_all' failed
2023-03-02T01:10:27 make: *** [_all] Error 2
_handshake() failed: Error in the pull function.
2023-03-02T01:49:35 Shallow clone failed, falling back to doing a full clone
2023-03-02T01:49:35 Doing full clone
2023-03-02T01:49:35 Cloning into 'stressapptest-master'...
2023-03-02T01:49:56 fatal: unable to access 'https://github.com/stressapptest/stressapptest/': Failed to connect to github.com port 443: Connection refused
2023-03-02T01:49:57 --2023-03-02 01:49:57-- http://sources.buildroot.net/stressapptest-master.tar.gz
2023-03-02T01:49:57 Resolving sources.buildroot.net (sources.buildroot.net)... 104.26.0.37, 2606:4700:20::681a:125, 2606:4700:20::681a:25, ...
2023-03-02T01:49:57 Connecting to sources.buildroot.net (sources.buildroot.net)|104.26.0.37|:80... connected.
2023-03-02T01:49:57 HTTP request sent, awaiting response... 404 Not Found
2023-03-02T01:49:57 2023-03-02 01:49:57 ERROR 404: Not Found.
2023-03-02T01:49:57
2023-03-02T01:49:57 package/pkg-generic.mk:138: recipe for target '/home/han/RV1126/rv1126_rv1109_v2.2.0_20210825/buildroot/output/rockchip_rv1126_rv1109/build/stressapptest-master/.stamp_downloaded' failed
2023-03-02T01:49:57 make[1]: *** [/home/han/RV1126/rv1126_rv1109_v2.2.0_20210825/buildroot/output/rockchip_rv1126_rv1109/build/stressapptest-master/.stamp_downloaded] Error 1
2023-03-02T01:49:57 /home/han/RV1126/rv1126_rv1109_v2.2.0_20210825/buildroot/output/rockchip_rv1126_rv1109/Makefile:16: recipe for target '_all' failed
2023-03-02T01:49:57 make: *** [_all] Error 2
解决:
env|grep -I proxy
http_proxy=http://127.0.0.1:8118
ftp_proxy=http://127.0.0.1:8118
https_proxy=http://127.0.0.1:8118
unset http_proxy
unset ftp_proxy
unset https_proxy
错误:
you take 13:26.31 to build recovery
Running build_recovery succeeded.
Skipping build_ramboot for missing configs: RK_CFG_RAMBOOT.
Running build_all succeeded.
Install fakeroot First.
sudo apt-get install fakeroot
ERROR: Running build_firmware failed!
ERROR: exit code 255 from line 775:
./mkfirmware.sh $BOARD_CONFIG
解决:sudo apt-get install fakeroot
4:编译过程
漫长等待。。。。。。
编译成功