Repository navigation
How to Compile firmware
This page describes how to build the ThirdReality LinuxBox / HubV3 firmware from source.
The project is a fork of the Armbian build framework with ThirdReality board support, patches and packages added on top. Two build lines are maintained in parallel:
| Current line | Legacy line | |
|---|---|---|
| Git branch | hubv3-6.6.y |
hubv3 |
| Kernel | 6.6.120 (mainline stable) | 5.10.x (mainline stable) |
| Armbian framework | 24.11 | 22.11 |
| Userspace | Debian 12 bookworm
|
Debian 12 bookworm
|
| Build entry point | make-armbian-build-release.sh |
make_armbian_for_hubv3.sh |
| Latest release | v2.14.01.50 | v1.14.01.21 |
| Status | actively developed, use this for new work | maintenance only |
Each line has a single build script that does everything — dependency setup, kernel and U-Boot compilation, rootfs creation and the final conversion to a flashable Amlogic burn image. Use the script; the individual framework steps are not supported as a standalone procedure.
Board naming: the current line uses the public name
hubv3, the legacy line uses the internal Armbian nametrhubv3. They refer to the same hardware.
Both lines build on the same class of host:
- x86_64 machine, bare metal or a full VM (aarch64 also works)
- Debian 12 or Ubuntu 22.04 (jammy) — other distributions are not tested
- 4 GB RAM minimum, 8 GB recommended
- At least 40 GB of free disk space (kernel worktree + rootfs cache + images)
- Root access (
sudoor a root shell) - Working internet access to
github.com,git.kernel.organd the Debian mirrors
Install the minimum tooling; the framework installs the rest of its dependencies on first run:
sudo apt-get update
sudo apt-get install -y git zip device-tree-compiler build-essential \
qemu-user-static binfmt-support rsync python3 python3-venvWSL is not supported. The build runs natively on the host and needs loop devices and
binfmt_miscfor arm64 emulation; use bare metal or a full virtual machine instead.
git clone git@github.com:thirdreality/LinuxBox.git
cd LinuxBoxTypical clone output:
Cloning into 'LinuxBox'...
remote: Enumerating objects: 84723, done.
remote: Total 84723 (delta 0), reused 0 (delta 0), pack-reused 84723 (from 1)
Receiving objects: 100% (84723/84723), 497.58 MiB | 1.13 MiB/s, done.
Resolving deltas: 100% (56121/56121), done.
Updating files: 100% (11012/11012), done.
Then check out the branch you want to build:
# current line (kernel 6.6)
git checkout hubv3-6.6.y
# or the legacy line (kernel 5.10)
git checkout hubv3To build a released version exactly as it was shipped, check out its tag instead:
git checkout v2.14.01.50If git refuses to use your SSH key, point it at the key explicitly:
git config --global core.sshCommand "ssh -i /home/<user>/.ssh/id_rsa"Large clones over a slow link may also need:
git config --global http.version HTTP/1.1
git config --global http.postBuffer 524288000make-armbian-build-release.sh is the release build script. It prepares userpatches/
from vendor.repo/, runs the Armbian build, then converts the resulting .img into an
Amlogic burn image ready for flashing.
sudo ./make-armbian-build-release.sh -b hubv3 -d us -r v2.14.01.50Options:
| Option | Values | Meaning |
|---|---|---|
-b |
hubv3 |
target board (default, and the only board you normally need) |
-d |
us, kr, cn
|
destination; cn selects the China download mirror |
-r |
e.g. v2.14.01.50
|
ThirdReality release version stamped into the image |
-h |
– | print usage |
The version passed to -r is also converted into a numeric VERSION_ID
(major*1000000 + minor*10000 + patch*100 + build) which ends up in /etc/os-release
on the device, so keep the four-field vX.Y.ZZ.NN format.
Startup output looks like this:
[HUBV3] INFO: Working directory is '/root/LinuxBox'
[HUBV3] INFO: Board selected: [ hubv3 ]
[HUBV3] INFO: Destination selected: [ ]
[HUBV3] INFO: Release Version selected: [ v2.14.01.50 ]
[HUBV3] INFO: VERSION_ID calculated: [ 2140150 ]
[HUBV3] INFO: Start building ...
What the script does, step by step:
- Removes
userpatches/,output/and.tmp/, then re-createsuserpatches/byrsync-ingvendor.repo/userpatches/into it and writes24.11touserpatches/VERSION. - Cleans stale kernel build state in
cache/sources/linux-kernel-worktree/6.6__meson64__arm64(make clean) and exportsKERNEL_REUSE_LOCAL=yesso the local worktree is reused instead of being re-fetched. - Runs the Armbian build for
BOARD=trhubv3 BRANCH=current RELEASE=bookworm(kernel 6.6.120, U-Boot v2023.10, board familytrhub). - Unpacks the generated
linux-u-boot-*.debto getu-boot.nosd.bin. - Calls
amlogic-tools.repo/convert.shto repack the rootfs image into the eMMC burn image and moves the result intooutput/images/.
The script deletes
userpatches/andoutput/on every run. Keep local customisations invendor.repo/userpatches/(which is tracked in git) and inuserpatches/config-linuxbox-images.conf, not in the generateduserpatches/copy.
The first build takes a long time because the kernel source, toolchain and Debian
packages all have to be downloaded. Subsequent builds reuse cache/ and are much
faster.
git checkout hubv3
sudo ./make_armbian_for_hubv3.sh -b trhubv3 -d us -r v1.14.01.21Options are the same as above, except that this branch expects the internal board name
trhubv3 for -b.
Example log:
** Board selected: [ trhubv3 ]
** Destination selected: [ ]
** R3 Version selected: [ v1.14.01.21 ]
** VERSION_ID calculated: [ 1140121 ]
[ o.k. ] This script will try to update
[ o.k. ] Using config file [ /root/LinuxBox/userpatches/config-hubv3-images.conf ]
On this branch the per-image configuration lives in custom/ and is copied into
userpatches/ by the script (config-hubv3-images.conf, customize-image.sh,
bl706_cache). The script also handles the burn-image conversion using the in-tree
converter under tools/Armbian_Convert, and renames the result from *.burn.img to
*.<version>.img.
output/images/thirdreality_hubv3_armbian_24.11_bookworm_6.6.120_v2.14.01.50.burn.img.zip
output/images/<board>/archive/*.img # raw Armbian rootfs image
output/debs/ # kernel, headers, u-boot, bsp packages
output/logs/ # build logs
output/images/*.burn.image # or *.<version>.img after renaming
output/debs/
output/logs/
The *.burn.img* file is the one you flash to the device.
The burn image is flashed with the Amlogic USB Burning Tool, which is a Windows-only utility provided by Amlogic. There is no Linux or macOS equivalent, so even if you build on Linux you need a Windows machine (or a Windows VM with USB passthrough) to flash the result.
Step-by-step instructions: How to burn the image to LinuxBox
"<path>" contains whitespace. Not supported. Aborting.
Move the checkout to a path without spaces.
Build fails with "no space left on device" The build needs ~40 GB. Clean intermediate state and retry:
rm -rf .tmp output/logs output/info output/packages-hashed
sudo rm -rf cache/rootfs/* # rootfs tarballs, safe to regenerateKernel rebuild picks up stale objects
cd cache/sources/linux-kernel-worktree/6.6__meson64__arm64 && make cleanarm64 chroot commands fail / Exec format error
QEMU user emulation is not registered:
sudo apt-get install --reinstall -y qemu-user-static binfmt-support
sudo systemctl restart systemd-binfmt.service
cat /proc/sys/fs/binfmt_misc/qemu-aarch64 # should existapt / DNS failures inside the chroot Force IPv4 and add retries on the host, then rebuild:
sudo tee /etc/apt/apt.conf.d/99force-ipv4 <<'EOF'
Acquire::ForceIPv4 "true";
Acquire::Retries "5";
EOFOn the legacy line you can also pass MANAGE_ACNG=no to bypass apt-cacher-ng.
Cannot locate built .img under output/images/*
The branding (VENDOR) changes the image filename, so it no longer contains
"Armbian". Look under output/images/<board>/archive/ for the real artifact.
Slow or failing downloads in mainland China
Pass -d cn to the build script to select the China download mirror.
If you do not want to build yourself:
- Current line — Release v2.14.01.50 (direct download)
- Legacy line — linuxbox-image-5.10.247.v1.14.01.21.img
All releases: https://github.com/thirdreality/LinuxBox/releases
- Armbian Developer Guide
- Armbian build commands and build switches
- Armbian user configuration (how to add packages, patches and override source configs)