Using Ice with Yocto

On this page:

Overview of Ice with Yocto

The Yocto Project allows you to create a custom Linux distribution for your embedded product. With ZeroC's meta layer for Yocto, you can easily include Ice for C++, Ice for Python and/or the Glacier2 service in this custom Linux distribution.

Development Boards

Ice was tested on:

BoardYocto version
Freescale SABRE SD 

2.1 (Krogoth)

with the Freescale Community BSP

BeagleBone Black board (Rev C)2.1 (Krogoth)

Meta Layer

Refer to the file in the zeroc-ice/meta-zeroc repository.

Installing the Meta Layer

Installing the meta layer for ZeroC products is simply a matter of copying the contents of the repository onto your file system. For example, assuming you are using the poky repository, download the meta layer archive from the GitHub page and extract it alongside the other directories labeled meta-<name>. Once this is done, source the poky environment configuration script and add the meta-zeroc layer to the BBLAYERS variable in your bblayers.conf file:

  /home/zeroc/dev/poky/meta \
  /home/zeroc/dev/poky/meta-yocto \
  /home/zeroc/dev/poky/meta-yocto-bsp \
  /home/zeroc/dev/poky/meta-zeroc \

Using the Meta Layer to install Ice

To include Ice in your image, add the package from the zeroc-ice recipe you wish to use to your local.conf file:

# Install Ice for C++ dynamic libraries and Ice for Python to image
IMAGE_INSTALL_append = " zeroc-ice zeroc-ice-python"
# Add the development package to the SDK
TOOLCHAIN_TARGET_TASK_append = " zeroc-ice-dev zeroc-ice-staticdev"
# Add the development package to the Native SDK
TOOLCHAIN_HOST_TASK_append  = " nativesdk-zeroc-ice-dev"

Setting up your cross development environment to use Ice

With the variables set in local.conf as shown above, you can generate an SDK for your image with the following command:

Create SDK for the core-image-minimal Image
bitbake core-image-minimal -c populate_sdk 

Once complete, this SDK can be found in tmp/deploy/sdk. Execute the .sh file to install. By default your SDK will be installed into /opt/poky/<version>/. You can then source the cross-development environment as follows:

source /opt/poky/2.1/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi

Using IceSSL with Platform CAs

To use the IceSSL.UsePlatformCAs property you will need to install the ca-certificates package as part of your image. Since OpenSSL does not have its default CAfile (where IceSSL looks for the default platform CAs) set to the certificate bundle installed from ca-certifcates you will need to set an additional IceSSL property:


Using the Ice sample programs

Sample programs are available in the zeroc-ice/ice-demos repository:

git clone -b 3.6
cd ice-demos

The Ice demos for C++ and Python are located in the cpp and python directories respectively. Review the build instructions for more information.