Raspberry Pi 3 Model B/B+ 32bit

The official Mender documentation 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.

URL: https://www.raspberrypi.org/products/raspberry-pi-3-model-b/
URL: https://www.raspberrypi.org/products/raspberry-pi-3-model-b-plus/
Wiki: https://elinux.org/RPi_Hub

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 has been verified.

Getting started

Prerequisites

  • A supported Linux distribution and dependencies installed on your workstation/laptop as described in the Buildroot Manual
    • 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:

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

Clone or download buildroot:

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

Clone this repository:

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

Change directory to buildroot:

cd buildroot

copy all files from buildroot-mender-configs:

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:

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

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

Build for Mender demo server:

ServerURL = "192.168.0.100"

Building the image

You can now proceed with building an image:

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

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

make

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

1 Like