# Raspberry Pi 3 Model B/B+ 32bit

**URL:** <https://hub.mender.io/t/raspberry-pi-3-model-b-b-32bit/1580>\
**Category:** Buildroot\
**Created:** [February 25, 2020, 7:11pm UTC](https://hub.mender.io/t/raspberry-pi-3-model-b-b-32bit/1580 "2020-02-25T19:11:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aduskett](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@aduskett](https://hub.mender.io/u/aduskett)\
**Post date:** [February 25, 2020, 7:11pm UTC](https://hub.mender.io/t/raspberry-pi-3-model-b-b-32bit/1580/1 "2020-02-25T19:11:41Z")

</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 3 Model B/B+ is the third generation of the Raspberry Pi family.

![](https://www.raspberrypi.org/homepage-9df4b/static/8ca4b04c6593a114ae562d25b6161d94/052d8/8c67a3e02f41441dae98f8b91c792c1e1b4afef1_770a5842.jpg)

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

# Test results

The Buildroot releases in the table below have been tested by the Mender community. Please update it if you have tested this integration on other releases:

| Buildroot Project | Build | Runtime |
| --- | --- | --- |
| 2019.11.1 | :test_works: | :test_works: |

**Build** Means that the Buildroot 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/devices/yocto-project/bootloader-support/u-boot/integration-checklistt?target=_blank) has been verified.

# Getting started

## Prerequisites

- A supported Linux distribution and dependencies installed on your workstation/laptop as described in the [Buildroot Manual](https://buildroot.org/downloads/manual/manual.html#requirement)
  - NOTE. Instructions depend on which Buildroot version you intend to use.

## Configuring the build

### Setup Buildroot environment

Set the Buildroot tag you are building for:

```auto
# set to your branch, make sure it is supported (see table above)
export BR2_TAG="2019.11.1"

```

Clone or download buildroot:

```auto
git clone git://git.buildroot.net/buildroot -b ${BR2_TAG}

```

Clone this repository:

```auto
git clone https://github.com/aduskett/buildroot-mender-configs.git -b rpi3_32

```

Change directory to buildroot:

```auto
cd buildroot

```

copy all files from buildroot-mender-configs:

```auto
cp -rf ../buildroot-mender-configs/* ./

```

## Configure build environment

Configure Buildroot:  
There are three configuration files pre-setup depending on the type of init system you plan to use:

- raspberrypi3\_32\_mender\_initd\_defconfig
- raspberrypi3\_32\_mender\_openrc\_defconfig
- raspberrypi3\_32\_mender\_systemd\_defconfig

Choose one and run `make ` and then the defconfig you chose. IE:

```auto
make raspberrypi3_32_mender_systemd_defconfig

```

### 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/architecture/standalone-deployments?target=_blank), due to lack of server configuration.

You can edit the `board/mender/overlay/etc/mender/mender.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.

Build for Hosted Mender:

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

```

Build for Mender demo server:

```auto
ServerURL = "192.168.0.100"

```

### Building the image

You can now proceed with building an image:

```auto
make

```

### Using the build output

After a successful build, the images and build artifacts are placed in `output/images`

The disk image sdcard.img 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/artifacts/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/architecture/mender-artifacts?target=_blank) 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 only in [Standalone deployments](https://docs.mender.io/architecture/standalone-deployments?target=_blank).

### Created a mender artifact

In the root buildroot directory, type `make menuconfig` and go to `System configuration`  
At the bottom of the screen is the field: Extra arguments passed to custom scripts  
Change `--generate-mender-image=false` to `--generate-mender-image=true`

You may wish to change `--build-version=2019.11.1` to a version that best suits your particular needs, as this option changes the mender version information.

Then re-run

```auto
make

```

The mender file will automatically be generated after the build is complete, which can be found in `output/images/`
