AVNET i.MX 8M Plus Edge Board AI Kit User Manual
- June 14, 2024
- AVNET
Table of Contents
AVNET i.MX 8M Plus Edge Board AI Kit User Manual
Revision History
Version | Note | Author | Release Date |
---|---|---|---|
V1.0 | Initial version | Monica | 02/09/2023 |
V1.1 | Updated support links and fixed formatting | Monica | 05/12/2023 |
Summary
The Avnet Edge AI Kit is a development kit created by Avnet. It includes the
Avnet Embedded SMARC SoM based NXP’s i.MX8M+ processor, Avnet Embedded’s EP5
Carrier, and the SMARC camera adapter, which features dual onsemi image
sensors and the AP1302 ISP. It also comes with a power supply and 10.1” touch
display.
This document describes the basic Yocto development process for the Edge AI Kit.
The BSP
The Edge AI Kit Yocto image is created using the i.MX8M+ BSP (board support package) developed by Avnet Embedded for their SMARC Carrier and SOM. In addition to the BSP, Avnet Embedded provides tools to make building an image and developing an application easier. These include:
- SimpleSwitch: A Software Development Kit (SDK) that makes it easy to develop an application (using C, Qt, Rust, Python, or Flutter) and test it on multiple Avnet Embedded platforms
- Scotty: A Yocto Development tool that uses Docker containers to provide a reproducible build environment
- SimpleCore Distro: Linux Distribution that includes all the configuration files to build a complete image.
- SimpleCore BSP: The full board support package that expert developers can configure
Avnet Embedded’s BSPs are typically updated twice a year. The Edge AI Kit meta layer will be updated less frequently. Kirkstone is the earliest Yocto version that is supported. Please post on the forum at http://avnet.me/imx8mplus- support to request an update to the Edge AI Kit BSP
Accessing the BSP
Currently, the BSP is hosted in private repositories on Avnet Embedded’s Github. To access the board support package (BSP) to build your own Yocto image for the Edge AI Kit, please reach out on the forum: http://avnet.me /imx8mplus-support
In your post, please clearly state that you are working with the Edge AI Kit and would like the BSP.
Build Instructions
Configure Build Machine
Because the Avnet Embedded BSP uses Scotty, there is no need to install lots of dependencies on your build machine. Scotty makes the process of building on any Linux computer. It can also be run on Windows computers using WSL2.
Prerequisites
I’ve shown the installation steps below using a desktop running Ubuntu 20.04
as my build machine. You’ll need to install Docker, Python3, and Pip on your
build machine.
Install Scotty
These are the abbreviated steps. The complete steps to install Scotty are
detailed in the SimpleCore Site Documentation.
Scotty requires OpenSSL
sudo apt install docker.io openssl
You will likely be prompted to restart the Docker daemon.
Make sure your user is added to the group Docker with the following command:
sudo gpasswd -a ${USER} docker
To allow scotty to download the associated docker image, you will need to run
a docker login command, as
documented on https://docs.github.com/en/packages/working-with-a-github-
packages-registry/workingwith-the-container-registry#authenticating-to-the-
container-registry
Install the Scotty tool with Pip:
pip install –user avnet-scotty
You can also use Pip to update an existing installation:
pip install –user –upgrade avnet-scotty
Image Setup
These steps are also documented on the README for the Edge AI Kit repo: https://github.com/avnetembedded/meta-avnet-edge-ai- kit/tree/kirkstone
Initialize the build repo
First, make sure that you are logged into Docker:
docker login
Create a new directory to work from: https://www.avnet.com
mkdir edgeai-kit cd edgeai-kit
Update your credentials:
repo init –config-name ssh://git@github.com/avnet-embedded/simplecore- manifest.git
Make sure that the email you are using matches the one you used when signing up for Avnet Embedded’s github.
Setup the repo to track remote branch to keep your version up to date:
repo init –repo-rev=stable
Run scotty update to get the build files:
scotty update —extra-download=git@github.com/avnet-embedded/meta-avnet- edge-ai-kit.git
This creates a build folder with all relevant build files from Avnet Embedded’s github.
Image Configuration with Scotty
The Yocto configuration is created with the command:
scotty setup
This will take you through numerically setting your machine, distro, layers, overlays, and image to build and accepting the licensing agreement.
Alternatively, you can set up with command line options by exporting your configuration:
Then run scotty setup with the layers set to edge_ai_kit:
scotty setup –features-layers-set edge_ai_kit
Running scotty setup creates conf/local.conf and conf/bblayers.conf.
You are now ready to build the image (to build, skip to section 2.3).
Notes about configuration options
Scotty provides several configuration options. These are meant to make it easy to build Yocto Linux images for a variety of Avnet Embedded boards using the same tool. Not all of the configuration options are relevant for the Edge AI Kit. These are noted below.
MACHINE
The Edge AI Kit uses the sm2s-imx8plus machine. This machine is used for hardware based on Avnet Embedded i.MX8M Plus SoM. It allows support for all SoC features and includes DTBs for all variant and reference main boards.
DISTRO
There are two available distros, SimpleCore, Avnet Embedded’s distro, and
Poky, the Yocto Project’s Reference Distro. Currently, SimpleCore is the only
distro that works with the Edge AI Kit.
LAYERS
In Scotty, the available set of layers are:
- BSP
- SimpleCore
- SimpleSwitch (not relevant to the Edge AI Kit)
- example (not relevant to the Edge AI Kit)
- edge_ai_kit – this includes both the BSP and SimpleCore distro layers.
IMAGE
There are four image configurations for the Edge AI Kit. These are selected
for build when running bitbake:
Name | Comment |
---|---|
demo | This is the base image. It doesn’t include the Tensorflow Lite |
examples or other demos
eiq- apps| This image includes eIQ framework as well as the
Tensorflow Lite examples and Gstreamer Neural Network inference examples
qt| This is just the base image with Qt to run the Qt camera app to open
Qt camera and stream AP1302 video stream on Qt Camera app
stereo-vision| This is built on top of QT and includes the sample
application found here: https://github.com/Avnet/stereovision-appMore notes
on the stereovision application can be found in the http://avnet.me
/edgeaikit-stereovision
OVERLAYS
The device tree overlays allow for cameras, displays, and other accessories. There are several to choose from
Build the image
Run the scotty bitbake command to build your desired image. In this case, we are building the demo image:
scotty command bitbake -k avnet-edge-ai-kit-demo
To build the eiq-apps image, you would run the command:
scotty command bitbake -k avnet-edge-ai-kit-eiq-apps
The image as well as the overlays will be built in the folder:
/build/build/tmp/deploy/images/sm2s-imx8plus
The SD card bootable image with the root file system included has the naming convention:
“avnet-edge-ai-kit-[image name]-sm2s-imx8plus-[date string].rootfs.wic”
E.G. avnet-edge-ai-kit-qt-sm2s-imx8plus-20230210230256.rootfs.wic
For image flashing, system power on, boot up, and the features of the Edge AI Kit, please refer to i.MX_8M_Plus_Edge_AI_Kit-Linux-Yocto-UserManual-V..pdf .
Camera Development
The driver and firmware for the AP1302 are available publicly on Avnet’s github:
The AP1302 Driver
The Edge AI Kit BSP depends on the driver and firmware for the AP1302 ISP. The recipe ap1302- module-firmware.bb pulls the driver in from Avnet’s github.
The compiled AP1302 firmware XML files are incorporated in the driver repo to keep them in sync. They can be found in the fw directory. They are converted from XML to BIN using the python script included in this directory.
This driver is responsible of loading a firmware into the ap1302 chip and configures a v4l subsytem.
The driver will load the firmware corresponding to the camera sensor model configured in the device tree. Then it will configure a v4l subsystem with one source pad and a fixed resolution.
The AP1302 Firmware
The AP1302 firmware repo includes sources needed to generate AP1302 firmware.
To generate firmware, the DevWareX tool is required. The software along with documentation can be found on onsemi’s Atlassian page: https://aptina.atlassian.net/wiki/spaces/DEVS/pages
Firmware can either be generated as a binary (BIN) or XML files
Appendix
Hardware
For the detail hardware introduction, please refer to Edge AI Kit Hardware User Manual found on the Avnet Boards page here: http://avnet.me/imx8mplus- edgeai
Software
For the detail software introduction, please refer to the Edge AI Kit Yocto Linux Software User Manual found on the Avnet Boards page here: http://avnet.me/imx8mplus-edgeai
Yocto Linux
- Edge AI Kit Yocto Linux Software User Manual
- Edge AI Kit Yocto Linux Software Development Guide
Contact Information
- Website:
http://avnet.me/imx8mplus-edgeai
Forum:
http://avnet.me/imx8mplus-support
References
- Stereo Vision Depth Perception on the Edge AI Kit - Hackster.io
- Avnet i.MX 8M Plus Edge AI Kit | Avnet Boards
- i.MX 8M+ Edge AI Kit - element14 Community
- Docker: Accelerated Container Application Development
- Confluence
- Working with the Container registry - GitHub Docs
- i.MX8 BSP Layer — SimpleCore documentation
- SimpleCore distribution layers — SimpleCore documentation
- SimpleSwitch — SimpleCore documentation
- The Scotty tool — SimpleCore documentation
- GitHub - Avnet/ap1302-driver: Driver files needed for AP1302 driver module
- GitHub - Avnet/stereovision-app: Stereo Vision QT app created for Edge AI Kit demo
- Avnet: Quality Electronic Components & Services
- Avnet i.MX 8M Plus Edge AI Kit | Avnet Boards
- Single-Board Computers - element14 Community
- /index.html
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>