Full walkthrough: building box64 on Raspberry Pi CM5 Lite (Debian 13) and running OpenCode Desktop natively on ARM64
A full walkthrough for building box64 on a Raspberry Pi Compute Module 5 Lite and getting OpenCode Desktop running natively on ARM64.
| Component | Detail |
|---|---|
| Board | Raspberry Pi Compute Module 5 Lite Rev 1.0 |
| SoC | BCM2712 — ARM Cortex-A76 (4 cores) |
| RAM | 16 GB LPDDR4X |
| OS | Debian 13 (trixie), aarch64 |
| dpkg architectures | arm64 (native), armhf (foreign) |
sudo apt update
sudo apt install cmake build-essential python3Note:
cmakeis not pre-installed on the minimal Debian image — make sure to include it.
git clone https://github.com/ptitSeb/box64.git ~/box64
cd ~/box64
mkdir build && cd build
cmake .. -D RPI5ARM64=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo
make -j2Important: Use
-j2, not-j4. The CM5 Lite can thermally throttle during sustained compile workloads. Builds with-j4may time out or fail on this board.
sudo make installThis installs:
| Path | Description |
|---|---|
/usr/local/bin/box64 |
Main binary (v0.4.3 at time of writing) |
/usr/local/bin/box64-bash |
box64-aware bash wrapper |
/etc/binfmt.d/box64.conf |
binfmt registration for x86_64 |
/etc/box64.box64rc |
Runtime configuration |
/usr/lib/box64-x86_64-linux-gnu/ |
x86_64 compatibility libraries |
This tells the Linux kernel to use box64 for x86_64 ELF binaries automatically:
sudo systemctl restart systemd-binfmtVerify registration:
cat /proc/sys/fs/binfmt_misc/x86_64# Make the amd64 binary executable
chmod +x ./some-x86_64-binary
./some-x86_64-binarybox64 ./some-x86_64-binaryRust-compiled and Tauri-based GUI applications (e.g., Electron-like desktop apps) may segfault (SIGSEGV) under box64. This is a known limitation — box64's dynarec doesn't fully handle the complex runtime these frameworks produce.
If a native ARM64 build exists, prefer that instead.
OpenCode Desktop provides a native ARM64 .deb, so box64 isn't needed for this app.
# Download the ARM64 build
wget https://github.com/anomalyco/opencode/releases/download/v1.14.30/opencode-desktop-linux-arm64.deb
# Install
sudo apt install ./opencode-desktop-linux-arm64.debThis installs:
/usr/bin/OpenCode— GUI desktop app/usr/bin/opencode-cli— CLI tool
Both are native aarch64 ELF binaries — no emulation needed.
Tested:
goose_1.33.1_amd64.debfrom block/goose v1.33.1 Date: April 30, 2026
sudo dpkg --add-architecture amd64
sudo apt update
sudo apt install ./goose_1.33.1_amd64.debResult: Failed. The Raspberry Pi repo ships libc6:arm64=2.41-12+rpt1+deb13u2 which conflicts with the Debian repo's libc6:amd64. APT's solver cannot satisfy both simultaneously — every amd64 dependency chain ultimately requires libc6:amd64, which breaks the installed libc6:arm64.
mkdir -p ~/.local/share/goose-amd64
dpkg-deb -x goose_1.33.1_amd64.deb ~/.local/share/goose-amd64
box64 ~/.local/share/goose-amd64/usr/lib/goose/GooseResult: Failed — SIGILL (Illegal Instruction), exit code 132.
This confirms the Rust/Tauri caveat noted in Step 5. The Goose desktop binary is a Tauri-based application (Rust + WebView2) and cannot execute under box64's dynarec.
Goose provides a native aarch64-unknown-linux-gnu CLI build (no desktop GUI):
wget https://github.com/block/goose/releases/download/v1.33.1/goose-aarch64-unknown-linux-gnu.tar.gz
mkdir -p ~/.local/share/goose-arm64
tar xzf goose-aarch64-unknown-linux-gnu.tar.gz -C ~/.local/share/goose-arm64/
cp ~/.local/share/goose-arm64/goose ~/.local/bin/gooseVerify:
$ goose --version
1.33.1This is a native aarch64 ELF binary — no emulation needed. Only the CLI is available for ARM64 Linux; the desktop GUI has no ARM64 .deb build.
If you added amd64 as a foreign architecture during the failed Attempt 1, roll it back:
sudo dpkg --remove-architecture amd64
sudo apt update- box64 works well on the CM5 Lite with the
RPI5ARM64dynarec for many amd64 binaries. - Build with
-j2to avoid thermal throttling on the CM5 Lite. - Rust/Tauri apps may crash under box64 — always check for native ARM64 builds first.
- OpenCode Desktop has a native ARM64
.deb— install it directly for the best experience. - box64 stays installed and ready for any future amd64-only binaries you encounter.
Tested on Debian 13 (trixie) aarch64, Raspberry Pi CM5 Lite Rev 1.0, box64 v0.4.3.