当前位置:网站首页>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 .
边栏推荐
- Win10 多种方式解决无法安装.Net3.5的问题
- 【AutoSAR 十 IO架构】
- Vulkan is not a "panacea"“
- [shutter] image component (load network pictures | load static pictures | load local pictures | path | provider plug-in)
- Machine learning: numpy version linear regression predicts Boston house prices
- [pulsar document] concepts and architecture
- Leetcode-849: maximum distance to the nearest person
- University of Toronto: Anthony coach | the conditions of deep reinforcement learning can induce dynamic risk measurement
- Lex & yacc & bison & flex configuration problems
- Rust string slicing, structs, and enumeration classes
猜你喜欢
Logback configuration file
Key detection and sinusoidal signal output developed by Arduino
Rust string slicing, structs, and enumeration classes
2022中国3D视觉企业(引导定位、分拣场景)厂商名单
Deep analysis of data storage in memory
Lu Zhe, chief scientist of Shiping information: building data and personnel centered security capabilities
【AutoSAR 三 RTE概述】
Callback event after the antv X6 node is dragged onto the canvas (stepping on a big hole record)
【AutoSAR 六 描述文件】
百度智能云牵头打造智能云综合标准化平台
随机推荐
数据分析思维分析犯法和业务知识——分析方法(一)
[case sharing] let the development of education in the new era advance with "number"
lex && yacc && bison && flex 配置的问题
How to systematically learn machine learning
leetcode-224:基本计算器
解决ReactNative使用webView存在缓存问题
Array common operation methods sorting (including ES6) and detailed use
The "2022 China Digital Office Market Research Report" can be downloaded to explain the 176.8 billion yuan market in detail
Leetcode-241: designing priorities for operational expressions
leetcode-849:到最近的人的最大距离
[AUTOSAR II appl overview]
【AutoSAR 十二 模式管理】
【AutoSAR 九 C/S原理架构】
指针进阶(一)
Detailed explanation of pod life cycle
【AutoSAR 六 描述文件】
Problèmes de configuration lex & yacc & Bison & Flex
线程的启动与优先级
Kubernetes simple introduction to writing YML
Vulkan并非“灵药“