Technical Article

  • 2021.2
  • 04/01/2021
  • Public Content

Adding oneAPI Components to Yocto* Project Builds

The oneAPI meta-intel-iss layer makes it possible to add oneAPI components to a Yocto project build. The meta-intel-iss layer includes recipes that you can add to your project in order to add the supported content into your project's file system image.
  1. To add the meta-intel-iss layer, add its path name to your image layer's conf file:
    $ vi "conf/bblayers.conf" BBLAYERS = " \ ... /path/to/meta-intel-iss \ ... "
  2. Add the desired recipes for oneAPI components to
    conf/local.conf
    and uncomment those recipes that you wish to include by removing the
    #
    at the beginning of the line:
    $ vi "conf/local.conf" #IMAGE_INSTALL_append = " intel-iss-icc-runtime" #IMAGE_INSTALL_append = " intel-iss-ippdc" #IMAGE_INSTALL_append = " intel-iss-mkl-target" #IMAGE_INSTALL_append = " intel-vtune-sep-driver" #IMAGE_INSTALL_append = " intel-vtune-drivers"
    Because the
    intel-vtune-sep-driver
    is a subset of the
    intel-vtune-drivers
    recipe, only uncomment one of these two recipes.

Intel® C++ Classic Compiler as a Secondary Toolchain

You can use the Intel C++ Classic Compiler (ICC) as a secondary toolchain to build packages for your target system. To enable the ICC build for a specific package, add the following line in the package recipe
.bb
file:
TOOLCHAIN_pn-${PN} = "icc"
The .bb file located in the recipes folder, which is typically:
<install_dir>/<component>/<version>/YoctoProject/<recipes>/
For example:
opt/intel/oneapi/eclipse-iot-plugins/2021.2.0/YoctoProject/meta-intel-iss/recipes-ipp/ippcc/

Intel® C++ Classic Compiler and SDK Integration

When the toolchain SDK is exported for a target system build, an environment setting file for the Intel C++ Classic Compiler is automatically generated in the folder where the GNU environment setup file is located.
For example, after the installation of exported toolchain SDK, you will find the files:
<poky install dir>/2.6.2/environment-setup-core2-poky-linux
... and ...
<poky install dir>/2.6.2/environment-setup-core2-poky-linux-icc
By default,
poky
is installed at
/opt/poky/
.
The file
environment-setup-core2-poky-linux
sets up the build environment for GNU compiler and the file
environment-setup-core2-poky-linux-icc
is used to set up the build environment for the Intel C++ Classic Compiler.
For example, you can use the following command to set up the icc build environment:
$ source <poky install dir>/2.6.2/environment-setup-i586-wrs-linux-icc
The $CC, $CXX, and other such environment variables are reset for the Intel C++ Classic Compiler build.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.