# Boundary Devices - Nitrogen6X

**URL:** <https://hub.mender.io/t/boundary-devices-nitrogen6x/187>\
**Category:** Yocto Project\
**Tags:** yocto, sumo, nxp\
**Created:** [January 24, 2019, 2:15pm UTC](https://hub.mender.io/t/boundary-devices-nitrogen6x/187 "2019-01-24T14:15:43Z")\
**Posts on this page:** 3\
**Page:** 1

<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:** [January 24, 2019, 2:15pm UTC](https://hub.mender.io/t/boundary-devices-nitrogen6x/187/1 "2019-01-24T14:15:43Z")

</div>

# Board description

The Nitrogen6X is an embedded single board computer (SBC) based on the NXP i.MX 6 applications processor. It can be built with the i.MX 6 Single, Dual Lite, Dual, and Quad processors, with the Quad core standard on all of our boards. It is designed to rugged commercial standards so it can be used for both development purposes or mass production

 ![NIT6Q_REV4TOP-Large](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/ad85d5e7dd89f9d7b41284477bd69103258076bb.jpeg)

URL: [https://boundarydevices.com/product/nitrogen6x-board-imx6-arm-cortex-a9-sbc/](https://boundarydevices.com/product/nitrogen6x-board-imx6-arm-cortex-a9-sbc/)  
Wiki: [https://boundarydevices.com/wiki/](https://boundarydevices.com/wiki/)

# 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):

| Yocto Project | Build | Runtime |
| --- | --- | --- |
| sumo (2.5) | :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-nxp` setup to live in and clone the

meta information.

```auto
mkdir mender-nxp && cd mender-nxp

```

Initialize repo manifest:

```auto
repo init -u https://github.com/mendersoftware/meta-mender-community \
-m meta-mender-nxp/scripts/manifest-nxp.xml \
-b ${BRANCH}

```

Fetch layers in manifest:

```auto
repo sync

```

## Setup build environment

Initialize the build environment:

```auto
source setup-environment nxp

```

**NOTE!** You need to accept the Freescale EULA at ‘…/sources/meta-freescale/EULA’. Please read it and in case you accept it, add:

```
ACCEPT_FSL_EULA = "1" 

```

in your local.conf.

### Building the image

You can now proceed with building an image:

```auto
MACHINE=nitrogen6x bitbake core-image-base

```

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

### Using the build output

After a successful build, the images and build artifacts are placed in `tmp/deploy/images/nitrogen6x/`.

- `tmp/deploy/images/nitrogen6x/core-image-base-nitrogen6x.sdimg`

- `tmp/deploy/images/nitrogen6x/core-image-base-nitrogen6x.mender`

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](https://docs.mender.io/artifacts/provisioning-a-new-device?target=_blank) 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](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).

#### Flash instructions

The default configuration assumes that you are booting from the top uSD card slot, **note** that there is a uSD at the bottom side of the board, which will not work.

Write the disk-image to the uSD using the following command:

```bash
sudo dd if=core-image-base-nitrogen6x.sdimg of=<block device>

```

Insert the uSD in to the device and halt it in U-Boot on the first boot. You should see:

```auto
Hit any key to stop autoboot: 0                                                                                                            
=>

```

The Nitrogen6X stores the U-Boot binary on a serial EEPROM, which means that we need one additional step to make sure that the U-Boot binary that we build gets written to the EEPROM.

Luckily there is already an script prepared to flash U-Boot, and the binary is installed on the correct location on the uSD, you just need to run:

```auto
=> run upgradeu

```

Takes around one minute to complete, and you will be prompted to reset the board once it is complete.

Also remember to run the following **once** after you have performed the U-Boot upgrade:

```auto
=> env default -a
=> saveenv

```

This will make sure that the correct U-Boot environment is used.

# References

- 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:** ![Naveen](https://avatars.discourse-cdn.com/v4/letter/n/f07891/32.png) [@Naveen](https://hub.mender.io/u/Naveen)\
**Post date:** [June 2, 2020, 5:33am UTC](https://hub.mender.io/t/boundary-devices-nitrogen6x/187/2 "2020-06-02T05:33:14Z")

</div>

Hi Mirzak,

I am using Nitrogen6x\_solo and I was able to successfully build .sdimg and .mender images.

Yocto Branch = Warrior

Query 1 : I do not see any mender env variables in u-boot.Does this mean automatic patching is not working as intended? If so,should we do Manual u-boot integration?

Query 2 : I am not able to execute **run upgradeu** in u-boot successfully.No update.scr file is present in Boot partition.

Please help me figure out the issues.Thanks in advance.

---

<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:** [June 2, 2020, 6:27pm UTC](https://hub.mender.io/t/boundary-devices-nitrogen6x/187/3 "2020-06-02T18:27:39Z")

</div>

Hi @Naveen, welcome to Mender hub.

For Mender environment variables, if you run “env default -a -f” from the U-boot prompt, then do you see them? Depending on where U-Boot stores it’s environment, simply installing the SDIMG may not reset the environment to default so you may need to do it manually. (don’t forget “saveenv” after the “env default” command).

For the upgrade.scr, you should be able to add something like the following to local.conf to have that file included:

```
IMAGE_BOOT_FILES_append = " \
	upgrade.scr-${MACHINE};upgrade.scr \
"
```
