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:
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 startup-tdx-torizon.sh"
With the setup already configured for a TorizonCore build, clone the meta-pasta-demo layer to the layers directory:
$$ cd <layers directory>
$$ git clone https://github.com/toradex/meta-pasta-demo.git
Enter the meta-pasta-demo directory and run the config.sh 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
$$ ./config.sh
$$ 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:
conf/local.confACCEPT_FSL_EULA="1"
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/pasta-demo.bb.
Note: if you skip this section, you can add the credentials after the image is installed on the target.
Add Aktualizr OTA credentials to recipes-sota/aktualizr/files/credentials.zip and uncomment related lines at conf/local.conf.example and recipes-images/images/pasta-demo.bb.
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.
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/aktualizr-pasta-demo.bb: Unable to get checksum for aktualizr-pasta-demo SRC_URI entry credentials.zip: file could not be found
WARNING: /workdir/torizon/build-torizon/conf/../../layers/meta-pasta-demo/recipes-aws/aws-iot-greengrass-core-software/aws-iot-greengrass-core-software-device-credentials.bb: 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.