# Variscite VAR-SOM-MX8M-NANO : NXP i.MX 8M Nano

**URL:** <https://hub.mender.io/t/variscite-var-som-mx8m-nano-nxp-i-mx-8m-nano/1928>\
**Category:** Yocto Project\
**Created:** [May 15, 2020, 4:29pm UTC](https://hub.mender.io/t/variscite-var-som-mx8m-nano-nxp-i-mx-8m-nano/1928 "2020-05-15T16:29:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [May 15, 2020, 4:29pm UTC](https://hub.mender.io/t/variscite-var-som-mx8m-nano-nxp-i-mx-8m-nano/1928/1 "2020-05-15T16:29:18Z")

</div>

# Board description

The VAR-SOM-MX8M-NANO is a cost-optimized System on Module based on NXP’s i.MX 8M Nano, 1.5GHz Quad-core Cortex-A53™ plus 650MHz Cortex-M7™. The SoM offers an ideal solution for cost-sensitive designs that require power-efficiency and high-performance graphics as well as for general-purpose applications.

This highly integrated platform’s connectivity options include certified single-band 802.11 b/g/n or dual-band 802.11 ac/a/b/g/n, BT4.2/BLE, GbE and USB2.0. Furthermore, the system supports full -40 to 85C industrial operating temperatures, Vivante GC7000UL GPU, LVDS and DSI.

The VAR-SOM-MX8M-NANO is a member of the ‘VAR-SOM Pin2pin’ product family, providing a maximum scalability range; from the entry-level i.MX6UL/6ULL platform, through the i.MX 6 platforms, I.MX 8M-MINI, i.MX 8X up to the i.MX 8QuadMax.

The [VAR-SOM-MX8M-NANO Development Kit and Starter Kit](https://www.variscite.com/product/system-on-module-som/cortex-a53-krait/var-som-mx8m-nano-nxp-i-mx-8m-nano/#evaluation-kit?target=_blank) 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-NANO](https://www.variscite.com/product/system-on-module-som/cortex-a53-krait/var-som-mx8m-nano-nxp-i-mx-8m-nano?target=_blank) connectivity features and performance.

 ![VAR-SOM-MX8M-NANO](https://www.variscite.com/wp-content/uploads/2019/12/ftrd-VAR-SOM-MX8M-NANO-Evaluation-kit.webp)

- [Product Overview](https://www.variscite.com/product/system-on-module-som/cortex-a53-krait/var-som-mx8m-nano-nxp-i-mx-8m-nano/?target=_blank)
- [Support Wiki](http://variwiki.com/index.php?title=VAR-SOM-MX8M-NANO&target=_blank)

# 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](https://wiki.yoctoproject.org/wiki/Releases?target=_blank):

## SD Card Root Filesystem

| Yocto Project | Build | Runtime |
| --- | --- | --- |
| sumo (2.5) | :test_works: | :test_works: |
| zeus (3.0) | :test_works: | :test_works: |

## eMMC Root Filesystem

| Yocto Project | Build | Runtime |
| --- | --- | --- |
| sumo (2.5) | :test_works: | :test_works: |
| zeus (3.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](https://docs.mender.io/devices/integrating-with-u-boot/integration-checklist?target=_blank) has been verified.

# Getting started

## Prerequisites

- A supported Linux distribution and dependencies installed on your workstation/laptop as described in the [Yocto Mega Manual](https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#detailed-supported-distros)
  - NOTE. Instructions depend on which Yocto version you intend to use.

- Google repo tool [installed](https://hub.mender.io/t/google-repo/58/2) and in your `PATH`.

## Configuring the build

### Setup Yocto environment

Set the Yocto Project branch you are building for:

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

```

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

```auto
mkdir mender-variscite && cd mender-variscite

```

Initialize repo manifest:

```auto
if [${BRANCH} == "zeus"]; then
  REPO_BRANCH="fsl-${BRANCH}"
else
  REPO_BRANCH="${BRANCH}"
fi
repo init -u https://github.com/varigit/variscite-bsp-platform.git -b ${REPO_BRANCH}
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:

```auto
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-NANO 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:

```auto
export MEDIA="sdcard"

```

```auto
export MEDIA="emmc"

```

## Setup build environment

Initialize the build environment:

```auto
MACHINE=imx8mn-var-som 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:

```bash
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:

```shell
sudo dd if=tmp/deploy/images/imx8mn-var-som/core-image-base-imx8mn-var-som.sdimg of=<SDCARD-DEVICE-NODE> conv=fdatasync bs=8M

```

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](http://variwiki.com/index.php?title=Yocto_Recovery_SD_card&release=RELEASE_SUMO_V1.1_VAR-SOM-MX8M-NANO&target=_blank), 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/imx8mn-var-som/core-image-base-imx8mn-var-som.sdimg

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

```shell
sudo dd if=/mnt/core-image-base-imx8mn-var-som.sdimg of=/dev/mmcblk0 conv=fdatasync bs=8M
halt

```

Then change the _Boot Select_ switch (also labeled as _SW3_ ) to the _Internal_ position and power cycle your board.

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](https://docs.mender.io/architecture/mender-artifacts?target=_blank) 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](https://docs.mender.io/architecture/standalone-deployments?target=_blank).

# References

- The Variscite imx8m-var-dart template files can be found in [meta-mender-community](https://github.com/mendersoftware/meta-mender-community/tree/sumo/meta-mender-variscite).
- The official [Mender documentation](https://docs.mender.io/) 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!_

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [November 17, 2020, 9:46am UTC](https://hub.mender.io/t/variscite-var-som-mx8m-nano-nxp-i-mx-8m-nano/1928/2 "2020-11-17T09:46:08Z")

</div>

5 posts were split to a new topic: [Issue with Variscite VAR-SOM-MX8M-NANO](https://hub.mender.io/t/issue-with-variscite-var-som-mx8m-nano/2840)
