# Variscite VAR-SOM-SOLO

**URL:** <https://hub.mender.io/t/variscite-var-som-solo/467>\
**Category:** Yocto Project\
**Tags:** yocto, sumo, rocko, nxp, thud\
**Created:** [April 9, 2019, 5:52pm UTC](https://hub.mender.io/t/variscite-var-som-solo/467 "2019-04-09T17:52:44Z")\
**Posts on this page:** 1\
**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:** [April 9, 2019, 5:52pm UTC](https://hub.mender.io/t/variscite-var-som-solo/467/1 "2019-04-09T17:52:44Z")

</div>

# Board description

Staying on-trend with the market’s shift towards a cost-effective highly integrated off-the-shelf solution, the VAR-SOM-SOLO from Variscite level the playing ground for a broad spectrum of embedded products. Bringing all the benefits of the widely successful VAR-SOM-MX6, the VAR-SOM-SOLO/DUAL from Variscite carries much smaller dimensions and a slim-lined price-point. Features include NXP/Freescale’s iMX6 Solo/Dual Lite core, 1GHz Cortex-A9, SLC NAND, eMMC, dual-band certified Wi-Fi/BT with MIMO, USB, Gigabit Ethernet, A/V interfaces and industrial operating temperatures.

The [Variscite VAR-SOM-SOLO platform](https://www.variscite.com/product/system-on-module-som/cortex-a9/var-som-solo-cpu-nxp-imx6/?target=_blank) is a System on Module (SoM) based on the NXP/Freescale iMX6 chip. The [evaluation kit](https://www.variscite.com/product/evaluation-kits/var-som-solo-kits/?target=_blank) comes with a [VAR-SOLOCustomBoard](https://www.variscite.com/wp-content/uploads/2017/12/VAR-SOLOCustomBoard-Datasheet.pdf?target=_blank) and a 7" Capacitive touch LCD.

![](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/72bdbb42ec02d1eecff9c38f74ea51b076bdbb4d.png)

URL:

- [Product Overview](https://www.variscite.com/product/system-on-module-som/cortex-a9/var-som-solo-cpu-nxp-imx6/?target=_blank)
- [Support Wiki](http://variwiki.com/index.php?title=VAR-SOM-SOLO/DUAL&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 |
| --- | --- | --- |
| rocko (2.4) | :test_works: | :test_works: |
| sumo (2.5) | :test_works: | :test_works: |
| thud (2.6) | :test_works: | :test_works: |

## eMMC Root Filesystem

| Yocto Project | Build | Runtime |
| --- | --- | --- |
| sumo (2.5) | :test_works: | :test_works: |
| thud (2.6) | :test_works: | :test_works: |

## NAND Root Filesystem

| Yocto Project | Build | Runtime |
| --- | --- | --- |
| sumo (2.5) | :test_works: | :test_works: |
| thud (2.6) | :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="rocko"

```

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
repo init -u https://github.com/varigit/variscite-bsp-platform.git -b $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-SOLO platform supports running U-Boot directly from the following media:

- SD-Card
- NAND flash

Note that running U-Boot from eMMC is specifically not supported.

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

- SD-Card
- NAND flash
- eMMC

When configuring the system to use eMMC for the root filesystem, we will use NAND flash for storing U-Boot.

Set the shell variable for your desired root filesystem media:

```auto
export MEDIA="sdcard"

```

```auto
export MEDIA="nand"

```

```auto
export MEDIA="emmc"

```

## Setup build environment

Initialize the build environment:

```auto
MACHINE=var-som-mx6 DISTRO=fslc-x11 . setup-environment 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:

```shell
bitbake core-image-base

```

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

### Using the build output

The mechanism for provisioning your device with the build will vary depending on the storage media you have selected above.

#### 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/var-som-mx6/core-image-base-var-som-mx6.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 _SW6_) to the _MMC_ 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

To be able to provision images to the eMMC, we need to boot a prebuilt image from Variscite using an SDCard. Download the image and write it to an SDCard. **WARNING** , make sure you use the correct device node as the _of=_ parameter to avoid overwriting the wrong device:

```shell
gunzip sumo-fslc-4.9.88-mx6-v1.2.img.gz
sudo dd if=sumo-fslc-4.9.88-mx6-v1.2.img of=<SDCARD-DEVICE-NODE> conv=fdatasync bs=8M

```

Now remove and reinsert the SD Card to have your system automount it (or just issue a manual mount command). Copy the necessary files from your build tree to the SD Card.

```shell
sudo cp -f tmp/deploy/images/var-som-mx6/core-image-base-var-som-mx6.sdimg \
          tmp/deploy/images/var-som-mx6/SPL \
          tmp/deploy/images/var-som-mx6/u-boot.img-nand \
          <SDCARD-MOUNT-POINT>

```

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 _SW6_) to the _MMC_ position. Now turn on power to the board and it will boot from the SDCard. Login as user _root_ with no password and execute the following commands to provision the binaries:

```shell
dd if=/core-image-base-var-som-mx6.sdimg of=/dev/mmcblk0 conv=fdatasync bs=8M
flash_erase /dev/mtd0 0 0
kobs-ng init -x /SPL --search_exponent=1 -v
flash_erase /dev/mtd1 0 0
nandwrite -p /dev/mtd1 /u-boot.img-nand
halt

```

Remove the SDCard, configure your board to boot from eMMC by moving the _Boot Select_ switch (also labeled as _SW6_) to the _NAND_ position and power cycle your board.

Finally, press a key to interrupt the autoboot and enter the following commands at the UBoot prompt.

```shell
env default -a -f
saveenv
reset

```

#### NAND

To be able to provision images to the NAND, we need to boot a prebuilt image from Variscite using an SDCard. Download the image and write it to an SDCard. **WARNING** , make sure you use the correct device node as the _of=_ parameter to avoid overwriting the wrong device:

```shell
gunzip sumo-fslc-4.9.88-mx6-v1.2.img.gz
sudo dd if=sumo-fslc-4.9.88-mx6-v1.2.img of=<SDCARD-DEVICE-NODE> conv=fdatasync bs=8M

```

Now remove and reinsert the SD Card to have your system automount it (or just issue a manual mount command). Copy the necessary files from your build tree to the SD Card.

```shell
sudo cp -f tmp/deploy/images/var-som-mx6/core-image-base-var-som-mx6.ubimg \
          tmp/deploy/images/var-som-mx6/SPL \
          tmp/deploy/images/var-som-mx6/u-boot.img-nand \
          <SDCARD-MOUNT-POINT>

```

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 _SW6_) to the _MMC_ position. Now turn on power to the board and it will boot from the SDCard. Login as user _root_ with no password and execute the following commands to provision the binaries:

```shell
flash_erase /dev/mtd0 0 0
kobs-ng init -x /SPL --search_exponent=1 -v
flash_erase /dev/mtd1 0 0
nandwrite -p /dev/mtd1 /u-boot.img-nand
flash_erase /dev/mtd3 0 0
nandwrite -k /dev/mtd3 /core-image-base-var-som-mx6.ubimg
halt

```

Remove the SDCard, configure your board to boot from NAND by moving the _Boot Select_ switch (also labeled as _SW6_) to the _NAND_ position and power cycle your board.

#### Updating with Mender Artifacts

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 var-som-mx6 template files can be found in [meta-mender-community](https://github.com/mendersoftware/meta-mender-community/tree/rocko/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!_
