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

 Linux下安装FPGA驱动

#yum install epel-release

 Linux下安装FPGA驱动

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

 Linux下安装FPGA驱动

Linux下安装FPGA驱动

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

Linux下安装FPGA驱动

#yum -y install patch

#patch -s -p0 < a10_gx_pac_ias_1_1_pv_eth.patch

 Linux下安装FPGA驱动

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

#lsmod |grep fpga

 Linux下安装FPGA驱动

 

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

# rpm -qa | grep kernel

 Linux下安装FPGA驱动

此时升级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

 Linux下安装FPGA驱动

再次查看#lsmod |grep fpga

Linux下安装FPGA驱动

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

#fpgainfo fme

 Linux下安装FPGA驱动

#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

 Linux下安装FPGA驱动

 

上一篇:gx_dlms 的杂乱记录


下一篇:图片压缩是出现白边如何去除