rv1126编译

备注:之前看文档,一直以为要ssh的密钥之类的,实际不需要;

一、目的:1、熟悉目录结构;2、掌握编译方法;3、记录编译过程;4、掌握烧写方法;

二、步骤:
1、获取下载包
rv1126_rv1109_linux_v1.8.0_20210224.tar
2、解压
mkdir rv1126
tar xvf rv1126_rv1109_linux_v1.8.0_20210224.tar
cd rv1126
3、编译环境搭建(大约要3-4h)
sudo apt-get install repo device-tree-compiler git-core u-boot-tools mtools parted libudev-dev libusb-1.0-0-dev python-linaro-image-tools linaro-image-tools autoconf autotools-dev libsigsegv2 m4 intltool libdrm-dev curl sed make binutils build-essential gcc g++ bash patch gzip gawk bzip2 perl tar cpio python unzip rsync file bc wget libncurses5 libqt4-dev libglib2.0-dev libgtk2.0-dev libglade2-dev cvs git mercurial openssh-client subversion asciidoc w3m dblatex graphviz python-matplotlib libc6:i386 libssl-dev expect fakeroot cmake flex bison liblz4-tool libtool keychain;
3.1遇到错误(解决方法,删除锁定文件:sudo rm /var/lib/dpkg/lock-frontend ;sudo rm /var/lib/dpkg/lock)

E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

4、SDK下载--->本地解压的方式,不需要从网络下载(跳过此步)
repo init --repo-url ssh://git@www.rockchip.com.cn/repo/rk/tools/repo -u ssh://git@www.rockchip.com.cn/linux/rk/platform/manifests -b linux -m rv1126_rv1109_linux_release.xml
4.1遇到的错误
【The authenticity of host 'www.rockchip.com.cn (58.22.7.114)' can't be established.
ECDSA key fingerprint is SHA256:veOzrhgNGlRJJyd8jnHIsazEzt1CDJ0NZ3Dfq6gODRM.
Are you sure you want to continue connecting (yes/no)? Host key verification failed.
The authenticity of host 'www.rockchip.com.cn (58.22.7.114)' can't be established.
ECDSA key fingerprint is SHA256:veOzrhgNGlRJJyd8jnHIsazEzt1CDJ0NZ3Dfq6gODRM.
Are you sure you want to continue connecting (yes/no)? yes】
5、SDK本地获取
.repo/repo/repo sync -l //获取
.repo/repo/repo sync -c //更新
6、查看SDK版本:realpath .repo/manifests/rv1126_rv1109_linux_release.xml
7、为每个工程创建default 分支 :.repo/repo/repo start default --all(没明白含义)
8、切换板级配置命令:./build.sh lunch
9、中间编译rootfs时,遇到一个linux HEAD downloading,一直在downloading;
--->依据文档,手动配置下文件系统,实际啥都没配,编译通过(正确的解决方法:需要手动把linux.HEAD.tar相关的包放到buildroot/dl目录下);

10、重新编译一次,遇到一个问题:host-gettext-0.19.8.1编译不过去,后续是直接去掉了dl目录下的gettext-0.19.8.1.tar.xz文件,不编译这个选项了/或者把编译的host-gettext-0.19.8.1拷到recovery目录下(这个地方有点不清晰,弄明白了,编译ncurses-6.1库的时候,需要依据下述的方法去配置configure #CFLAGS="-O3 -fPIC" ./configure  make  make install

);
11、烧写程序,需要加载新的设备驱动;

12、g++: internal compiler error: Killed (program cc1plus)----》编译库文件时,make -j12 遇到这个错误,应该是虚拟机内存不足导致的,编译参数改成make -j6可正编译通过

posted @ 2021-04-23 16:35  古先生-嵌入式  阅读(2558)  评论(2编辑  收藏  举报