# TechNexion PICO-PI-IMX8M-MINI

**URL:** <https://hub.mender.io/t/technexion-pico-pi-imx8m-mini/2689>\
**Category:** Yocto Project\
**Tags:** yocto, nxp, zeus\
**Created:** [October 19, 2020, 5:22pm UTC](https://hub.mender.io/t/technexion-pico-pi-imx8m-mini/2689 "2020-10-19T17:22:54Z")\
**Posts on this page:** 1\
**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:** [October 19, 2020, 5:22pm UTC](https://hub.mender.io/t/technexion-pico-pi-imx8m-mini/2689/1 "2020-10-19T17:22:54Z")

</div>

# Board description

TechNexion PICO-PI-IMX8M-MINI evaluation kit blends advanced processing capabilities with sophisticated audio, video, and graphics to deliver low-power and high-performing solutions for embedded consumer and industrial applications.

![](https://d15z4ngi7vchau.cloudfront.net/media/catalog/product/p/i/picopiimx8mmini-dev2-2_4.jpg)

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

# 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 |
| --- | --- | --- |
| zeus (zeus-5.4.24-2.1.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/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

Create a directory for your `mender-tn-imx-bsp` setup to live in:

```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 zeus_5.4.y-next -m imx-5.4.24-2.1.0.xml

```

Download amendment manfiest for Mender support:

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

```

Fetch layers in manifest:

```auto
repo sync -j$(nproc)

```

## Setup build environment

Initialize the build environment:

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

```

See [TechNexion documentation](https://github.com/TechNexion/tn-imx-yocto-manifest/tree/zeus_5.4.y-next#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 mode](https://docs.mender.io/artifact-creation/standalone-deployment), 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/zeus_5.4.y-next#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 `build/tmp/deploy/images/pico-imx8mm/`.

- `build/tmp/deploy/images/pico-imx8mm/core-image-base-pico-imx8mm.sdimg`
- `build/tmp/deploy/images/pico-imx8mm/core-image-base-pico-imx8mm.mender`
- `build/tmp/deploy/images/pico-imx8mm/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-imx8mm/imx-boot \
    build/tmp/deploy/images/pico-imx8mm/core-image-base-pico-imx8mm.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.

### Booting from SD card

Edit your `local.conf` to match the following to configure the build to boot from eMMC:

```auto
# SD Card
MENDER_STORAGE_DEVICE_pico-imx8mm = "/dev/mmcblk1"

# eMMC Card
#MENDER_STORAGE_DEVICE_pico-imx8mm = "/dev/mmcblk2"

```

Re-build the image as outlined in previous section. Once the build has completed you can proceed with the next steps.

Follow the instructions from TechNexion to configure the PICO-PI-IMX8M-MINI board to boot from SD:

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

Write the `core-image-base-pico-imx8mm.sdimg` image to an SD card, e.g using `dd`:

**NOTE!** Be careful! If you point to the wrong `<DEVICE>` when executing the command below, you risk overwriting your workstation’s local or connected storage devices.

```auto
sudo dd if=build/tmp/deploy/images/pico-imx8mm/core-image-base-pico-imx8mm.sdimg of=<DEVICE> bs=4M; sync

```

Once finished, plug the SD card in to the PICO-PI-IMX8M-MINI board and boot it. You should have a working Mender integration.

# References

- The sources of the Yocto integration can be found in [meta-mender-community/meta-mender-imx](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.

* * *

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