Skip to main content

Build balenaOS for reComputer R1000

What is balena?

balena is an Internet of Things (IoT) platform designed to help developers build, deploy, and manage IoT applications across a fleet of devices. It supports a wide range of device architectures and includes features for containerized application deployment, making it possible to easily update your IoT software and HostOS, fix bugs and introduce new features on your IoT applications. balena provides a unified way to push code updates, manage device configurations and ensure devices run reliably and securely in the field, regardless of their location or network conditions.

This tutorial will show you how to compile, configure and burn balenaOS for R1000.

pir

Getting Start

Before you start this project, you may need to prepare your hardware and software in advance as described here.

Hardware Preparation

reComputer R1000

Software

Hardware Configuration

Step 1: You need to set the switch on the side of the R1000 to boot mode, then power on the device

Switch PositionModeDescriptionnRPI-BOOT
imageNormal modeBoot from eMMCLow
imageFlash modeBoot from USBHigh

Step 2: Please use a USB Type-c cable to connect reComputer R1000 to your computer.

pir

Compile R1000-balenaOS

Step 1: Download the following libraries and ensure that the current environment supports compiling the yocto project

 sudo apt install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 python3-subunit zstd liblz4-tool file locales libacl1 jq nodejs npm
sudo locale-gen en_US.UTF-8

Step 2: Enter the following instructions to download and configure balena-seeed-cm4, and finally compile the yocto project.

  git clone https://github.com/Seeed-Studio/balena-seeed-cm4.git
cd balena-seeed-cm4
git submodule update --init --recursive
./balena-yocto-scripts/build/barys --dry-run
source layers/poky/oe-init-build-env
MACHINE=seeed-recomputer-r100x bitbake balena-image
pir

Step 3: The compiled image is named balena-image-seeed-recomputer-r100x.balenaos-img and is in the build/tmp/deploy/images/seeed-recomputer-r100x directory. At this point, the image is Compilation is complete, the next step is to configure it.

note

The default balenaOS version of this warehouse is 5.3.27+rev1. The version information is located in the VERSION file. If you need to compile other versions of balenaOS, please change the content in the VERSION file.

Configure R1000-balenaOS

Step 1: Enter the directory where the compiled image is located, then enter the command line interface, enter balena login, and log in to balena Cloud.

pir

Step 2: Create a new Fleet, select the type as Raspberry Pi 4 (using 64bit os)

pir

Step 3: Enter the following command to preload the image

  balena preload ./balena-image-seeed-recomputer-r100x.balenaos-img --fleet [fleet name]
pir

Step 4: Register the new device with Fleet and generate a device ID

balena device register [fleet name]
pir

Step 5: Generate configuration file.

balena config generate --device [uuid] --version 3.0.15+atsss --dev -o config.json
pir

Step 6: Load the configuration file.

balena os configure balena-image-seeed-recomputer-r100x.balenaos-img --config config.json  --device [uuid] --version 3.0.15+atsss --dev
pir

Step 7: Copy the final image file,this image can be burned into reComputer R1000

cp balena-image-seeed-recomputer-r100x.balenaos-img recomputer_balenaos-dev.img
pir

Steps for Flashing balena OS

Step 1: Open the rpiboot software, and then the system will show the new disk

Step 2: Open the flash tool balenaEtcher, select the balena image file, then select the target disk, and finally click Burn.

pir

Step 3: After the burning is completed, restart the R1000. After a while, you will see the new device successfully online on the balena Cloud.

pir

Tech Support & Product Discussion

Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.

Loading Comments...