Build from source
Docker build of both image variants
make docker-RK3326 builds both image variants from a clean checkout. Docker automates both image builds, but byte-for-byte identity with release images is not guaranteed. The image includes proprietary GPU binaries, and ScreenScraper support requires developer credentials at build time.
Requirements
- Docker (recommended) or a native Linux build environment
- ~40 GB free disk space (cached source + build trees)
- ~8 GB RAM recommended (the kernel build is the spike)
- A x86_64 host (cross-toolchain targets aarch64)
Quick build
git clone https://github.com/archr-linux/Arch-R.git
cd Arch-R
# First time only: build the Docker build environment
make docker-image-build
# Build both image variants for R36S
make docker-RK3326Output in target/:
ArchR-R36S.aarch64-YYYYMMDD-original.img.gz
ArchR-R36S.aarch64-YYYYMMDD-clone.img.gz
*.sha256 # checksums for the flasher
ArchR-R36S.aarch64-YYYYMMDD.tar # release archive: system, kernel and metadataAll commands
| Command | What it does |
|---|---|
make docker-RK3326 | Full Docker build, both variants |
make RK3326 | Native build (toolchain on host) |
make docker-image-build | (Re)build the Docker build container |
make clean | Removes build-tree contents and stamps |
make distclean | Removes build trees and ccache |
Paths follow BUILD_ROOT/BUILD_BASE. The current build targets are RK3326.
Incremental rebuilds
The build system uses stamps in build.ArchR-RK3326.aarch64/.stamps/<package> to skip already-built packages. To force a rebuild of a specific package:
rm -rf build.ArchR-RK3326.aarch64/.stamps/<pkg>
make docker-RK3326Common ones:
linux kernel + DTS + modules
mali-bifrost libmali kernel module
mesa Mesa Panfrost
retroarch RetroArch frontend + libretro frame
ppsspp-arch PPSSPP standalone
flycast-sa Flycast standalone
archr scripts / configs / runemu.sh
emulators systems.cfg generationAfter a stamp removal, make docker-RK3326 rebuilds just that package and re-images.
Project layout
Arch-R/
├── packages/ upstream LibreELEC-style package recipes
│ ├── compress/zlib/ (ArchR uses zlib-ng compat, see PKG_NAME)
│ ├── graphics/mesa/
│ ├── linux/
│ └── ...
├── projects/ArchR/
│ ├── devices/RK3326/ RK3326-specific patches, DTS, kernel config
│ │ ├── linux/ kernel config + DTS overrides
│ │ ├── patches/linux/ per-version kernel patches
│ │ └── options device-level vars (BOOT_SIZE, ROOT_SIZE…)
│ ├── packages/ ArchR-specific packages on top of upstream
│ │ ├── archr/ scripts/runemu.sh, profile.d/, autostart/
│ │ ├── linux-drivers/mali-bifrost/ libmali kernel patch
│ │ ├── graphics/gpudriver/ panfrost ↔ libmali switch
│ │ ├── apps/portmaster/ PortMaster + scripts/start_portmaster.sh
│ │ ├── emulators/standalone/ PPSSPP/Flycast/melonDS/DraStic per-device cfg
│ │ └── ui/archr-launcher/ archr-launcher package
│ └── options project-level vars
├── distributions/ArchR/
│ ├── options distro-level vars (BOOT_SIZE=256, ROOT_SIZE=4608…)
│ └── config/
├── config/ build-system functions, options and package paths
├── scripts/
│ ├── build per-package build driver
│ ├── extract tarball extract
│ ├── image wraps mkimage
│ └── mkimage partition layout, FAT32 BOOT, ext4 ROOT, ext4 STORAGE
├── tools/
│ ├── bench.sh on-device benchmark (PSI, freq, temp)
│ ├── audit-build.sh on-device build audit
│ └── ...
└── docs/ internal design docs / decision logsCommon edits
Tune a kernel option:
projects/ArchR/devices/RK3326/linux/linux.aarch64.confThen rm -rf build.ArchR-RK3326.aarch64/.stamps/linux && make docker-RK3326.
Tune CPU OPP / regulator:
projects/ArchR/devices/RK3326/patches/linux/000-rk3326-dts.patch
projects/ArchR/devices/RK3326/linux/dts/rockchip/rk3326-gameconsole-r3xs.dtsiAdd an emulator default:
projects/ArchR/packages/virtual/emulators/package.mk
projects/ArchR/packages/emulators/standalone/<emu>/scripts/start_<emu>.shEdit the autostart trace path:
projects/ArchR/packages/sysutils/autostart/sources/autostartValidating a build
tools/audit-build.sh runs on the device:
bash /flash/audit-build.shThe script reports selected kernel options and stripping checks. It does not scan all sanitizer symbols or provide a failure-enforcing CI gate.
tools/bench.sh collects PSI / freq / temp / vmstat / dmesg for a 60 s window. Neither script is installed in the image: copy them from tools/ in the source tree to the boot partition (/flash) on the device first.
bash /flash/bench.sh psp 60
# launch a PSP game in a separate terminal / TTY
# results land in /storage/bench-results/<timestamp>-psp/