ROCKPro64 Armbian

Board description

The ROCKPro64 is the most powerful single board computer on offer from PINE64, featuring a Rockchip RK3399 hexa-core SOC as well as a quad-core Mali-T860MP4 and up-to 4GB of dual-channel LPDDR4 system memory. Moreover, the board comes packed with features, including an USB 3.0 and USB type C with DP1.2 port, a full PCIe x4 as well as eMMC module socket. You also get a 40pin header with I2C, SPI, UARTs and GPIOs. The board is backwards compatible with many of the existing PINE64 peripherals, including the Wifi/BT module, camera module and LCD panel but an array of new peripherals specific for the board is also available. All this in the exact same model “A” dimension as the original PINE A64.

The ROCKPro64 4GB board is designated as LTS (long Term Supply) which means that PINE64 is committed to supply it for at least 5 years – until year 2023 and beyond.

URL: https://www.pine64.org/rockpro64/
Wiki: https://wiki.pine64.org/index.php/ROCKPro64_Main_Page

Test results

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

Armbian Build Runtime
Armbian_5.67_Rockpro64_Debian_stretch_default_4.4.166 :test_works: :test_works:

NOTE! The current integration has only be tested booting from an eMMC. To support SD boot, additional adjustment might be necessary.

Build Means that the image generation completes without errors and outputs images.
Runtime Means that Mender has been verified to work on the board.

Getting started

Prerequisites

  • A Linux-based laptop/workstation (Ubuntu has been verified to work)
  • You need to install Docker Engine to use this tutorial
  • You need to install the following additional packages:
    sudo apt-get install qemu-user-static git p7zip-full

Build Docker image for mender-convert

Open a terminal and clone the mender-convert repository, e.g.

git clone https://github.com/mirzak/mender-convert -b v2

Enter your mender-convert environment:

cd mender-convert

There is a utility script which can be used to generate the appropriate docker image to run mender-convert:

./docker-build

This will create a container image you can use to run mender-convert.

Download the latest stable raw disk image

Download the raw disk image into a subdirectory input:

mkdir -p input && cd input
wget https://dl.armbian.com/rockpro64/archive/Armbian_5.91_Rockpro64_Debian_buster_default_4.4.184.7z
7za e Armbian_5.91_Rockpro64_Debian_buster_default_4.4.184.7z
cd ..

Add a custom Mender client configured for Hosted Mender

A utility script is provided that will generate a Mender configuration file to point the Mender client to your Hosted Mender account.

You can setup the configuration file by running:

./scripts/bootstrap-rootfs-overlay-demo.sh --tenant-token "<INSERT-TOKEN-FROM Hosted Mender>"

Note. You can get your Hosted Mender tenant token at the My organization page in Hosted Mender.

If you are using a different server type, you can run the bootstrap-rootfs-overlay-demo.sh script without any arguments to create a mender.conf file that you can edit to your liking prior to starting the conversion process.

Convert the Armbian ROCKPro64 disk image to support Mender

With the raw disk image and the container configured above, we can convert the image.

Run mender-convert inside the container by running:

MENDER_ARTIFACT_NAME=release-1 ./docker-mender-convert \
    --config configs/rockpro64_sd_config \
    --overlay rootfs_overlay_demo/ \
    --disk-image input/Armbian_5.91_Rockpro64_Debian_buster_default_4.4.184.img

Conversion will take 10-15 minutes, depending on your storage and resources available.

Use the output images

After a successful conversion, the images and artifacts are:

  • deploy/rockpro64-release-1.sdimg
  • deploy/rockpro64-release-1.ext4
  • delpoy/rockpro64-release-1.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 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 from this conversion, you should use the Mender Artifact files, which have .mender suffix. You can either deploy this Artifact in managed mode with the Mender server as described in Deploy to physical devices or by using the Mender client only in Standalone deployments.

Boot from the SD card and connect to your Mender server

Ensure your device has Internet connectivity (e.g. through Ethernet cable with DHCP support). After provisioning a SD card with the converted disk image (.sdimg) above, boot your device from it.

After about 10 minutes, you should see your device Pending authorization under the Devices tab in your Mender server. Authorize your device to join your Mender server.

You can now deploy software updates to your ROCKPro64 using the Mender server!

An improved workflow to generate Artifacts

When working with real deployments the recommended workflow is to have one golden device, that has not been converted to support Mender. On this device you carry out all the modifications you need, and then use the resulting SD card to create Mender Artifact files, in summary:

  • flash vanilla Armbian to the SD card
  • boot the SD card, log in and make any modifications needed
  • copy the SD card into an image on your workstation (e.g. using dd)
  • run mender-convert with the from-raw-disk-image option to generate a Mender Artifact (like above)
  • upload the Artifact to your Mender server
  • deploy it to your devices

Note that your golden device or SD card is not running Mender and is not modified during deployments. It is simply the “source” for generating the Artifacts that you deploy to the devices in the field.

References

  • The documentation on Building a Mender Debian image contains more information about using Mender with the Debian family of distributions.

  • The official Mender documentation explains how Mender works. This is simply a board-specific complement to the official documentation.

1 Like