当前位置:网站首页>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 .
边栏推荐
- Linux Software: how to install redis service
- Lu Zhe, chief scientist of Shiping information: building data and personnel centered security capabilities
- 数组与集合性能比较
- 指针初阶(基础)
- kubernetes资源对象介绍及常用命令(五)-(NFS&PV&PVC)
- Vulkan practice first bullet
- [AUTOSAR II appl overview]
- 机器学习:numpy版本线性回归预测波士顿房价
- Tensorflow 2. Chapter 15 of X (keras) source code explanation: migration learning and fine tuning
- 线程的启动与优先级
猜你喜欢

The "2022 China Digital Office Market Research Report" can be downloaded to explain the 176.8 billion yuan market in detail

Unity learns from spaceshooter to record the difference between fixedupdate and update in unity for the second time

Leetcode-2280: represents the minimum number of line segments of a line graph
[AUTOSAR five methodology]
![[shutter] image component (load network pictures | load static pictures | load local pictures | path | provider plug-in)](/img/7e/4f9d96edd04e9ffb26434baf34aa43.jpg)
[shutter] image component (load network pictures | load static pictures | load local pictures | path | provider plug-in)

Nacos+openfeign error reporting solution

【AutoSAR 七 工具链简介】

研发一款国产ARM智能边缘计算网关需要什么

【小程序项目开发-- 京东商城】uni-app之自定义搜索组件(中)-- 搜索建议

Rust所有权(非常重要)
随机推荐
Detailed explanation of pod life cycle
Tensorflow 2. Chapter 15 of X (keras) source code explanation: migration learning and fine tuning
【AutoSAR 十一 通信相关机制】
Attributeerror: 'tuple' object has no attribute 'layer' problem solving
全志A40i/T3如何通过SPI转CAN
数学建模之线性规划(含MATLAB代码)
Gan model architecture in mm
百度智能云牵头打造智能云综合标准化平台
Advanced pointer (I)
【JetCache】JetCache的配置说明和注解属性说明
Lu Zhe, chief scientist of Shiping information: building data and personnel centered security capabilities
[applet project development -- JD mall] user defined search component of uni app (middle) -- search suggestions
Arduino开发之按键检测与正弦信号输出
Vulkan-性能及精细化
Deep analysis of data storage in memory
利亚德:Micro LED 产品消费端首先针对 100 英寸以上电视,现阶段进入更小尺寸还有难度
Illustrated network: what is virtual router redundancy protocol VRRP?
【爱死机】《吉巴罗》被忽略的细节
【AutoSAR 八 OS】
关于QByteArray存储十六进制 与十六进制互转