# Raspberry Pi 0 Wifi

**URL:** <https://hub.mender.io/t/raspberry-pi-0-wifi/78>\
**Category:** Yocto Project\
**Tags:** yocto, sumo, raspberry-pi-zero-wifi\
**Created:** [October 3, 2018, 9:25am UTC](https://hub.mender.io/t/raspberry-pi-0-wifi/78 "2018-10-03T09:25:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)\
**Post date:** [October 3, 2018, 9:25am UTC](https://hub.mender.io/t/raspberry-pi-0-wifi/78/1 "2018-10-03T09:25:42Z")

</div>

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

# Board description

The Raspberry Pi Zero W comes with added wireless LAN and Bluetooth connectivity compared to Raspberry Pi Zero.

 ![](https://yyz2.discourse-cdn.com/flex036/uploads/mender/original/1X/992a46d7dfefe5fb93abb0e1bf9ca1cdee93c96c.png)

URL: [https://www.raspberrypi.org/products/raspberry-pi-zero-w](https://www.raspberrypi.org/products/raspberry-pi-zero-w)  
Wiki: [Making sure you're not a bot!](https://elinux.org/RPi_Hub)

# 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 (3.0) | :test_works: | :test_works: [1](#footnote2) |
| warrior (2.7) | :test_works: | :test_works: [1](#footnote2) |
| thud (2.6) | :test_works: | :test_works: [1](#footnote2) |
| sumo (2.5) | :test_works: | :test_works: |

1. Disabled GRUB integration for ARM systems which is default in meta-mender/thud. U-boot is still primary integration method for this platform.

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

```

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

```auto
mkdir mender-raspberrypi && cd mender-raspberrypi

```

Initialize repo manifest:

```auto
repo init -u https://github.com/mendersoftware/meta-mender-community \
           -m meta-mender-raspberrypi/scripts/manifest-raspberrypi.xml \
           -b ${BRANCH}

```

Fetch layers in manifest:

```auto
repo sync

```

Next, initialize the build environment:

```bash
source setup-environment raspberrypi

```

### Building the image

You can now proceed with building an image:

```auto
MACHINE=raspberrypi0-wifi bitbake core-image-base

```

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

### Using the build output

- `tmp/deploy/images/raspberrypi0-wifi/core-image-base-raspberrypi0-wifi.sdimg`
- `tmp/deploy/images/raspberrypi0-wifi/core-image-base-raspberrypi0-wifi.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).

# Known issues

## Boot firmware files

See [Updating Raspberry Pi boot firmware files using Yocto Project and Mender](https://hub.mender.io/t/updating-raspberry-pi-boot-firmware-files-using-yocto-project-and-mender/1719).

See this [thread](https://groups.google.com/a/lists.mender.io/d/msg/mender/98PMIMUp8kA/cOvIes1gDAAJ) where the limitations of the boot firmware files on Raspberry Pi are discussed.

## Devicetree is not updated

To be able to support update of Linux kernel and devicetree, Mender requires these to be installed in the `/boot` directory for each rootfs (normally `/dev/mmcblk0p2` and `/dev/mmcblk0p3`). On the other hand, the Raspberry Pi boot firmware requires that the DTB file is in the same partition as the boot firmware (`/dev/mmcblk0p1`) and the config.txt file. For now Mender will not use the DTB that is delivered with new artifacts and will continue to boot with the original DTB that was populated using the `sdimg` file.

## Problem using ‘dtoverlay=pi3-disable-bt’

> `pi3-disable-bt` disables the Bluetooth device and restores UART0/ttyAMA0 to GPIOs 14 and 15. It is also necessary to disable the system service that initialises the modem so it doesn’t use the UART

There is currently a known issue with above functionality, that is to enable `UART0` on PIN 14 and 15.

It is actually not something that is caused by Mender specifically, but Mender requires `U-Boot` to be present to support robust features such as roll-back. `U-Boot` is typically not enabled if you do a stock Raspberry Pi and some people are often surprised that the Bluetooth UART stopped working when they integrate `meta-mender`.

The problem is in `U-Boot` which does conflicting configuration, and there is a workaround reported [here](https://github.com/agherzan/meta-raspberrypi/issues/374) and it has been reported to U-Boot but unclear when/if it will be fixed.

* * *

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

---

<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:** [August 15, 2019, 8:28am UTC](https://hub.mender.io/t/raspberry-pi-0-wifi/78/3 "2019-08-15T08:28:09Z")

</div>

4 posts were split to a new topic: [Repo tool requires git identity to be set](https://hub.mender.io/t/repo-tool-requires-git-identity-to-be-set/932)
