Variscite VAR-SOM-MX8M-MINI : NXP i.MX 8M Mini - Kirkstone

Board description

The VAR-SOM-MX8M-MINI is a highly scalable, low power System on Module (SoM), offering a mainstream solution to fit a wide range of applications and cost requirements.
Based on NXP’s i.MX 8M Mini with up to 1.8GHz Quadcore ARM Cortex-A53 plus 400MHz Cortex-M4 real-time processor and up to 4 GB DDR4, the VAR-SOM-MX8M offers a low-power and cost-optimized solution with ultimate scalability options to suit a wide range of applications and cost requirements.
The SoM is pin-compatible with the VAR-SOM Pin2Pin product family, including the i.MX 6UL/6ULL modules, through i.MX 6, i.MX 8M Nano, TI AM625x, i.MX 93, i.MX 8M Mini, i.MX 8M Plus up to i.MX 8X and i.MX 8 QuadMax-based modules providing Variscite’s customers with flexibility, extended lifetime, as well as reduced development time, cost, and risk.

VAR-SOM-MX8M-MINI-starter-kit

Test results

The Yocto Project releases in the table below have been tested by the Mender community. Please update it if you have tested this integration on other Yocto Project releases:

SD Card Root Filesystem

Yocto Project Build Runtime
Kirkstone (4.0) :test_works: :test_works:

Build Means that the Yocto Project build using this Mender integration completes without errors and outputs images.
Runtime Means that Mender has been verified to work on the board. For U-Boot-based boards, the integration checklist has been verified.

Getting started

Prerequisites

Configuring the build

Setup Yocto environment

Set the Yocto Project branch you are building for:

# set to your branch, make sure it is supported (see table above)
export BRANCH="kirkstone"

Create a directory for your mender-imx8mm setup to live in and clone the
meta information.

mkdir mender-imx8mm && cd mender-imx8mm

Initialize repo manifest:

repo init -u https://github.com/varigit/variscite-bsp-platform \
          -m imx-5.15.71-2.2.0.xml \
          -b ${BRANCH}

Fetch layers in manifest:

repo sync -j$(nproc)

Gather Mender resources:

cd sources
git clone https://github.com/mendersoftware/meta-mender.git \
         -b ${BRANCH}
git clone https://github.com/mendersoftware/meta-mender-community.git \
         -b ${BRANCH}
cd ../

Setup build environment

Initialize the build environment:

MACHINE=imx8mm-var-dart DISTRO=fslc-x11 source ./var-setup-release.sh build

Remove unused resources

By default, Variscite includes meta-qt5 in the bblayers.conf file, if not used please remove it.

Add the layers

bitbake-layers add-layer ../sources/meta-mender/meta-mender-core
bitbake-layers add-layer ../sources/meta-mender/meta-mender-demo
bitbake-layers add-layer ../sources/meta-mender-community/meta-mender-variscite

Setup the local.conf file

cat ../sources/meta-mender-community/meta-mender-variscite/templates/local.conf.append >> conf/local.conf
cat ../sources/meta-mender-community/meta-mender-variscite/templates/local-sdcard.conf.append >> conf/local.conf

Please note this will add the MENDER_TENANT_TOKEN & MENDER_SERVER_URL variables, please modify them accordingly (more info further in this document).

Configure Mender server URL (optional)

This section is not required for a successful build but images that are generated by default are only suitable for usage with the Mender client in Standalone deployments, due to lack of server configuration.

You can edit the conf/local.conf file to provide your Mender server configuration, ensuring the generated images and Mender Artifacts are connecting to the Mender server that you are using. There should already be a commented section in the generated conf/local.conf file and you can simply uncomment the relevant configuration options and assign appropriate values to them.

Build for Hosted Mender:

# To get your tenant token:
#    - log in to https://hosted.mender.io
#    - click your email at the top right and then "My organization"
#    - press the "COPY TO CLIPBOARD"
#    - assign content of clipboard to MENDER_TENANT_TOKEN
#
MENDER_SERVER_URL = "https://hosted.mender.io"
MENDER_TENANT_TOKEN = "<copy token here>"

Building the image

You can now proceed with building an image:

bitbake core-image-base

You can replace core-image-base with your desired image target. Please keep in mind this is the tested image.

Using the build output

After a successful build, the images and build artifacts are placed in tmp/deploy/images/imx8mm-var-dart/core-image-base-imx8mm-var-dart.sdimg

The disk image (with .sdimg suffix) is used to provision the device storage for devices without Mender running already. Please proceed to the official documentation on provisioning a new device for steps to do this.

On the other hand, if you already have Mender running on your device and want to deploy a rootfs update using this build, you should use the Mender Artifact files, which have .mender suffix. You can either deploy this Artifact in managed mode with the Mender server (upload it under Releases in the server UI) or by using the Mender client standalone mode.

Flashing the SD card

To flash and make a bootable SD, run:

dd if=build/tmp/deploy/images/imx8mm-var-dart/core-image-base-imx8mm-var-dart.sdimg | pv | dd of=/dev/SD_CARD

WARNING: make sure you use the correct device node as the of= parameter to avoid overwriting the wrong device.

The command pv is optional but is highly recommended to track the RT transfer.

Booting the board

By default, the board will boot to its eMMc storage, by changing the BOOT_SELECT switch, this will allow it to boot from the SD card.
After the board boots into u-boot from the SD card, please reset the environment values:

env default -a -f
saveenv
saveenv
reset

References

  • The Variscite imx8m-var-dart template files can be found in meta-mender-community
  • The official Mender documentation explains how Mender works. This is simply a board-specific complement to the official documentation.

If this post was useful to you, please leave a like, or leave a thank you note to the contributor who put valuable time into this and made it available to you. It will be much appreciated!

2 Likes

Hi @estape.nt

Thanks for sharing it. Would you please let me know how can I use that for emmc (without sd card).