Intel® FPGA SDK for OpenCL™: Intel® Cyclone® V SoC Development Kit Reference Platform Porting Guide

ID 683435
Date 11/06/2017
Document Table of Contents

1.6.2. Compiling and Installing the OpenCL Linux Kernel Driver

Compile the OpenCL™ Linux kernel driver against the compiled kernel source.
The driver source is available in the Cyclone® V SoC FPGA version of the Intel® FPGA Runtime Environment for OpenCL. In addition, ensure that you have loaded an Intel® FPGA SDK for OpenCL™ -generated .rbf file into the FPGA to prevent incorrect installation of the Linux kernel module.
  1. Download the Cyclone V SoC FPGA version of the Intel® FPGA Runtime Environment for OpenCL package from the Download Center on the Altera website.
    1. Click the Download button beside Intel® Quartus® Prime software edition.
    2. Specify the release version, the operating system, and the download method.
    3. Click the Additional Software tab, and select to download Intel® FPGA Runtime Environment for OpenCL Linux Cyclone V SoC TGZ.
    4. After you download the aocl-rte-<version>.arm32.tgz file, unpack it to a directory that you own.
    The driver source is in the aocl-rte-<version>.arm32/board/c5soc/driver directory.
  2. To recompile the OpenCL Linux kernel driver, set the KDIR value in the driver's Makefile to the directory containing the Linux kernel source files.
  3. Run the export CROSS_COMPILE=arm-linux-gnueabihf- command to indicate the prefix of your tool chain.
  4. Run the make clean command.
  5. Run the make command to create the aclsoc_drv.ko file.
  6. Transfer the opencl_arm32_rte directory to the Cyclone V SoC FPGA board.
    Running the scp -r <path_to_opencl_arm32_rte> root@your-ip-address:<directory> command places the runtime environment in the /home/root directory.
  7. Run the script that you created when you built the SD card image.
  8. Invoke the aocl diagnose utility command. The diagnose utility will return a passing result after you run successfully.