Intel® Agilex™ Device Configuration via Protocol (CvP) Implementation User Guide

ID 683763
Date 5/24/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

6.1.5.1.2. Upstream open source CvP Driver

  1. The tools that you may need to install for building the kernel if you are using Ubuntu.
    sudo apt-get install bison
    sudo apt-get install libncurses5-dev 
    sudo apt-get install libssl-dev
    sudo apt-get install libncursesw5-dev
    sudo apt-get install -y libelf-dev
    sudo apt install git
    sudo apt install flex
    sudo apt-get install -y xz-utils
    
  2. Download the kernel source. The upstream CvP driver is available starting from v4.14 onwards, v5.9 is the version tested on Intel hardware. Example below is the command to download the kernel source v5.09.
    Example Command:
    wget https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/linux-5.9.tar.xz
  3. Extract the kernel code files in /usr/src.
    1. Run:
      unxz -v linux-5.9.tar.xz
    2. Run:
      tar -xvf linux-5.9.tar
  4. Save as the kernel source folder into another name like linux-5.9-tt
    Run:
    sudo cp -rf linux-5.9 linux-5.9-tt
  5. For v5.12 or below, you must install the following patches.
    1. Download Patch1 and Patch2 and save them into Kernel source folder
    2. In the kernel source directory(For example: /usr/src/linux-5.9-tt), install the patches by using the command below.
      • Run:
        patch -p1 < 2-2-fpga-add-FPGA-manager-debugfs.patch
      • Run:
        patch -p1 < 1-2-fpga-doc-documentation-for-FPGA-debugfs.patch
  6. Build and Install the kernel modules.
    1. Go into the kernel source folder. Run: cd /usr/src/linux-5.9-tt.
    2. Optional step: Copy the existing config over to new kernel. Run: cp -v /boot/config-$(uname -r) .config
    3. Enable Altera CvP FPGA Manager as kernel module with the command and steps below.
      • Run: make menuconfig
      • In the GUI, navigate to Device Drivers > FPGA Configuration Framework. Set Intel CvP FPGA Manager to “M”. Save the config setting to .config file.
      • You may check the .config file, the 3 lines items below should be enabled.
        • CONFIG_FPGA=y
        • CONFIG_FPGA_MGR_DEBUG_FS=y
        • CONFIG_FPGA_MGR_ALTERA_CVP=y
    4. Compile the kernel. Run: Make.
    5. Install the kernel modules.
      • Run: export INSTALL_MOD_PATH=/usr/src/linux-5.9-tt
      • Run: MODPATH="INSTALL_MOD_PATH=/usr/src/linux-5.9-tt"
      • Run: ARGS="$MODPATH"
      • Run: make $ARGS modules
      • Run: sudo make modules_install. Check the module version at the last line printed in the Console window. Please note that the name might be different based on Kernel build version and .config file.
      • Run "sudo make install". Ensure the linux image and initrd image are created according to the module version.
    6. Reboot the system and ensure the system reboot to the installed kernel:
      • Run : reboot
      • After the PC is reboot successfully
      • Run : uname -mrs. The system should be rebooted with the installed kernel version as shown picture below.

Did you find the information on this page useful?

Characters remaining:

Feedback Message