Application Notes

Enable AI framework: TensorFlow

Please refer to the application note to enable TensorFlow at the device side.

Connect to Secure Element chip: A71CH

Please refer to the a71ch application note to enable a71ch at the device side.

Enable i.MX Linux with EdgeScale

This guide describes how to enable i.mx8mmevk with Edgescale.

  1. Register an account and the device

Following Quick Start Guide to register an account, register the i.mx linux device and download the device identification image.

  1. Download and program the bootstrap images

To enable i.mx8mmevk in Edgescale, both sdboot image and norboot image should be programmed. for i.mx8mqevk and i.mx6qsabresd, only sdboot image is required, you can get the images from Image Download.

To program norboot image(only for i.mx8mmevk), run the following commands:

=> tftp 0x42000000 imx8mm/firmware_imx8mmevk_uboot_norboot.img
=> sf probe
=> sf erase 0 440000
=> sf write 0x42000000 0 440000

Note

if you use SD boot mode, but nothing is shown in serial terminal, you need to download and program a workable imx8mmevk sdcard image into the SD card refer to following command:

$ bzip2 -d edgescale-1909-imx8mmevk.sdcard.bz2

$ sudo dd if=edgescale-1909-imx8mmevk.sdcard of=/dev/sdx bs=4M && sync

Once you have programmed above sdcard image, you can boot up board from SD card and program the norboot image. please switch to nor boot mode after programing the noboot image.

To program sdboot image(for i.mx8mmevk/i.mx8mqevk/imx6qsabresd), run the following command on your PC:

$ sudo dd if=firmware_imx<xxxx>_uboot_sdboot.img of=/dev/<sdx> bs=512 skip=8 seek=8 && sync

For imx6qsabresd, besides sdboot image, you also need to program SPL into the SD card using following command:

$ sudo dd if=SPL of=/dev/<sdx> bs=1k seek=1 && sync
  1. Program the identification image to SD on a Linux PC.
Make sure the SD card is partition as below:

$ /dev/sdb1         131072  2228223  2097152    1G 83 Linux
$ /dev/sdb2        2228224 10616831  8388608    4G 83 Linux
$ /dev/sdb3       10616832 23199743 12582912    6G 83 Linux
$ /dev/sdb4       23199744 30719999  7520256  3.6G 83 Linux

Note

Use the fdisk command for SD card partition and use mkfs.ext4 command to format each partition. The start and end sector of first three partitions should be same with above example.

Program the device identification image

$ sudo fdisk -l         # find the /dev/<sdx> for the SD card e.g. /dev/<sdx>
$ sudo umount /dev/<sdx>
$ sudo ./bootstrap-enroll-<deviceID>.sh /dev/<sdx>
  1. Reset to OTA

Boot up the board to get the u-boot prompt, run ‘reset’ command to start the OTA process:

=> reset
  1. Deploy app

Please refer Deploy APP for deployment of apps.

Build EdgeScale images on i.MX

1. Download the build environment

$ mkdir fsl-arm-yocto-bsp
$ cd fsl-arm-yocto-bsp
$ repo init -u https://source.codeaurora.org/external/imx/imx-manifest  -b imx-linux-sumo -m imx-4.14.78-1.0.0_demo_edgescale.xml
$ repo sync
$ cd sources
$ rm -rf meta-edgescale
$ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/meta-edgescale

2. Build bootstrap/solution image

Take imx8mqevk as an example:
  • Setup build environment
$ MACHINE=imx8mqevk DISTRO=fsl-imx-xwayland source edgescale-setup.sh bld-xwayland
Add the lines to the configuration file – conf/local.conf
   GOVERSION = "1.10%"
   DISTRO_FEATURES_append = " ota"

Note

For imx6qsabresd

Add below lines to sources/meta-fsl-bsp-release/imx/meta-sdk/conf/distro/include/fsl-imx-preferred-env.inc

PREFERRED_PROVIDER_virtual/bootloader_mx6 = “uboot-ota”
  • Build EdgeScale bootstrap image
$ bitbake  edgescale-bootstrap-imx
  • Build EdgeScale solution image

Note

Remove the following line from build configuration file – conf/local.conf

DISTRO_FEATURES_append = ” ota”

For imx6qsabresd

Remove below in sources/meta-fsl-bsp-release/imx/meta-sdk/conf/distro/include/fsl-imx-preferred-env.inc

PREFERRED_PROVIDER_virtual/bootloader_mx6 = “uboot-ota”
$bitbake  core-image-weston

3. Create EdgeScale solution

IMX8MMEVK/IMX8MQEVK

tar czvf full-image.tgz Image \
 u-boot.itb \
 fsl-<machine>-evk.dtb \
 core-image-weston-<machine>.rootfs.tgz

IMX6QSABRESD

tar czvf full-image.tgz zImage \
 u-boot-dtb.img \
  imx6q-sabresd.dtb \
 core-image-weston-imx6qsabresd-rootfs.tgz

Upload the compressed solution image to a storage server and get the download link. Please refer to Create Solution to create a solution in Edgescale.

Manually deploy solution image on SD card

In this guide, the solution image is deployed on the SD card manually. Deploying image from cloud dashboard is not supported. You can choose to download pre-built solution image core-image-weston-imx8mmevk.sdcard.bz2 build solution image by yourself.

  • Build solution image
  1. Download the Yocto Project Environment:
$ mkdir fsl-arm-yocto-bsp
$ cd fsl-arm-yocto-bsp
$ repo init -u https://source.codeaurora.org/external/imx/imx-manifest  -b imx-linux-sumo -m imx-4.14.78-1.0.0_demo_edgescale.xml
$ repo sync
$ cd source
$ rm -rf meta-edgescale
$ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/meta-edgescale meta-edgescale
$ rm -rf  meta-edgescale/recipes-bsp/imx-mkimage
$ rm -rf  meta-edgescale/recipes-bsp/u-boot
  1. Remove the below lines in meta-edgescale/recipes-fsl/images/core-image-weston.bbappend
IMAGE_FSTYPES += " tar.gz"
IMAGE_FSTYPES_mx8mm = "tar.gz"
  1. Setup the environment

    Take imx8mmevk as an example:

$ MACHINE=imx8mmevk DISTRO=fsl-imx-xwayland source edgescale-setup.sh bld-xwayland
  1. Add the lines to the configuration file – conf/local.conf
GOVERSION = "1.10%"
  1. Build solution
$ bitbake core-image-weston

Note

Imx8MM solution images will be found under tmp/deploy/images/imx8mmevk/. Use the bunzip2 command to decompress core-image-weston-imx8mmevk-<date>.rootfs.sdcard.bz2

  1. Program solution sdcard image and device identification file
$ sudo dd if=<image name>.sdcard of=/dev/<sdx> bs=4M && sync
$ sudo ./bootstrap-enroll-<deviceID>.sh /dev/<sdx>