[RV1126_RV1109] 环境搭建及SDK编译

安装Git、Python和Repo,通过repo下载SDK

SDK下载地址:

repo init --repo-url ssh://git@www.rockchip.com.cn/repo/rk/tools/repo \-u ssh://git@www.rockchip.com.cn/linux/rockchip/platform/manifests \-b linux -m rv1126_rv1109_linux_release.xml
 .repo/repo/repo sync -c -j4

SDK软件同步命令

.repo/repo/repo sync -c -j4

查看SDK版本:

realpath .repo/manifests/rv1126_rv1109_linux_release.xml
 # 
例如:打印的版本号为
v1.3.1
 #       
更新时间为
2020-09-21
 # /home/rv1109-
SDK/.repo/manifests/rv1126_rv1109_linux/rv1126_rv1109_linux_v1.3.1_20200921.xml

设置DNS支持kgithub.com

sudo sed -i '$a 43.154.68.204\tkgithub.com' /etc/hosts
sudo sed -i '$a 43.155.83.75\traw.kgithub.com' /etc/hosts
sudo sed -i '$a 43.155.83.75\tobjects.githubusercontent.kgithub.com' /etc/hosts

为每个工程创建default分支

.repo/repo/repo start default --all
 repo: warning: Python 2 is no longer supported; Please upgrade to Python 3.6+.
 repo: warning: Python 2 is no longer supported; Please upgrade to Python 3.6+.
 Starting default: 100% (71/71), done.

关于交叉工具链,在SDK包中提供了2个,分别用于"文件系统和上层应用编译 "与"U-Boot和Linux内核编译"

文件系统和上层应用编译:

sdk/prebuilts/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux gnueabihf

U-Boot和Linux内核编译

sdk/prebuilts/gcc/linux-x86/arm/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux gnueabihf

按照官方SDK文档,在编译sdk之前,需要安装依赖的软件包

Ubuntu 16.04 系统: 编译环境搭建所依赖的软件包以及安装命令如下:

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 

Ubuntu 17.04 及以上系统: 除了上述软件包外还需如下依赖包:

sudo apt-get install lib32gcc-7-dev g++-7 libstdc++-7-dev  

注意:

CMake版本需≥3.8

Python版本需要≥3.6

板级配置的目录在device/rockchip/rv1126_1109下

切换板级配置命令

方法 1 ./build.sh 后⾯加上板级配置⽂件 , 例如:

选择通⽤ IPC 类产品的板级配置

./build.sh device/rockchip/rv1126_rv1109/rockchip_defconfig 

选择门锁、门铃、猫眼等带电池产品的板级配置 , 对应 EVB 板 RV1126_RV1109_EVB_DDR3P216SD6_V13_20200630LXF

./build.sh device/rockchip/rv1126_rv1109/rockchip_tb_v13_defconfig  

方法2

./build.sh lunch

之后根据列表选择对应的板级配置,再进行编译

编译可以各模块分开编译,也可以全自动编译,这里我用全自动编译

./build.sh all 
#只编译模块代码(u-boot\kernel\rootfs\recovery)
#执行完后需要在执行./mkfirmware.sh进行固件打包

./build.sh
#在build.sh all的基础上
#1.增加固件打包 ./mkfirmware.sh
#2.update.img打包
#3.复制rockkdev目录下的固件到output/

在编译的时候,可能会报一个#include_next的错,原因是交叉编译时指定了sysroot导致include_next时找不到stdlib.h,解决方法参考:#include_next 导致 cstdlib:fatal error:stdlib.h :No such file or directiry_fatal error: cstdlib: no such file or directory-优快云博客

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

wangzn2016

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值