# Technexion PICO-PI-IMX7

**URL:** <https://hub.mender.io/t/technexion-pico-pi-imx7/136>\
**Category:** Yocto Project\
**Tags:** yocto, sumo, imx7, nxp, pico-imx7, technexion, thud, dunfell\
**Created:** [November 24, 2018, 12:59pm UTC](https://hub.mender.io/t/technexion-pico-pi-imx7/136 "2018-11-24T12:59:44Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![jorisoffouga](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/jorisoffouga/32/64_2.png) [@jorisoffouga](https://hub.mender.io/u/jorisoffouga)\
**Post date:** [November 24, 2018, 12:59pm UTC](https://hub.mender.io/t/technexion-pico-pi-imx7/136/1 "2018-11-24T12:59:44Z")

</div>

The official [Mender documentation](https://docs.mender.io/) explains how Mender works. This is a board-specific complement to the official documentation.

# Board description

PICO-PI-IMX7 is the Starting Kit for Android Things

The i.MX 7Dual delivers high-performance processing for low-power requirements with a high degree of functional integration. The i.MX 7Dual features an advanced implementation of two ARM®Cortex®-A7 cores, which operate at speeds of up to 1.2 GHz, as well as the ARM® Cortex®-M4 core. The Pico variant is pin-compatible with the Intel® Edison for sensors and low-speed I/O, but also adds additional expansion possibilities for multimedia and connectivity, giving you cutting edge technology that can easily be expanded and implemented for IoT designs.

 ![pico](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/5e522b13daa4be096a43b40cbbf688f715c59dbe.jpeg)

URL:[https://shop.technexion.com/pico-pi-imx7.html](https://shop.technexion.com/pico-pi-imx7.html)

# 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: |
| thud (2.6) | :test_works: | :test_works: |
| warrior (2.7) | :test_works: | :test_works: |
| zeus (3.0) | :test_works: | :test_works: |
| dunfell (3.1) | :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/system-updates-yocto-project/board-integration/bootloader-support/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="dunfell"

```

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=imx7d-pico 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/imx7d-pico/`.

- `tmp/deploy/images/imx7d-pico/core-image-base-imx7d-pico.sdimg`

- `tmp/deploy/images/imx7d-pico/core-image-base-imx7d-pico.mender`

- `tmp/deploy/images/SPL`

- `tmp/deploy/images/u-boot-dtb.img`

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/system-updates-yocto-project/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/overview/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](https://docs.mender.io/artifact-creation/standalone-deployment).

#### Flash instructions

Based on the output artifacts described above we need to flash the SPL, u-boot.imx and core-image-base-imx7d-pico.sdimg separately to fully provision an device and for it to work with Mender.

Required software on the host PC:

- imx\_usb\_loader: [GitHub - boundarydevices/imx\_usb\_loader: USB & UART loader for i.MX5/6/7/8 series](https://github.com/boundarydevices/imx_usb_loader)
- dfu-util
- libusb

```auto
git clone https://github.com/boundarydevices/imx_usb_loader

```

```auto
cd imx_usb_loader && make

```

**Loading U-Boot via USB Serial Download Protocol**

Note: This method is convenient for development purposes.

If the eMMC has already a U-Boot flashed with DFU support then

the user can go to step 2 below in order to update U-Boot.

Put pico board in Serial Boot Loader mode (refer to the PICO-iMX7D Quick Start Guide

page 18 ([https://www.nxp.com/docs/en/user-guide/PICO-IMX7D-USG.pdf](https://www.nxp.com/docs/en/user-guide/PICO-IMX7D-USG.pdf))

Connect a USB to serial adapter between the host PC and pico.

Connect a USB cable between the OTG pico port and the host PC.

Open a terminal program such as minicom.

Copy SPL and u-boot.img to the imx\_usb\_loader folder.

Load the SPL binary via USB:

```auto
$ sudo ./imx_usb SPL

```

Load the u-boot.img binary via USB:

```auto
$ sudo ./imx_usb u-boot-dtb.img

```

Then U-Boot starts and its messages appear in the console program.

Use the default environment variables:

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

```

```auto
=> saveenv

```

**Flashing Image into the eMMC**

From the u-boot :

```auto
 => ums 0 mmc 0 

```

From the host :

```auto
 sudo dd if=core-image-base-imx7d-pico.sdimg of=/dev/sdX bs=1M ; sudo sync

```

After flashing use ctrl-c to get out of ums.

**Flashing U-Boot into the eMMC**

Run the DFU agent so we can flash the new images using dfu-util tool:

```auto
=> dfu 0 mmc 0

```

Flash SPL and u-boot.img into the eMMC running the following commands on a PC:

```auto
$ sudo dfu-util -D SPL -a spl

```

```auto
$ sudo dfu-util -D u-boot-dtb.img -a u-boot

```

The following message should be seen on the U-Boot prompt after a successful upgrade:

```auto
#DOWNLOAD …​ OK 
Ctrl+C to exit …​

```

Remove power from the pico board.

Put pico board into normal boot mode.

Power up the board and the new updated U-Boot should boot from eMMC.

# References

- The sources of the Yocto integration can be found in [meta-mender-community/meta-mender-nxp](https://github.com/mendersoftware/meta-mender-community/tree/dunfell/meta-mender-nxp)

* * *

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

---

_[View the full topic](https://hub.mender.io/t/technexion-pico-pi-imx7/136)._
