摘要:本教程使用Zynq UltraScale+ MPSoC开发板平台,在构建出dma环通测试的硬件平台的基础上,配置petalinux,编译并运行github开源项目xilinx_axidma驱动,并运行相关测试程序。
0 环境
虚拟机:VMware Workstation 16 Pro
Ubuntu:16.04
petalinux:20.01
开发板:Xilinx Zynq UltraScale+ MPSoC AXU5EV
硬件配置基础(hardware):ALINX——dma_loopback
ps:在本人的博客ZYNQ MPSoC通过petalinux运行DMA驱动(1)-CSDN博客 中,运行了ALINX给出的DMA驱动程序,不过该程序似乎主要是作为一个验证程序,并没有针对dma传输性能进行测试,而github开源项目xilinx_axidma实现零拷贝以及相关性能测试,更适合作为后续开发的基础。
1 petalinux工程创建和基础配置
创建工程文件夹/xilinx_axidma并放置相关hardware文件(此处默认已导出dma_loopback的硬件平台文件design_1_wrapper.xsa)
dzy@dzy-virtual-machine:~/petalinux/xilinx-axidma$ tree
.
└── hardware
└── design_1_wrapper.xsa
1 directory, 1 file
dzy@dzy-virtual-machine:~/petalinux/xilinx-axidma$ source /opt/pkg/petalinux/settings.sh
PetaLinux environment set to '/opt/pkg/petalinux'
WARNING: /bin/sh is not bash!
bash is PetaLinux recommended shell. Please set your default shell to bash.
WARNING: This is not a supported OS
INFO: Checking free disk space
INFO: Checking installed tools
ERROR: You are missing the following system tools required by PetaLinux:
- gcc-multilib
Please check PetaLinux installation guide - required tools and libraries package section for detailed information
INFO: Checking installed development libraries
Please install them with your operating system package manager, and try again
//有一些报错,但是安装gcc-multilib会和后面要用的交叉编译工具冲突,同时这里的报错或者警告似乎不用理会,不影响后续petalinux配置
dzy@dzy-virtual-machine:~/petalinux/xilinx-axidma$ petalinux-create -t project -n petalinux --template zynqMP
INFO: Create project: petalinux
INFO: New project successfully created in /home/dzy/petalinux/xilinx-axidma/petalinux
dzy@dzy-virtual-machine:~/petalinux/xilinx-axidma$ cd petalinux/
//执行此命令后就会绑定硬件平台并弹出配置菜单,直接配置即可(见下文)
dzy@dzy-virtual-machine:~/petalinux/xilinx-axidma/petalinux$ petalinux-config --get-hw-description ../hardware/
INFO: sourcing build tools
INFO: Getting hardware description...
INFO: Rename design_1_wrapper.xsa to system.xsa
[INFO] generating Kconfig for project
[INFO] menuconfig project
configuration written to /home/dzy/petalinux/xilinx-axidma/petalinux/project-spec/configs/config
*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.
[INFO] extracting yocto SDK to components/yocto
[INFO] sourcing build environment
[INFO] generating u-boot configuration files, This will be deprecated in upcoming r

最低0.47元/天 解锁文章
733

被折叠的 条评论
为什么被折叠?



