Search by Tags

Build the AWS AI at the Edge Demo Image


Article updated at 13 Jul 2021
Compare with Revision


The AWS AI at the Edge demonstration is built on top of the Torizon platform. Nevertheless, some degree of customization is done to the TorizonCore image:

  • Greengrass Core Software is added and runs on the base image.
  • The deep learning inference engine runs on the base image.
  • Docker compose files and systemd services to control them are added for the conteinerized applications.

The preferred method for using the AWS AI at the Edge demonstration is by installing the image from the Toradex Easy Installer online feeds. The alternative way - to build the image by yourself - is documented in this article.

This article complies to the Typographic Conventions for Torizon Documentation.


You must have already set up a Yocto build environment for TorizonCore. You can follow the instructions from:

For instance, to only configure but don't build:

Warning: the following instruction is a hint, but it does not replace going through the instructions from the Build TorizonCore With Yocto article.

$ cd ${HOME}
$ mkdir yocto-workdir
$ docker run --rm -it --name=crops -v ${HOME}/yocto-workdir:/workdir torizon/crops-toradex --workdir=/workdir --cmd="MACHINE=apalis-imx8"

Setup the meta-pasta-demo layer

With the setup already configured for a TorizonCore build, clone the meta-pasta-demo layer to the layers directory:

$$ cd <layers directory>
$$ git clone 

Enter the meta-pasta-demo directory and run the script. It applies patches to other layers, fetches extra layers, configures a sample local.conf and adds meta-pasta-demo and the extra layers to bblayers.conf:

$$ cd meta-pasta-demo
$$ ./
$$ cd ../../build-torizon

Make sure to accept the FSL_EULA, since the accept variable is commented in the sample file. The EULA is at layers/meta-freescale/EULA and you should have already read it during the setup of the Yocto environment:


Add Greengrass Core Device Credentials - Optional

Add the greengrass core device credentials to recipes-aws/aws-iot-greengrass-core-software/files/core-device-secret.tar.gz and add aws-iot-greengrass-core-software-device-credentials to recipes-images/images/

Note: if you skip this section, you can add the credentials after the image is installed on the target.

Add OTA Credentials - Optional

Add Aktualizr OTA credentials to recipes-sota/aktualizr/files/ and uncomment related lines at conf/local.conf.example and recipes-images/images/

Note: this is only useful if you plan to update components from the base image. For containers and/or AWS Greengrass, there are other options.

Build the pasta-demo Image

The AWS AI at the Edge demo image is named pasta-demo, as a reference to the pasta detection application. Build the image:

$$ bitbake -k pasta-demo

If you skip the optional steps above, a warning will be printed for each. It is safe to ignore them:

WARNING: /workdir/torizon/build-torizon/conf/../../layers/meta-pasta-demo/recipes-sota/aktualizr/ Unable to get checksum for aktualizr-pasta-demo SRC_URI entry file could not be found
WARNING: /workdir/torizon/build-torizon/conf/../../layers/meta-pasta-demo/recipes-aws/aws-iot-greengrass-core-software/ Unable to get checksum for aws-iot-greengrass-core-software-device-credentials SRC_URI entry core-device-secret.tar.gz: file could not be found

The binary image will be available in deploy/images/apalis-imx8. You can, for instance, use the TorizonCore Build Environment to serve the image over your local network.