Configuration via Protocol (CvP) Implementation User Guide: Agilex™ 5 FPGAs and SoCs

ID 813775
Date 4/07/2025
Public

Visible to Intel only — GUID: pkd1740034243165

Ixiasoft

Document Table of Contents

6.1.5.1. Installing the Upstream Open Source CvP Driver in Linux Systems

The installation of CvP driver only needs to be done once for the same kernel version.

  1. Install these tools to build the kernel.
    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-get install git
    sudo apt-get install flex
    sudo apt-get install -y xz-utils
    
  2. Run: cd /usr/src.
  3. Download the kernel source. Altera recommends you use the default kernel version from altera-opensource in GitHub6. The following command obtains the kernel source code from altera-opensource in github.
    Example Command:
    git clone https://github.com/altera-opensource/linux-socfpga
  4. Checkout the branch using:
    cd linux-socfpga
    git checkout socfpga-6.1.55-lts
  5. Build and install the kernel modules.
    1. Go into the kernel source folder. Run: cd /usr/src/linux-socfpga.
    2. Copy the existing config over to a 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.
      1. Run: make menuconfig
      2. In the GUI, navigate to Device Drivers > FPGA Configuration Framework and set FPGA Configuration Framework to *.
      3. Select FPGA Configuration Framework, then do the following:
        1. Set Altera CvP FPGA Manager to *.
        2. Set FPGA Manager DebugFS to *.
      4. Save the config setting to .config file.
    4. Compile the kernel. Run: make -j 12.
    5. Install the kernel modules.
      1. Run: export INSTALL_MOD_PATH=/usr/src/linux-socfpga
      2. Run: MODPATH="INSTALL_MOD_PATH=/usr/src/linux-socfpga"
      3. Run: ARGS="$MODPATH"
      4. Run: make $ARGS modules
      5. Run: sudo make modules_install. Check the module version in the last line printed in the Console window. The name might be different based on Kernel build version and .config file.
      6. Run "sudo make install". Ensure the Linux image and initrd image are created according to the module version.
    6. (This step is necessary only if you are using Ubuntu.) Modify the Grand Unified Bootloader (Grub) Boot Loader settings. This step is mandatory for first-time kernel installations for Linux to boot up with the appropriate kernel version.
      1. Identify the kernel module version to point to.
        1. Run: grub-mkconfig
        2. Run: cat /boot/grub/grub.cfg
        3. Search for submenu and menuentry to identify the Linux image and initrd image created during kernel installation.
          In the example shown below, the submenu 'Advanced options for Ubuntu' and menuentry 'Ubuntu, with Linux 6.1.55+' indicate that the kernel version to point to is Advanced options for Ubuntu>Ubuntu, with Linux 6.1.55+
      2. Backup the Grub file in case reverting is needed.

        Run: sudo cp /etc/default/grub /etc/default/grub.bak

      3. View the Grub file.
        Run: cat /etc/default/grub
      4. Update the Grub file.
        1. Run: gedit/etc/default/grub
        2. Change the GRUB_DEFAULT to point to the desired kernel module version as previously identified.
          • Example: GRUB_DEFAULT = "Advanced options for Ubuntu>Ubuntu, with Linux 6.1.55+"
        3. Save the changes
      5. Ensure the Grub changes take effect.

        Run: sudo update-grub

    7. Reboot the system and ensure the system reboots to the installed kernel:
      1. Run : reboot. Allow the PC to reboot successfully.
      2. Run : uname -mrs. The system should be rebooted with the installed kernel version as Linux 6.1.55+.
6 The socfpga-6.1.38-lts is the first version supporting Agilex™ 5 CvP. Thesocfpga-6.1.38-lts and socfpga-6.1.55-lts are the versions tested on Altera hardware as of Quartus® Prime version 24.2.