系统相关
首页 > 系统相关> > Linux下安装FPGA驱动

Linux下安装FPGA驱动

作者:互联网

1.下载fpga驱动

wget -c http://download.altera.com/akdlm/software/dcp/1.1/a10_gx_pac_ias_1_1_pv_rte_installer.tar.gz

 

#yum install epel-release

 

2.解压fpga 驱动,并执行 setup.sh 脚本

#tar -xzvf a10_gx_pac_ias_1_1_pv_rte_installer.tar.gz

# cd a10_gx_pac_ias_1_1_pv_rte_installer

# ./setup.sh    #all Y

 

3.执行如下步骤

#source /root/intelrtestack/init_env.sh

# cd $OPAE_PLATFORM_ROOT/hw/

# wget -c https://www.intel.com/content/dam/altera-www/global/en_US/others/solutions/acceleration-hub/a10_gx_pac_ias_1_1_pv_eth.patch

#yum -y install patch

#patch -s -p0 < a10_gx_pac_ias_1_1_pv_eth.patch

 

4.确保模块加载,如未加载,清查kernel和kernel-devel版本一致性

#lsmod |grep fpga

 

 

注:如上图查看到为加载,此时需要检查kernel和kernel-devel版本一致性

# rpm -qa | grep kernel

 

此时升级kernel版本

#yum install -y kernel

再查看kernel和kernel-devel版本的版本

https://www.cnblogs.com/lsdb/p/7850715.html

https://blog.csdn.net/qq_23039185/article/details/81479603

#rpm -qa | grep kernel

 

再次查看#lsmod |grep fpga

确保获取到了主机上的所有FPGA卡信息

#fpgainfo fme

 

#lspci |grep 09c

配置镜像:

#fpgaconf $OPAE_PLATFORM_ROOT/hw/samples/nlb_mode_0/bin/nlb_mode_0.gbs

运行程序

运行hello_fpga

$ sudo sh -c "echo 20 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages"

$ tar -zvxf $OPAE_PLATFORM_ROOT/sw/opae*.tar.gz

$ cd $OPAE_PLATFORM_ROOT/sw/opae*

$ gcc -o hello_fpga -std=gnu99 -rdynamic -ljson-c -luuid -lpthread -lopae-c -lm -Wl,-rpath -lopae-c $OPAE_PLATFORM_ROOT/sw/opae*/samples/hello_fpga.c

sudo ./hello_fpga

 

 

标签:kernel,OPAE,FPGA,fpga,gx,pac,Linux,驱动,ROOT
来源: https://www.cnblogs.com/zippo123/p/11064901.html