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

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 Quad-core ARM Cortex-A53™ plus 400MHz Cortex-M4™ real-time processor and up to 4 GB DDR4, the VAR-SOM-MX8M-MINI supports advanced features and a variety of connectivity options, including integrated HW engines supporting 1080p video encoding and decoding, 2D and 3D graphics, HQ audio, integrated certified single band 802.11 b/g/n or dual-band 802.11 ac/a/b/g/n, integrated CAN bus, LVDS, and a variety of additional interfaces.

The VAR-SOM-MX8M-MINI is a pin2pin platform compatible with the ‘VAR-SOM Pin2Pin’ products family, providing a maximum scalability range; from the entry-level i.MX6UL/6ULL platform, through the i.MX 6 platforms, i.MX 8X, and up to the i.MX 8QuadMax.

The VAR-SOM-MX8M-MINI Development Kit and Starter Kit can serve as a complete development platform for both evaluation and application development purposes. The kits provide a great showcase of the VAR-SOM-MX8M-MINI connectivity features and performance.

VAR-SOM-MXM-MINI

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
warrior (2.7) :test_works: :test_works:

eMMC Root Filesystem

Yocto Project Build Runtime
warrior (2.7) :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

  • A supported Linux distribution and dependencies installed on your workstation/laptop as described in the Yocto Mega Manual
    • NOTE. Instructions depend on which Yocto version you intend to use.
  • Google repo tool installed and in your PATH.

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="warrior"

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

mkdir mender-variscite && cd mender-variscite

Initialize repo manifest:

repo init -u https://github.com/varigit/variscite-bsp-platform.git -b fsl-warrior -m imx-4.19.35-1.1.0-var01.xml                                                                                       
mkdir .repo/local_manifests
cd .repo/local_manifests/
wget https://raw.githubusercontent.com/mendersoftware/meta-mender-community/$BRANCH/scripts/mender-no-setup.xml
cd -

Fetch layers in manifest:

repo sync
cd .repo/local_manifests/
ln -sf ../../sources/meta-mender-community/scripts/mender-no-setup.xml .
cd -

Determine root filesystem media

The Variscite VAR-SOM-MX8M-MINI platform supports running U-Boot directly from the following media:

  • SD-Card
  • eMMC

The root filesystem can be stored on any of the following media:

  • SD-Card
  • eMMC

Set the shell variable for your desired root filesystem media:

export MEDIA="sdcard"
export MEDIA="emmc"

Setup build environment

Initialize the build environment:

MACHINE=imx8mm-var-dart DISTRO=fsl-imx-xwayland . var-setup-release.sh -b build
cat ../sources/meta-mender-community/meta-mender-variscite/templates/bblayers.conf.append >> conf/bblayers.conf
cat ../sources/meta-mender-community/templates/local.conf.append >> conf/local.conf
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-${MEDIA}.conf.append >> conf/local.conf

Building the image

You can now proceed with building an image:

bitbake core-image-base

Replace core-image-base with your desired image target.

Using the build output

SD Card

Provision an SD Card with the built above. WARNING, make sure you use the correct device node as the of= parameter to avoid overwriting the wrong device:

sudo dd if=tmp/deploy/images/imx8mm-var-dart/core-image-base-imx8mm-var-dart.sdimg of=<SDCARD-DEVICE-NODE>

Remove the SD Card from your build host and insert it into the target. Configure your board to boot from SD Card by moving the Boot Select switch (also labeled as SW3 ) to the SD position. Now turn on power to the board and it will boot from the SDCard and Mender will connect to the server configured in your local.conf file.

eMMC

Using either the above built SDCard Yocto image or the Variscite Yocto Recovery SD card, boot your system off of SD. Transfer the following file from your build PC to the target board with a USB drive:

  • tmp/deploy/images/imx8mm-var-dart/core-image-base-imx8mm-var-dart.sdimg

Assuming the USB drive is mounted on the target at /mnt, run the following commands:

sudo dd if=/mnt/core-image-base-imx8mm-var-dart.sdimg of=/dev/mmcblk0 bs=8M
halt

Then change the Boot Select switch (also labeled as SW3 ) to the Internal position and power cycle your board.

eMMC - USB Mass Storage Installation

An alternative mechanism exists if you already have a working UBoot running from either SD-Card or eMMC running on the target board. This mechanism will present the eMMC device to your development PC as a mass storage device and you can flash the image directly from there.

  1. Boot the system and press any key to interrupt the boot process, leaving you at the U-Boot> prompt.
  2. Connect a USB cable from USB3/J26 port on the target board to your PC.
  3. Enable USB mass storage mode from the U-Boot> prompt:
U-Boot> ums 0 mmc 1
  1. Determine what device node was added on your PC. This can be done using the Disk Utility or viewing system logs. Consult your PC OS documentation for more details
  2. Write the flash directly to the eMMC. This assumes the new device was enumerated as /dev/sdd. WARNING: this will destroy any contents on the device listed under the of= parameter below.
sudo dd if=tmp/deploy/images/imx8mm-var-dart/core-image-base-imx8mm-var-dart.sdimg of=<EMMC-DEVICE-NODE> bs=8M status=progress conv=fdatasync

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 only in Standalone deployments.

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 press 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!

1 Like