Building and Deploying Linux on Opal-6

This page covers building and deploying complete OS images using YOCTO.  

Topics are:

Building Images for Deployment

YOCTO uses a concept of recipes which specify how to build an image.For more information on this please refer to YOCTO documentation.

Before you can view a list of recipes to build, do the following to ensure YOCTO is ready:

$ cd ~/fsl-community-bsp

$ source setup-environment build


The source command must be run prior to starting your build session. You only need to run this once at the beginning to configure the initial build environment

To view the complete list of recipes execute the following.  The is a long list and can take a few minutes to generate.

$ bitbake-layers show-recipes

To show just Opal-6 recipes:

$ bitbake-layers show-recipes | grep opal6

This list will include u-boot, the Linux kernel and root file system images. Recipes with the text 'image' build root filesystems.

Start by building the Opal-6 demo image:

$ bitbake opal6-image-xfce

This process will take a long time (3+ hours) depending on your PC.  For faster development we recommend an SSD.

Building an External Tool-chain for Development outside YOCTO

YOCTO can generate an external toolchain which can be used to cross compile u-boot, the Linux kernel and custom applications outside of the YOCTO build tree. If you are developing custom applications then you will also need a valid sysroot for your target image.

Lets assume you want to build your applications to run on the opal6-image-xfce image so type the following:

$: cd ~/fsl-community-bsp

$: source setup-environment build

$: bitbake opal6-image-xfce -c populate_sdk

To create this toolchain, execute the following:

$: cd ~/fsl-community-bsp

$: source setup-environment build

$: bitbake meta-toolchain

To install, do the following:

$ cd ~/fsl-community-bsp/build/tmp/deploy/sdk

$ ./poky-glibc-x86_64-meta-toolchain-cortexa9hf-vfp-neon-toolchain-2.0.1.sh

The actual installer name may be different to that used above. Just follow the prompts to complete the installation. In most cases you can simply accept the defaults.

To use this toolchain you must ‘source’ the environment file prior to compiling. For example, our installation requires the the following command:

$: source /opt/poky/2.0.1/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi

For information on how to use this toolchain to develop your own applications, please refer to Opal-6 Application Development - C/C++

Deploying to Opal-6

When your build is complete, the output binaries are placed in the ~/fsl-community-bsp/build/tmp/deploy/images/<machine> folder, where <machine> is either opal6q or opal6dl.

To deploy to Opal-6 using the Freecsale MfgTool, you will need the following binaries:

  • u-boot.imx
  • uImage
  • uImage-opal6q-opaldk.dtb
  • opal6-image-xfce-opal6q.tar.bz2

(assuming a QUAD target - substitute dl for q if you are targetting a DualLite)