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

Build Docker image for mender-convert

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

git clone -b 2.0.x https://github.com/mendersoftware/mender-convert

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

Convert the Armbian ROCKPro64 disk image to support Mender

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

Configure the Mender client for hosted Mender server:

./scripts/bootstrap-rootfs-overlay-hosted-server.sh \
    --output-dir ${PWD}/rootfs_overlay_demo \
    --tenant-token "Paste token from Mender Professional"

There are additional scripts in the scripts/ directory to configure with a local demo server, or production server.

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 \
    --disk-image input/Armbian_5.91_Rockpro64_Debian_buster_default_4.4.184.img \
    --config configs/rockpro64_sd_config \
    --overlay ${PWD}/rootfs_overlay_demo

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
  • deploy/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 (upload it under Releases in the server UI) 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

Hi Mirzak,

I’ve tried to run mender-convert for the RockPro64, but it seems the u-boot pre-generated binary is missing:
Running mender-convert-modify: --disk-image input/Armbian_19.11.4_Rockpro64_buster_legacy_4.4.198.img --config configs/rockpro64_sd_config --overlay /home/yannick/mender-convert/rootfs_overlay_demo/ 2020-04-01 22:50:34 [INFO] [mender-convert-modify] Using configuration file: configs/mender_convert_config 2020-04-01 22:50:34 [INFO] [mender-convert-modify] Using configuration file: configs/rockpro64_sd_config 2020-04-01 22:50:46 [INFO] [mender-convert-modify] Installing Mender client and related files 2020-04-01 22:50:47 [INFO] [mender-convert-modify] Installing a custom /etc/fstab (see work/convert.log for more info) 2020-04-01 22:50:47 [INFO] [mender-convert-modify] Performing platform specific modifications (if any) 2020-04-01 22:50:47 [INFO] [mender-convert-modify] Running hook: platform_modify 2020-04-01 22:50:47 [INFO] [mender-convert-modify] Trying to fetch binaries from https://d1b0l86ne08fsf.cloudfront.net/mender-convert/uboot/rockpro64/rockpro64_sd-2017.09.tar.gz mender-convert-modify has finished. Cleaning up... yannick@lokemy:~/mender-convert$ wget https://d1b0l86ne08fsf.cloudfront.net/mender-convert/uboot/rockpro64/rockpro64_sd-2017.09.tar.gz --2020-04-01 22:51:13-- https://d1b0l86ne08fsf.cloudfront.net/mender-convert/uboot/rockpro64/rockpro64_sd-2017.09.tar.gz Resolving d1b0l86ne08fsf.cloudfront.net (d1b0l86ne08fsf.cloudfront.net)... 2600:9000:21d7:2e00:17:e5ba:7bc0:21, 2600:9000:21d7:800:17:e5ba:7bc0:21, 2600:9000:21d7:9a00:17:e5ba:7bc0:21, ... Connecting to d1b0l86ne08fsf.cloudfront.net (d1b0l86ne08fsf.cloudfront.net)|2600:9000:21d7:2e00:17:e5ba:7bc0:21|:443... connected. HTTP request sent, awaiting response... 403 Forbidden 2020-04-01 22:51:13 ERROR 403: Forbidden.

Also - I wanted to regenerate the missing files, but I cannot find the configuration for RockPro64 in


Is it in another repo?

Thanks,
Yannick

Could you please try again? The files are there but for some reason where marked as private, I have made them public now.

1 Like