# Nezha Allwinner D1

**URL:** https://hub.mender.io/t/nezha-allwinner-d1/7778
**Category:** Yocto Project
**Tags:** yocto, riscv64, scarthgap, riscv
**Created:** [May 14, 2025, 5:59am UTC](https://hub.mender.io/t/nezha-allwinner-d1/7778 "2025-05-14T05:59:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)
#### Post date: [May 14, 2025, 5:59am UTC](https://hub.mender.io/t/nezha-allwinner-d1/7778/1 "2025-05-14T05:59:12Z")

</div>

# Board description

**Nezha** is a AIoT development board customized by AWOL based on Allwinner’s D1-H chip. It is the world’s first mass-produced development board that supports 64bit RISC-V instruction set and Linux system.

 ![nezha](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/a/a8ec9f49400ad8865b98c32cc52ff8ad3b4d3c4b.jpeg)

URL: [https://d1.docs.aw-ol.com/en/d1\_dev/](https://d1.docs.aw-ol.com/en/d1_dev/?target=_blank)

Wiki: [https://linux-sunxi.org/Allwinner\_Nezha](https://linux-sunxi.org/Allwinner_Nezha?target=_blank)

# 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 |
| --- | --- | --- |
| scarthgap (5.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 Development Manual](https://docs.yoctoproject.org/dev-manual/start.html#preparing-the-build-host)
- NOTE. Instructions depend on which Yocto version you intend to use.
- kas [installed](https://hub.mender.io/t/using-kas-to-reproduce-your-yocto-builds/6020) and in your `PATH`.

## Configuring the build

### Setup Yocto environment

Create a directory for your `mender-nezha` setup to live in and clone the

meta information.

```bash
mkdir mender-nezha && cd mender-nezha

```

Clone the `meta-mender-community` layer:

```bash
git clone https://github.com/mendersoftware/meta-mender-community \
  -b scarthgap

```

## Setup build environment

Change into the cloned repository and create a directory to hold the build:

```bash
cd meta-mender-community
mkdir my-nezha
cd my-nezha

```

Use `kas` to set up the build structure:

```bash
kas shell ../kas/nezha-allwinner-d1.yml

```

This opens a sub-shell which is initialized for the build process. You can close it using the `exit` command.

### 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. To use Hosted Mender, add your tenant token and set the server URL like this:

```auto
MENDER_SERVER_URL = "https://hosted.mender.io"
MENDER_TENANT_TOKEN = "<copy token here>"

```

To get your tenant token:

- log in to [https://hosted.mender.io](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

### Building the image

You can now proceed with building an image:

```bash
bitbake core-image-base

```

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

### Using the build output

After a successful build, the relevant images and build artifacts are:

- `tmp/deploy/images/nezha-allwinner-d1/core-image-base-nezha-allwinner-d1.sdimg`
- `tmp/deploy/images/nezha-allwinner-d1/core-image-base-nezha-allwinner-d1.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/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).

# References

- The template files that are used by this setup can be found in [mender-mender-community](https://github.com/mendersoftware/meta-mender-community/blob/scarthgap/kas/nezha-allwinner-d1.yml?target=_blank)
- The Mender integration layer for Raspberry Pi boards can be found in [meta-mender-riscv](https://github.com/mendersoftware/meta-mender-community/tree/scarthgap/meta-mender-riscv?target=_blank).
- 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!_
