Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

164.12. rnode-firmware-1.86

RNode LoRa radio firmware images, for rnodeconf to flash with no network

Version 1.86, release 2
Shelf hamradio — Amateur-radio operation: rig control, digital modes, logging, packet and APRS, propagation, and mesh radio
Phase 41_system (System), 642 of 1047 in build order
Licence GPL-3.0-only
Homepage https://unsigned.io/rnode_firmware/
Build time 0.2 SBU
Installed size 59.2 MiB in 53 files
Recipe ports/core/hamradio/rnode-firmware/kpkgbuild

About

rnode-firmware is the set of firmware images that RNode LoRa radios run, one per supported board, as upstream publishes them for each release. Nothing in it runs on this machine: the images are code for the radio’s ESP32 or nRF52 processor, one of the exempt classes of What is built from source. They are here so that rnodeconf, from python3-rns, can flash and update an RNode with no network. For an ESP32 board it unpacks the board’s archive and flashes it with the esptool.py packed inside; it flashes an nRF52 by running adafruit-nrfutil, which is why python3-adafruit-nrfutil is a dependency.

Why it is in KDOS

The comment above it in script/phases/41_system/packages.d/hamradio.txt:

An image for the radio, not a program for this machine.

Sources

Dependencies

Depends on: python3-rns, python3-adafruit-nrfutil.

Required by: no port names it.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install rnode-firmware'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/hamradio/rnode-firmware.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/hamradio/rnode-firmware
echo '92e688ae0940f14bc44ced8da7c06814ad1f0a96b859386219bb470962781301  rnode-firmware-1.86.json' | sha256sum -c -
echo '22600e61dc70d68f9c9985fbb2f52a9edf4816f9a0a979aadcde735146b33219  rnode-firmware-console-1.86.bin' | sha256sum -c -
echo 'b6fd5f8d6a21b0d9b49db8092a83b3236d3f317fe8b3c8062a869eaa861f9bf0  rnode-firmware-esp32_generic-1.86.zip' | sha256sum -c -
echo '7b1cc3e37e2fd8def02ce64d4b8474739260f2dd39c00b3dfca53e7608688e11  rnode-firmware-featheresp32-1.86.zip' | sha256sum -c -
echo '7f24e01c76c2fa62393f85fb233fc6e36ef4943b3fe77fe79dacc17f1e5722bc  rnode-firmware-heltec32v2-1.86.zip' | sha256sum -c -
echo '4bfbcb7c82bd37a2369f627f40667e33936b50f19971900d68d39c9e547ae8aa  rnode-firmware-heltec32v3-1.86.zip' | sha256sum -c -
echo '75ed47d6a4259e9d073cda680b7323eda420659e117ca4ce42c119b2c9513805  rnode-firmware-heltec32v4pa-1.86.zip' | sha256sum -c -
echo '49a2d31841d5f7cc678a81d597e2c99b4400041f6ecf26f22ba922e670816a22  rnode-firmware-heltec_t114-1.86.zip' | sha256sum -c -
echo 'ec04cf97d270e45204d933126665493d0c0af52e33d13ab6df02ae1753e15ae6  rnode-firmware-lora32v10-1.86.zip' | sha256sum -c -
echo 'fe3be73232430128dc5587d77040834e25758f024ab713427ff2bcfd7ae9aac2  rnode-firmware-lora32v20-1.86.zip' | sha256sum -c -
echo '571e62d4dbba65b3c76b3714df1c36b208f8d4fcb9f5ac36395a6844075dab1a  rnode-firmware-lora32v20_extled-1.86.zip' | sha256sum -c -
echo 'e51c748169d25d2234a69c1e6a0ea1266fac8dd714de68f8f7b647794016c843  rnode-firmware-lora32v21-1.86.zip' | sha256sum -c -
echo '7d4d90e8e0fea67912bcd6d78e1dab805d9d87f145ab362a4fd7e95698da75d5  rnode-firmware-lora32v21_extled-1.86.zip' | sha256sum -c -
echo 'ccc6c0193cd0fc305be263150f930e28262f916c97415fe88645f8d53db4c56f  rnode-firmware-lora32v21_tcxo-1.86.zip' | sha256sum -c -
echo '289de470ab4ce48d669a282c7fe0685dd5c96af5d8223388136734afb2bdd39f  rnode-firmware-ng20-1.86.zip' | sha256sum -c -
echo '615e934d779fda562211214a6a9f4265ee412d5e6ff35996e0980b7c965b3d90  rnode-firmware-ng21-1.86.zip' | sha256sum -c -
echo '99cae226cca349a1f567f0a6c0c9a0fd4cc9500ec079a631b18b8d4c29e7aa9c  rnode-firmware-rak4631-1.86.zip' | sha256sum -c -
echo 'f9b1199e5593652a3aeb8c16b9f11ae714bf43b2f65bb463577023aec69b5f05  rnode-firmware-t3s3-1.86.zip' | sha256sum -c -
echo '7167f1c15eb27834c1c5abcc5e182d62af15868f8d9ad89feb38b3dbf3b54252  rnode-firmware-t3s3_sx127x-1.86.zip' | sha256sum -c -
echo '0109f505a84cc8a12cf9f2a39b3dfa9a6052ab27bc433b04c526942df4f0d2b5  rnode-firmware-t3s3_sx1280_pa-1.86.zip' | sha256sum -c -
echo 'bf9dd9a73bd69b334a1e7018b9316dc4526306099bb08906a79aec4978b963b6  rnode-firmware-tbeam-1.86.zip' | sha256sum -c -
echo 'ba79e43f1b555e40157ad99505ba096a431fc96f3f903b10901044edc0e8cdfa  rnode-firmware-tbeam_supreme-1.86.zip' | sha256sum -c -
echo '874b45c31717891e405bb36dac69102ab27f6979a7ea6b62ef7133ed9c23fa50  rnode-firmware-tbeam_sx1262-1.86.zip' | sha256sum -c -
echo '3721b3e8616c837e7cde5700cb43034e0931efe51dabe2bcf28a4d8c631af1a5  rnode-firmware-tdeck-1.86.zip' | sha256sum -c -
echo '31824f9202fde735f408a3efdbeaeca31703c61f2f1e4a8dc3517131df89c111  rnode-firmware-techo-1.86.zip' | sha256sum -c -
echo '6c25700fcf891c93c1851f9dbd674290ee52b02e8e7621674df1edd1bf921793  rnode-firmware-xiao_esp32s3-1.86.zip' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/rnode-firmware
SRC=$SRC_ROOT/rnode-firmware-1.86
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
cp rnode-firmware-1.86.json "$SRC"
cp rnode-firmware-console-1.86.bin "$SRC"
cp rnode-firmware-esp32_generic-1.86.zip "$SRC"
cp rnode-firmware-featheresp32-1.86.zip "$SRC"
cp rnode-firmware-heltec32v2-1.86.zip "$SRC"
cp rnode-firmware-heltec32v3-1.86.zip "$SRC"
cp rnode-firmware-heltec32v4pa-1.86.zip "$SRC"
cp rnode-firmware-heltec_t114-1.86.zip "$SRC"
cp rnode-firmware-lora32v10-1.86.zip "$SRC"
cp rnode-firmware-lora32v20-1.86.zip "$SRC"
cp rnode-firmware-lora32v20_extled-1.86.zip "$SRC"
cp rnode-firmware-lora32v21-1.86.zip "$SRC"
cp rnode-firmware-lora32v21_extled-1.86.zip "$SRC"
cp rnode-firmware-lora32v21_tcxo-1.86.zip "$SRC"
cp rnode-firmware-ng20-1.86.zip "$SRC"
cp rnode-firmware-ng21-1.86.zip "$SRC"
cp rnode-firmware-rak4631-1.86.zip "$SRC"
cp rnode-firmware-t3s3-1.86.zip "$SRC"
cp rnode-firmware-t3s3_sx127x-1.86.zip "$SRC"
cp rnode-firmware-t3s3_sx1280_pa-1.86.zip "$SRC"
cp rnode-firmware-tbeam-1.86.zip "$SRC"
cp rnode-firmware-tbeam_supreme-1.86.zip "$SRC"
cp rnode-firmware-tbeam_sx1262-1.86.zip "$SRC"
cp rnode-firmware-tdeck-1.86.zip "$SRC"
cp rnode-firmware-techo-1.86.zip "$SRC"
cp rnode-firmware-xiao_esp32s3-1.86.zip "$SRC"

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the recipe’s helpers _url and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

_dest=$PKG/usr/share/rnode-firmware/$version
install -dm755 "$_dest"
install -m644 "$name-$version.json" "$_dest/release.json"
install -m644 "$name-console-$version.bin" "$_dest/console_image.bin"
for _zip in "$name"-*-"$version".zip; do
	_board=${_zip#"$name"-}
	_board=${_board%-"$version".zip}
	install -m644 "$_zip" "$_dest/rnode_firmware_$_board.zip"
done
python3 - "$_dest" <<'PY'
import json, os, sys
dest = sys.argv[1]
with open(os.path.join(dest, "release.json")) as f:
    release = json.load(f)
for fw, info in release.items():
    if not os.path.exists(os.path.join(dest, fw)):
        continue
    with open(os.path.join(dest, fw + ".version"), "w") as out:
        out.write(f"{info['version']} {info['hash']}")
PY
printf '%s\n' "$version" > "$PKG/usr/share/rnode-firmware/version"

install -d "$PKG/usr/bin"
cat > "$PKG/usr/bin/rnodeconf-local" <<'KDOS_SH'
#!/bin/sh
share=/usr/share/rnode-firmware
read -r ver < "$share/version" || exit 1
cache=$HOME/.config/rnodeconf/update/$ver
mkdir -p "$cache" || exit 1
for f in "$share/$ver"/*; do
	t=$cache/${f##*/}
	case ${f##*/} in
	console_image.bin)
		[ -L "$t" ] && rm -f "$t"
		[ -e "$t" ] || cp "$f" "$t" || exit 1
		;;
	*)
		[ -e "$t" ] || ln -s "$f" "$t"
		;;
	esac
done
exec rnodeconf --nocheck --fw-version "$ver" "$@"
KDOS_SH
chmod 755 "$PKG/usr/bin/rnodeconf-local"
install -Dm644 "$PORT_SRC/LICENSE" "$PKG/usr/share/licenses/$name/LICENSE"

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/rnode-firmware, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf rnode-firmware-1.86-2.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/rnode-firmware, and runs the triggers its paths call for.

Other files in the port directory, read by build.sh: LICENSE.

Contents

Installed programs: rnodeconf-local.

Installed directories: /usr/share/licenses/rnode-firmware, /usr/share/rnode-firmware.

Notes

The images are installed under /usr/share/rnode-firmware/<version>/, under the names rnodeconf asks for (each board’s rnode_firmware_<board>.zip, and console_image.bin), beside the release’s release.json. The recipe saves every download under a name that carries the version, and build.sh gives each file its upstream name back as it installs it. For each image it also writes <file>.version, holding <version> <sha256> as read from release.json, which is the record rnodeconf otherwise writes from the release.json it downloads, so rnodeconf checks each image against the hash upstream published for it. /usr/share/rnode-firmware/version names the version the package carries.

rnodeconf keeps its images in ~/.config/rnodeconf/update/<version>/ and downloads whatever is missing there. rnodeconf-local, the script the port installs, links each packaged file into that directory (links, not copies, so the cache follows the package when it is upgraded), except console_image.bin, which it copies: rnodeconf unpacks an ESP32 board’s archive into that same directory, most archives carry a console_image.bin of their own, and unpacking onto a link would write through it to the root-owned packaged file and fail. It then runs rnodeconf --nocheck --fw-version <version> with the arguments it was given: --nocheck turns off the online check for a newer release, and --fw-version names the packaged version, so flashing and updating reach no network.