ZYNQ MPSoC通过petalinux运行DMA驱动(2)

摘要:本教程使用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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值