当前位置:网站首页>Rk3568 development board evaluation (II): development environment construction
Rk3568 development board evaluation (II): development environment construction
2022-07-03 00:52:00 【ningmengzier】
author :ouxiaolong
development environment ——
host :Ubuntu18.04
Development board : Feiling embedded OK3568-C Development board
Windows There are a lot of virtual machine software , At present, there are VMware and VirtualBox.VMware It is divided into charging Professional Edition Workstation Pro And non-commercial Free Edition Workstation Player, Recommended Workstation Player.
The compiler host used by the author here Ubuntu18.04, About Workstation and Ubuntu The installation author will not repeat here , There's a lot of information online , By default, the author has installed Workstation and Ubuntu.
01 Dependency library installation
1.1 Update the source list of the host
$sudo apt-get update
1.2 Install dependent tools
$sudo apt-get install repo git ssh make gcc libssl-devliblz4-toolexpect g++ patchelf chrpath gawk texinfo chrpathdIFfstatbinfmt-supportqemu-user-static live-build bison flex fakeroot cmakegcc-multilibg++-multilib unzip device-tree-compiler python-piplibncurses5-devbuild-essential vim tree
02TFTP Service environment construction and testing
TFTP Simple file transfer protocol , It's based on UDP Protocol a protocol implemented for simple file transfer between client and server , Suitable for low cost 、 Uncomplicated applications .
TFTP The protocol is specially designed for small file transfer , You can only get files from the server , Or write a file to the server , Can't list the contents , It can't be certified .
(1) Download and install tftp
$sudo apt-get install openbsd-inetd
(2) newly build tftp Directory and change its properties
$sudo mkdir /tftpboot
(3) modify /etc/inetd.conf file
$sudo vim /etc/inetd.conf
Add the following :
tftpdgram udp wait nobody /usr/sbin/tcpd/usr/sbin/in.tftpd /tftpboot
(4) start-up tftp
$sudo /etc/init.d/openbsd-inetd start
(5) Local testing
stay /tftpboot/ Create a new file in the directory test, Input content 、 preservation . Then open another terminal , Test file transfer .
– Enter the command tftp127.0.0.1
– Input gettest
– Input q You can quit
– after , Use ls Command can find that there is..., in the current directory test file , If the file and the server test The file is as like as two peas. , Indicates that the server is successfully set up .

(6) Development board testing
Development board download test
#tftp-g -l test -r test +IP Address

( notes :-l The file after downloading is the file name , You can customize ;-r Next is the file name of the server )
03 Install and configure the cross compilation tool chain
stay Linaro There are many kinds on the official website GCC Cross compile toolchain , Because of what we use RK3568 The development board is a Cortex-A55 kernel 64 Bit development board , choice aarch64-linux-gnu.
Address :https://releases.linaro.org/components/toolchain/binaries/latest-7/aarch64-linux-gnu/

There are many cross compilers in the diagram , We just need to focus on these two :
in the light of 32 Bit system gcc-linaro-7.5.0-2019.12-i686_aarch64-linux-gnu.tar.xz And for 64 Bit system gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz.
According to what you use Ubuntu Select the appropriate version for the system type , For example, I installed Ubuntu14.04 yes 64 Bit system , So I'm going to use gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz.
04 Cross compiler installation
Copy the cross compiler Ubuntu Medium /opt Under the table of contents ( No, opt Then create a new directory ), Do the following :
1. decompression gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar
Use the following command
$sudotar -xvf gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar //
Must use super user mode .
2. edit ~/.bashrc file
$vi ~/.bashrc
Add a line at the end of the file
exportPATH=$PATH:/opt/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin
Save and exit .
3. function source~/.bashrc Let the document take effect
$source ~/.bashrc
05 Cross compiler verification
Method 1 :
Type... On the command line aarch64-l Then press tab Key to see if it will automatically complete
Method 2 :
Input :aarch64-linux-gnu-gcc-v

The above figure shows that the configuration is successful !
It can be seen from the figure that the version number of the current cross compiler is 7.5.0, It indicates that the cross compilation tool chain is successfully installed ( notes : The cross compiler version installed by the editor is 7.5.0,OK3568-C The source code package of the development board is 9.3.0 edition ).
The command used when using the newly installed cross compiler is :
aarch64-linux-gnu-gcc
The specific meaning of this command is as follows :
1.aarch64 Indicates that this is a compilation aarch64 Compiler for architecture code .AArch64 yes ARMv8 An execution state of an architecture .
2.linux Indicates running on linux In the environment .
3.gnu Tabular embedded binary interface .
4.gcc Said is gcc Tools .
The best verification method is to compile a routine directly , Let's compile the first bare metal routine “hello.c” try .
$vim hello.c
Use the following command to view hello file information :
$file hello

As you can see from the diagram hello yes 64 position LSB Of ELF Format file , The target machine architecture is ARMaarch64,, It shows that our cross compiler works normally .
Finally, download the program to the development board , After modifying user permissions, you can run .

It is worth noting that , stay RK3568 There is a cross compilation chain in the source code of , It's just that the version is older , In source prebuilts Under the table of contents . The author configures the tool chain mainly for application development .
边栏推荐
- 1.12 - Instructions
- antv x6节点拖拽到画布上后的回调事件(踩大坑记录)
- How to find out the currently running version of Solr- How do I find out version of currently running Solr?
- 2022 list of manufacturers of Chinese 3D vision enterprises (guided positioning and sorting scenes)
- How to systematically learn machine learning
- Automated defect analysis in electronic microscopic images
- 文件操作IO-Part2
- 指针初阶(基础)
- Leetcode 294. Flip game II (game theory)
- Key detection and sinusoidal signal output developed by Arduino
猜你喜欢

Vulkan-性能及精细化

Test shift right: Elk practice of online quality monitoring

Illustrated network: what is virtual router redundancy protocol VRRP?

利亚德:Micro LED 产品消费端首先针对 100 英寸以上电视,现阶段进入更小尺寸还有难度

世平信息首席科学家吕喆:构建以数据和人员为中心的安全能力
![[overview of AUTOSAR four BSW]](/img/19/c2273bbedb7f8d859e5a3805ed5740.png)
[overview of AUTOSAR four BSW]

Linux Software: how to install redis service

【AutoSAR 十三 NVM】

The difference between tail -f, tail -f and tail

全志A40i/T3如何通过SPI转CAN
随机推荐
【JetCache】JetCache的配置说明和注解属性说明
RK3568开发板评测篇(二):开发环境搭建
[golang syntax] map common errors golang panic: assignment to entry in nil map
Vulkan并非“灵药“
Vulkan-性能及精细化
FAQ | FAQ for building applications for large screen devices
How SQLSEVER removes data with duplicate IDS
Sentry developer contribution Guide - configure pycharm
leetcode-934:最短的桥
mysql 多表联合删除
深度剖析数据在内存中的存储
Gan model architecture in mm
In the first half of 2022, there are 10 worth seeing, and each sentence can bring you strength!
[AUTOSAR + IO Architecture]
lex && yacc && bison && flex 配置的問題
How to systematically learn machine learning
【案例分享】让新时代教育发展与“数”俱进
One of the reasons why setinterval timer does not take effect in ie: the callback is the arrow function
【AutoSAR 十二 模式管理】
lex && yacc && bison && flex 配置的问题