# Raspberry Pi 3 Model B/B+

**URL:** https://hub.mender.io/t/raspberry-pi-3-model-b-b/57
**Category:** Yocto Project
**Tags:** yocto, raspberry-pi, sumo, rocko, thud, warrior
**Created:** [September 28, 2018, 1:07pm UTC](https://hub.mender.io/t/raspberry-pi-3-model-b-b/57 "2018-09-28T13:07:59Z")
**Posts on this page:** 15
**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: [September 28, 2018, 1:07pm UTC](https://hub.mender.io/t/raspberry-pi-3-model-b-b/57/1 "2018-09-28T13:07:59Z")

</div>

# Board description

The Raspberry Pi 3 Model B/B+ is a popular single board computer based on Broadcom SoCs. It is the most powerful board within the Raspberry Pi family and probably the most popular with “makers”.

 ![770A5842-462x322](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/c870116a18648951ba6e43fdde2312805dba6d8e.jpeg)

URL: [https://www.raspberrypi.org/products/raspberry-pi-3-model-b-plus](https://www.raspberrypi.org/products/raspberry-pi-3-model-b-plus?target=_blank)  
URL: [https://www.raspberrypi.org/products/raspberry-pi-3-model-b](https://www.raspberrypi.org/products/raspberry-pi-3-model-b?target=_blank)  
Wiki: [https://elinux.org/RPi\_Hub](https://elinux.org/RPi_Hub?target=_blank)

# Test results

Raspberry Pi 3 is one of the official reference devices of Mender and is easy to get started with. This device is continuously tested as part of Mender testing pipelines which assures high quality of the integration.

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 |
| --- | --- | --- |
| dunfell (3.1) | :test_works: | :test_works: [1](#footnote2) |
| 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: |
| rocko (2.4) | :test_works: | :test_works: |

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

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

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

```bash
# set to your branch, make sure it is supported (see table above)
export BRANCH="dunfell"  

```

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

```bash
mkdir mender-raspberrypi && cd mender-raspberrypi

```

Initialize repo manifest:

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

```

Fetch layers in manifest:

```bash
repo sync

```

## Setup build environment

Initialize the build environment:

```bash
source setup-environment raspberrypi

```

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

```bash
MACHINE=raspberrypi3 bitbake core-image-base

```

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

### Using the build output

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

- `tmp/deploy/images/raspberrypi3/core-image-base-raspberrypi3.sdimg`
- `tmp/deploy/images/raspberrypi3/core-image-base-raspberrypi3.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/tree/sumo/meta-mender-raspberrypi?target=_blank)

- The Mender integration layer for Raspberry Pi boards can be found in [meta-mender](https://github.com/mendersoftware/meta-mender/tree/master/meta-mender-raspberrypi?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.

# 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/mmcbl0p1`) 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:19am UTC](https://hub.mender.io/t/raspberry-pi-3-model-b-b/57/2 "2019-08-15T08:19:56Z")

</div>

3 posts were split to a new topic: [Not able to login on Yocto image](https://hub.mender.io/t/not-able-to-login-on-yocto-image/926)

---

<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: [February 5, 2019, 12:04pm UTC](https://hub.mender.io/t/raspberry-pi-3-model-b-b/57/5 "2019-02-05T12:04:28Z")

</div>

4 posts were split to a new topic: [Startup script for raspberrypi3 using yocto?](https://hub.mender.io/t/startup-script-for-raspberrypi3-using-yocto/201)

---

<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: [May 7, 2019, 1:52pm UTC](https://hub.mender.io/t/raspberry-pi-3-model-b-b/57/11 "2019-05-07T13:52:39Z")

</div>

24 posts were split to a new topic: [Issues with Raspberry Pi 3](https://hub.mender.io/t/issues-with-raspberry-pi-3/532)

---

<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: [May 7, 2019, 1:56pm UTC](https://hub.mender.io/t/raspberry-pi-3-model-b-b/57/12 "2019-05-07T13:56:06Z")

</div>

A post was merged into an existing topic: [Issues with Raspberry Pi 3](https://hub.mender.io/t/issues-with-raspberry-pi-3/532/26)

---

<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: [June 17, 2019, 6:55am UTC](https://hub.mender.io/t/raspberry-pi-3-model-b-b/57/14 "2019-06-17T06:55:20Z")

</div>

5 posts were merged into an existing topic: [Issues with Raspberry Pi when updating rocko -\> thud](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712/14)

---

<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: [June 17, 2019, 6:54am UTC](https://hub.mender.io/t/raspberry-pi-3-model-b-b/57/20 "2019-06-17T06:54:36Z")

</div>

13 posts were split to a new topic: [Issues with Raspberry Pi when updating rocko -\> thud](https://hub.mender.io/t/issues-with-raspberry-pi-when-updating-rocko-thud/712)

---

<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: [June 24, 2019, 9:16am UTC](https://hub.mender.io/t/raspberry-pi-3-model-b-b/57/21 "2019-06-24T09:16:27Z")

</div>

A post was split to a new topic: [How can I edit the mender artifact, which I’ve built with mender](https://hub.mender.io/t/how-can-i-edit-the-mender-artifact-which-i-ve-built-with-mender/741)

---

<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 11, 2019, 6:24am UTC](https://hub.mender.io/t/raspberry-pi-3-model-b-b/57/22 "2019-10-11T06:24:58Z")

</div>

4 posts were split to a new topic: [Raspberry Pi 3 build fails on warrior](https://hub.mender.io/t/raspberry-pi-3-build-fails-on-warrior/1140)

---

<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 11, 2019, 6:24am UTC](https://hub.mender.io/t/raspberry-pi-3-model-b-b/57/26 "2019-10-11T06:24:10Z")

</div>

2 posts were split to a new topic: [Missing /data/mender/mender.conf when upgrading to warrior](https://hub.mender.io/t/missing-data-mender-mender-conf-when-upgrading-to-warrior/1139)

---

<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 11, 2019, 6:25am UTC](https://hub.mender.io/t/raspberry-pi-3-model-b-b/57/28 "2019-10-11T06:25:53Z")

</div>

3 posts were split to a new topic: [Running Yocto build in containers gives “permission denied” error](https://hub.mender.io/t/running-yocto-build-in-containers-gives-permission-denied-error/1141)

---

<div class="post-metadata">

### Author: ![abartky](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/abartky/32/1610_2.png) [@abartky](https://hub.mender.io/u/abartky)
#### Post date: [May 13, 2022, 8:58pm UTC](https://hub.mender.io/t/raspberry-pi-3-model-b-b/57/29 "2022-05-13T20:58:24Z")

</div>

I know this is a “how to get started”, but it might be worth adding when building the Yocto for Mender, you should also put in a unique release name. Otherwise, you’ll get multiple .mender files that that show up as the template text of “release-1” as you do more builds.

Here is what I did in my setup, I use what I’m building plus the date and time.

```auto
# The name of the disk image and Artifact that will be built.
# This is what the device will report that it is running, and different updates
# must have different names because Mender will skip installation of an Artifact
# if it is already installed.
MENDER_ARTIFACT_NAME = "rpi3-20220512-1956"

```

---

<div class="post-metadata">

### Author: ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)
#### Post date: [May 23, 2022, 12:51pm UTC](https://hub.mender.io/t/raspberry-pi-3-model-b-b/57/30 "2022-05-23T12:51:31Z")

</div>

@abartky I agree! Good idea, I’ll add it 🙂

---

<div class="post-metadata">

### Author: ![electricworry](https://avatars.discourse-cdn.com/v4/letter/e/cab0a1/32.png) [@electricworry](https://hub.mender.io/u/electricworry)
#### Post date: [June 10, 2023, 1:04pm UTC](https://hub.mender.io/t/raspberry-pi-3-model-b-b/57/31 "2023-06-10T13:04:57Z")

</div>

I’m using kirkstone and I’m just getting started with Mender on RaspberryPi 3 Model B, and I’ve run into a problem that the device will not boot when meta-mender-raspberrypi is added and ENABLE\_UART=“1” is NOT set. It boots fine if ENABLE\_UART=“1” is added.

AFAIK, the only change this mades to the boot partition is to add `console=serial0,115200` to the cmdline.txt and `enable_uart=1` to config.txt.

I’ve started going down a [rabbit hole](https://github.com/raspberrypi/firmware/issues/1483) of suggestions. It sounds like Mender’s changes to u-boot may have regressed it such that it balks at the DTB when UART is not enabled, but this is way over my head.

Any suggestions? I can progress with learning for now with UART enabled but at some point I’d like to be able to turn it off.

---

<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: [July 18, 2023, 9:53am UTC](https://hub.mender.io/t/raspberry-pi-3-model-b-b/57/32 "2023-07-18T09:53:52Z")

</div>

2 posts were split to a new topic: [Using autoboot.txt on Raspberry Pi](https://hub.mender.io/t/using-autoboot-txt-on-raspberry-pi/6012)
