# Technexion PICO-IMX8M

**URL:** <https://hub.mender.io/t/technexion-pico-imx8m/3051>\
**Category:** Yocto Project\
**Tags:** yocto, sumo, nxp, technexion\
**Created:** [January 7, 2021, 1:04pm UTC](https://hub.mender.io/t/technexion-pico-imx8m/3051 "2021-01-07T13:04:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![trini](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/trini/32/1007_2.png) [@trini](https://hub.mender.io/u/trini)\
**Post date:** [January 7, 2021, 1:04pm UTC](https://hub.mender.io/t/technexion-pico-imx8m/3051/1 "2021-01-07T13:04:33Z")

</div>

# Board description

The PICO-IMX8M is a high performance highly integrated PICO Compute Module designed around the NXP i.MX8M Dual/QuadLite/Quad core ARM Cortex-A53 + Cortex-M4applications processor. The PICO-IMX8M provides an ideal building block that easily integrates with a wide range of target markets requiring compact, cost effective with low power consumption.

![](https://d15z4ngi7vchau.cloudfront.net/media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/p/i/picopiimx8m-kit1-2web_3.jpg)

URL: [NXP i.MX8M Quad System-on-Module Cortex-A53 PICO SOM with Yocto, Linux, Android Source code - PICO-IMX8M - TechNexion](https://www.technexion.com/products/system-on-modules/pico/pico-imx8m/)  
Wiki: [https://developer.technexion.com/mediawiki/PICO-IMX8M](https://developer.technexion.com/mediawiki/PICO-IMX8M)

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

TODO: Update table below with Yocto Project versions tested & result. Sample data:

| Yocto Project | Build | Runtime |
| --- | --- | --- |
| sumo (2.5) | :test_works: | :test_works: [1](#footnote1) |

1. Due to the age of U-Boot in this release, ext4 reads are slow and loading the kernel can take upwards of 40 seconds.

**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="sumo"

```

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

```auto
mkdir mender-tn-imx-bsp && cd mender-tn-imx-bsp

```

Initialize the TechNexion BSP repo manifest:

```auto
repo init -u https://github.com/TechNexion/tn-imx-yocto-manifest.git -b sumo_4.14.y_GA-stable -m imx-4.14.98-2.0.1_patch.xml

```

Download amendment manfiest for Mender support:

```auto
wget --directory-prefix .repo/local_manifests https://raw.githubusercontent.com/mendersoftware/meta-mender-community/sumo/meta-mender-tn-imx-bsp/scripts/mender-technexion.xml

```

Fetch layers in manifest:

```auto
repo sync

```

## Setup build environment

Initialize the build environment:

```bash
DISTRO=fsl-imx-xwayland MACHINE=pico-imx8mq source tn-setup-mender.sh -b build-xwayland-imx8mq

```

See [TechNexion documentation](https://github.com/TechNexion/tn-imx-yocto-manifest/tree/sumo_4.14.y_GA-stable#configurations-for-setup-script) for all the available configuration options.

### Configure Mender server URL (optional)

This section is not required for a successful build but images that are generated by default are only suitable for usage with the Mender client in [Standalone deployments](https://docs.mender.io/artifact-creation/standalone-deployment?target=_blank), due to lack of server configuration.

You can edit the `conf/local.conf` file to provide your Mender server configuration, ensuring the generated images and Mender Artifacts are connecting to the Mender server that you are using. There should already be a commented section in the generated `conf/local.conf` file and you can simply uncomment the relevant configuration options and assign appropriate values to them.

Build for Hosted Mender:

```auto
# To get your tenant token:
# - log in to https://hosted.mender.io
# - click your email at the top right and then "My organization"
# - press the "COPY TO CLIPBOARD"
# - assign content of clipboard to MENDER_TENANT_TOKEN
#
MENDER_SERVER_URL = "https://hosted.mender.io"
MENDER_TENANT_TOKEN = "<copy token here>"

```

### Building the image

You can now proceed with building an image:

```auto
bitbake core-image-base

```

Replace `core-image-base` with your desired image target. See [TechNexion documentation](https://github.com/TechNexion/tn-imx-yocto-manifest/tree/sumo_4.14.y_GA-stable#build-yocto-for-technexion-target-platform) for all additional image targets and configurations.

### Using the build output

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

- `build/tmp/deploy/images/pico-imx8mq/core-image-base-pico-imx8mq.sdimg`
- `build/tmp/deploy/images/pico-imx8mq/core-image-base-pico-imx8mq.mender`
- `build/tmp/deploy/images/pico-imx8mq/imx-boot`

`imx-boot` is the bootloader which needs to be flashed as a separate process when flashing eMMC

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).

### Booting from eMMC

The default configuration in the build is configured to boot from eMMC.

Follow the instructions from TechNexion to configure the PICO-PI-IMX8M-MINI board to boot in serial download mode:

- [PICO‐IMX8MM · TechNexion/u-boot-edm Wiki · GitHub](https://github.com/TechNexion/u-boot-edm/wiki/PICO%E2%80%90IMX8MM)

Follow the instructions from TechNexion to download the `uuu` tool:

- [Use mfgtool "uuu" to flash eMMC · TechNexion/u-boot-edm Wiki · GitHub](https://github.com/TechNexion/u-boot-edm/wiki/Use-mfgtool-%22uuu%22-to-flash-eMMC)

Flash the eMMC:

```auto
sudo ./uuu -b emmc_img \
    build/tmp/deploy/images/pico-imx8mq/imx-boot-pico-imx8mq-sd.bin \
    build/tmp/deploy/images/pico-imx8mq/core-image-base-pico-imx8mq.sdimg

```

The result should be the following if it was succesful:

> ```auto
> uuu (Universal Update Utility) for nxp imx chips -- libtn-uuu_1.2.91_20190430-0-g82dbda0
> 
> Success 1 Failure 0
> 
> 3:172 6/ 6 [Done] FB: done
> 
> ```

Follow the instructions from TechNexion to boot from eMMC:

- [PICO‐IMX8MM · TechNexion/u-boot-edm Wiki · GitHub](https://github.com/TechNexion/u-boot-edm/wiki/PICO%E2%80%90IMX8MM)

Reset the device, and you should have a working Mender integration.

# References

- The sources of the Yocto integration can be found in [meta-mender-community/meta-mender-tn-imx-bsp](https://github.com/mendersoftware/meta-mender-community/tree/zeus/meta-mender-tn-imx-bsp)
- The official [Mender documentation](https://docs.mender.io/) explains how Mender works. This is simply a board-specific complement to the official documentation.
