Building Custom Images

This page shows the development workflow for the OpenNMC Buildroot tree.

The referenced branches are:

  • https://gitlab.com/netcube-systems-austria/buildroot/-/tree/2026.02.x-opennmc?ref_type=heads
  • https://gitlab.com/netcube-systems-austria/opennmc/service/-/tree/master?ref_type=heads

These branch names can change over time. Check the current default branch in each repository before cloning if you want the latest supported sources.

The board defconfig is:

  • configs/netcube_dobermann_defconfig

Prerequisites

You need a Linux host with the usual Buildroot dependencies installed.

sudo apt update
sudo apt install -y \
  sed make binutils build-essential diffutils gcc g++ bash patch \
  gzip bzip2 perl tar cpio unzip rsync file bc findutils wget git

You also need the OpenNMC service repository checked out next to the Buildroot tree. Its Buildroot external tree provides the opennmc-web and opennmc-service packages.

Local builds now require you to generate your own certificates and key material. From the repository root, run:

board/netcube/dobermann/cert/create-certificates.sh

This creates the board-specific certs used for local development. Production and development still use separate keypairs.

Clone The Trees

git clone https://gitlab.com/netcube-systems-austria/buildroot.git buildroot-netcube
cd buildroot-netcube
git checkout 2026.02.x-opennmc

Clone the service repository as well:

git clone https://gitlab.com/netcube-systems-austria/opennmc/service.git service
cd service
git checkout master

The examples below assume this directory layout:

  • ../buildroot-netcube
  • ../service

Configure OpenNMC

Use the external tree from service when configuring the build:

export BR2_EXTERNAL=../service/buildroot-external
make netcube_dobermann_defconfig

This selects the OpenNMC product configuration for the PCB codename dobermann.

Build

make

The result is the full image set for the eMMC layout, including the boot partition and the dual root filesystem scheme.

Resulting Layout

The current layout is:

  • boot.vfat
  • emmc.img
  • update.raucb
  • update-blonly.raucb
  • update-factory.raucb
  • install-sdcard.img
  • rootfs.ext4 for rootA
  • rootfs.ext4 for rootB

userdata is created on first boot and is not part of the normal update slots. The SD-card installer image is only needed for recovery or factory flashing.

Customize The Build

If you need to change packages or kernel options:

make menuconfig

Then rebuild with:

make

Notes

  • OpenNMC uses Buildroot Linux rather than a general-purpose distro.
  • The system image includes the OpenNMC web application, the NUT stack, the NUT proxy service, and the service repo packages from service/buildroot-external.
  • The ESP32 provisioning flow may run on first boot if the module is not already fused and flashed.
  • ESP32 re-provisioning uses the same factory-flash script with --force.
  • The U-Boot source is pulled from https://github.com/libschmudie-so/u-boot-nagami.git on the next branch.
  • The board tree includes board/netcube/dobermann/dts/sun8i-t113s-netcube-dobermann.dts.
  • The shipping image is built from the Buildroot tree plus the OpenNMC board files under board/netcube/dobermann and the package integration from service/buildroot-external.
  • The update image built here is using the development keyring. If your board is using the production keyring you'll need to switch trains first.