AN 784: Partial Reconfiguration over PCI Express* Reference Design for Intel® Arria® 10 Devices

ID 683856
Date 9/24/2018
Public
Document Table of Contents

1.2.3. Installing the Linux Driver

The reference design includes the complete source code for the open source Linux driver, developed and tested for this reference design.

The Linux driver for this design requires the debugfs. Run the following command verify that the debugfs is available:
mount | grep ^debugfs
For more information on the debugfs file system, please refer to the CentOS documentation.
Important: This driver only supports CentOS 7.
You must install all the prerequisite packages before installing this driver. To install the prerequisite packages, run the following commands:
yum groupinstall “Development Tools”
yum install ncurses-devel
yum install qt-devel
yum install hmaccalc zlib-devel binutils-devel elfutils-libelf-devel
To install the driver, follow these steps:
  1. Ensure the driver source code is available on your machine. The source code is available at the following location:

    https://github.com/intel/fpga-partial-reconfig/tree/master/software/drivers

  2. To compile all the necessary driver modules, run the following command:
    make DEVICE="a10"
    Note: To enable verbose messaging, use the option VERBOSE=true with the make command.
    Ensure that the following three kernel object files are present in the driver source directory after running this command:
    • fpga-mgr-mod.ko
    • fpga-pcie-mod.ko
  3. To copy the modules to the right location and update the module dependency database, run the following command:
    sudo make install
  4. To deploy an instance of the driver for each Intel FPAG device, run the following command:
    sudo modprobe fpga-pcie-mod
  5. To verify successful installation of the driver, run the following command:
    lspci –vvvd1172:
    Upon successful installation, the resulting output displays the following at the end:
    Kernel driver in use: fpga-pcie
    Kernel modules: fpga_pcie_mod 
    
    Note: The above command only works when the design is loaded onto the board and the computer has been power-cycled.

Uninstalling the Linux Driver

If you wish to uninstall the Linux driver, follow these steps:
  • Run the following command:
    sudo modprobe -r fpga-pcie-mod
    This command stops the driver from executing and deactivates it. However, at this point, rebooting your machine continues to reload the driver.
  • To permanently delete the driver, run the following commands:
    
    cd /lib/modules/$(uname -r)/extra
    rm -rf fpga-pcie-mod.ko