# NXP i.MX 8XLite Evaluation Kit (EVK)

**URL:** <https://hub.mender.io/t/nxp-i-mx-8xlite-evaluation-kit-evk/6124>\
**Category:** Yocto Project\
**Tags:** yocto, nxp, langdale\
**Created:** [August 17, 2023, 5:12pm UTC](https://hub.mender.io/t/nxp-i-mx-8xlite-evaluation-kit-evk/6124 "2023-08-17T17:12:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![estape.nt](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/estape.nt/32/2049_2.png) [@estape.nt](https://hub.mender.io/u/estape.nt)\
**Post date:** [August 17, 2023, 5:12pm UTC](https://hub.mender.io/t/nxp-i-mx-8xlite-evaluation-kit-evk/6124/1 "2023-08-17T17:12:43Z")

</div>

# Board description

The i.MX 8XLite evaluation kit (EVK) provides a platform for evaluation and development using the Arm® Cortex® A35 + Cortex-M4F based i.MX 8XLite applications processors as well as the NXP PF7100 power management integrated circuit (PMIC) solution and sensors.

The i.MX 8XLite processor family is built with a high-level integration to support security, automotive telematics (V2X) and time-sensitive networking (TSN) while meeting efficient performance requirements. The EVK is supported with highly optimized drivers and software to enable broad-based applications for the embedded industrial and automotive markets.

 ![I.MX8XLite-EVK-IMG1](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/0/02326f665200286e0f38e374cb49228fa61b790b.jpeg)

- References [i.MX 8XLite EVK](https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-8xlite-evaluation-kit:MCIMX8DXL-WEVK) & [i.MX 8XLite](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-8-applications-processors/i-mx-8xlite-applications-processors-for-telematics-v2x-and-industrial-control:iMX8XLite)
- [NXP Support](https://www.nxp.com/support/support:SUPPORTHOME)

# 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 |
| --- | --- | --- |
| langdale (4.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="langdale"

```

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

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

```

Clone the NXP sources

```auto
repo init -u https://github.com/nxp-imx/imx-manifest.git \
          -b imx-linux-$BRANCH \
          -m imx-6.1.1-1.0.0.xml
repo sync -j$(nproc)

```

Fetch Mender layers:

```auto
cd sources
git clone https://github.com/mendersoftware/meta-mender.git \
         -b kirkstone
git clone https://github.com/estape11/meta-mender-community.git \
         -b langdale
cd ..

```

## Setup build environment

Initialize the build environment:

```auto
MACHINE=imx8dxlb0-lpddr4-evk DISTRO=fsl-imx-wayland source ./imx-setup-release.sh -b build

```

Add `langdale` in the `LAYERSERIES_COMPAT_mender`:

```auto
vi ../sources/meta-mender/meta-mender-core/conf/layer.conf
vi ../sources/meta-mender/meta-mender-demo/conf/layer.conf

```

Add the Mender layer to the bblayers

```auto
bitbake-layers add-layer ../sources/meta-mender/meta-mender-core/
bitbake-layers add-layer ../sources/meta-mender/meta-mender-demo/
bitbake-layers add-layer ../sources/meta-mender-community/meta-mender-nxp

```

Apply the local.conf templates

```auto
cat ../sources/meta-mender-community/templates/local.conf.append >> conf/local.conf
cat ../sources/meta-mender-community/meta-mender-nxp/templates/local.conf.append >> conf/local.conf
cat ../sources/meta-mender-community/meta-mender-nxp/templates/local-sdcard.conf.append >> conf/local.conf

```

### 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-minimal

```

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

## Using the build output

After a successful build, the resources should available in the result deploy folder (`<build_dir>/tmp/deploy/images/imx8dxlb0-lpddr4-evk`). Inside you will find the needed files such as the bootloader, kernel, rootfs and Mender artifact.

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 the SD card (predefined partitions)

```bash
dd if=core-image-minimal-imx8dxlb0-lpddr4-evk.sdimg | pv | dd of=/dev/<sd_dev> 

```

### Flash the bootloader

The device has to be in `Download Mode` and the USB connected from the OTG-2 to the PC

```bash
uuu -lsusb

```

With the card inserted in the device, flash using the `uuu` tool

```bash
uuu -b sd imx-boot-imx8dxlb0-lpddr4-evk-sd.bin-flash_linux_m4

```

### Boot the board

After flashing:

1. Turn the board off
2. Change the BOOT-MODE jumpers to boot into the SD card
3. Connect the DEBUG cable (micro-usb) to the board
4. Open a serial program in the host computer (3rd serial device @ 115200 8N1 / Flow Control = NO)
5. Power on the board
6. Stop the uboot process (press a key) and reset the env:

```bash
env default -a
saveenv
reset

```

# References

- The official [Mender documentation](https://docs.mender.io/) explains how Mender works. This is simply a board-specific complement to the official documentation.
- [NXP official Yocto Guide](https://www.nxp.com/docs/en/user-guide/IMX_LINUX_USERS_GUIDE.pdf)
