Visible to Intel only — GUID: GUID-639B6945-2909-44FB-8416-069943DFAD2A
Visible to Intel only — GUID: GUID-639B6945-2909-44FB-8416-069943DFAD2A
Use oneAPI Components in a Yocto Project Build
This section explains how to create a Yocto image with Intel oneAPI components.
System Requirements
Use the Yocto Project official documentation to set up and configure your host machine to make it compatible with BitBake.
Step 1: Set Up Environment
Set Up Git Repositories
The following Git repositories are required to build a Yocto image:
Clone these Git repositories to your host machine:
git clone https://git.yoctoproject.org/git/poky --branch kirkstone git clone https://git.yoctoproject.org/git/meta-intel --branch kirkstone git clone https://git.openembedded.org/meta-openembedded --branch kirkstone
Set up BitBake Layers
Execute the following command to set up BitBake layers:
source poky/oe-init-build-env bitbake-layers add-layer ../meta-intel bitbake-layers add-layer ../meta-openembedded/meta-oe
Set up BitBake Configurations
Include extra configuration in conf/local.conf` in your build directory as required.
# Set machine MACHINE = "intel-corei7-64" # This installs oneAPI packages in the target image. IMAGE_INSTALL:append = " setup-intel-oneapi-env" IMAGE_INSTALL:append = " onevpl" IMAGE_INSTALL:append = " intel-oneapi-compiler intel-oneapi-mkl intel-oneapi-ipp"
Step 2: Build a Yocto Image with oneAPI Packages
Run BitBake to build your image with oneAPI packages. To build the sato image, for example, run:
bitbake core-image-sato
Step 3: Verify the Yocto Image with oneAPI Packages
Verify that oneAPI packages were built successfully. Run the following command:
oe-pkgdata-util list-pkgs | grep intel-oneapi
If the image was built successfully, it will return the list of packages as below:
intel-oneapi-compiler intel-oneapi-compiler-dbg intel-oneapi-compiler-dev intel-oneapi-ipp intel-oneapi-ipp-dbg intel-oneapi-ipp-dev intel-oneapi-mkl intel-oneapi-mkl-dbg intel-oneapi-mkl-dev setup-intel-oneapi-env setup-intel-oneapi-env-dbg setup-intel-oneapi-env-dev