当前位置:网站首页>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 .
边栏推荐
- lex && yacc && bison && flex 配置的问题
- University of Oslo: Li Meng | deep reinforcement learning based on swing transformer
- KingbaseES ALTER TABLE 中 USING 子句的用法
- 飞凌搭载TI AM62x的ARM核心板/开发板首发上市,亮相Embedded World 2022
- Test shift right: Elk practice of online quality monitoring
- [pulsar document] concepts and architecture
- Is there a free text to speech tool to help recommend?
- [AUTOSAR + IO Architecture]
- kubernetes资源对象介绍及常用命令(五)-(NFS&PV&PVC)
- Nc17059 queue Q
猜你喜欢

Web2.0的巨头纷纷布局VC,Tiger DAO VC或成抵达Web3捷径

leetcode-2280:表示一个折线图的最少线段数

Callback event after the antv X6 node is dragged onto the canvas (stepping on a big hole record)

1.12 - 指令

kubernetes资源对象介绍及常用命令(五)-(NFS&PV&PVC)
![[overview of AUTOSAR four BSW]](/img/19/c2273bbedb7f8d859e5a3805ed5740.png)
[overview of AUTOSAR four BSW]
![[case sharing] let the development of education in the new era advance with](/img/11/af88d16dc66f00840cbfc5ba5d68bd.jpg)
[case sharing] let the development of education in the new era advance with "number"

数学建模之线性规划(含MATLAB代码)

Detailed explanation of pod life cycle

飞凌搭载TI AM62x的ARM核心板/开发板首发上市,亮相Embedded World 2022
随机推荐
【案例分享】让新时代教育发展与“数”俱进
【AutoSAR 八 OS】
Vulkan is not a "panacea"“
【AutoSAR 三 RTE概述】
leetcode-934:最短的桥
cordova-plugin-device获取设备信息插件导致华为审核不通过
Key detection and sinusoidal signal output developed by Arduino
Vulkan-性能及精细化
关于XML一些介绍和注意事项
【JetCache】JetCache的配置说明和注解属性说明
[overview of AUTOSAR three RTE]
About qbytearray storage hexadecimal and hexadecimal conversion
关于QByteArray存储十六进制 与十六进制互转
Cordova plugin device obtains the device information plug-in, which causes Huawei to fail the audit
[AUTOSAR I overview]
使用jenkins之二Job
Linux Software: how to install redis service
Machine learning: numpy version linear regression predicts Boston house prices
Leetcode-2280: represents the minimum number of line segments of a line graph
Nc17059 queue Q