No description
  • Rust 83%
  • Nix 15.8%
  • Cap'n Proto 1.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Anon c32a89c776 vm-tests: queues and airtime; TODO: traffic fairness done
- uplink: cake's and fq_codel's parameters read back with tc, drops
  under a flood through a 10Mbit shaper, the admin commands and their
  refusals.
- wireless: wirelessd's and hostapd's capabilities after startup, the
  open debugfs files, the AQL and airtime commands and refusals.
- The DHCP checks read all of ip's output instead of grep -q, which
  could end the pipe in SIGPIPE.
- TODO: the uap-remote feedback; what traffic fairness needs hardware
  for.
2026-11-23 17:27:22 +00:00
cli cli, exporter: queues and airtime 2026-11-23 17:27:22 +00:00
config config: queue disciplines with parameters, AQL and airtime per radio 2026-11-23 17:27:08 +00:00
config-tool config: check networks and services, reject unknown fields 2026-11-20 00:22:52 +00:00
console initd: probe what confinement needs instead of rebooting in a loop 2026-11-23 14:44:28 +00:00
dhcp4c snoopd, dhcp clients: stay idle without their socket family 2026-11-23 14:44:37 +00:00
dhcp6c snoopd, dhcp clients: stay idle without their socket family 2026-11-23 14:44:37 +00:00
docs docs: egress queues, AQL and airtime 2026-11-23 17:27:22 +00:00
exporter cli, exporter: queues and airtime 2026-11-23 17:27:22 +00:00
initctl initd: go down on signals, a power button and the CLI 2026-11-21 22:36:25 +00:00
initd initd: probe what confinement needs instead of rebooting in a loop 2026-11-23 14:44:28 +00:00
logd logd: counters for the exporter 2026-11-23 15:45:53 +00:00
nanobus nanobus, netstate: queue statistics, queue parameters and airtime 2026-11-23 17:27:08 +00:00
netconf netconf: egress queues with parameters, bridge ports included 2026-11-23 17:27:09 +00:00
netstate nanobus, netstate: queue statistics, queue parameters and airtime 2026-11-23 17:27:08 +00:00
nix vm-tests: queues and airtime; TODO: traffic fairness done 2026-11-23 17:27:22 +00:00
patches kernel: carry the mac80211 isolation patch from linux-wireless 2026-11-23 08:29:02 +00:00
radiusd radiusd: counters for the exporter 2026-11-23 15:45:54 +00:00
remote remote: resumable log streams, and the configuration for admins 2026-11-23 11:00:36 +00:00
sandbox initd: probe what confinement needs instead of rebooting in a loop 2026-11-23 14:44:28 +00:00
snoopd snoopd: counters for the exporter 2026-11-23 15:45:54 +00:00
software bootconfig: only mark the slot that is active 2026-11-22 16:52:24 +00:00
sshd sshd: counters for the exporter 2026-11-23 15:45:54 +00:00
statusd nanobus, netstate: queue statistics, queue parameters and airtime 2026-11-23 17:27:08 +00:00
steering steering: load-aware decisions 2026-11-23 15:25:09 +00:00
sys nanobus, netstate: queue statistics, queue parameters and airtime 2026-11-23 17:27:08 +00:00
third_party/sunset third_party: sunset, an SSH library in pure Rust 2026-11-23 09:47:32 +00:00
timed timed: counters for the exporter 2026-11-23 15:45:54 +00:00
uap radiusd: pass 802.1X on from hostapd to the RADIUS servers 2026-11-23 13:29:42 +00:00
uap-controller uap-controller: host check, log keys, bounded cache and other review fixes 2026-11-23 11:47:22 +00:00
uap-remote uap-remote: the connection code as a library 2026-11-23 11:22:33 +00:00
ubootenv software, ubootenv: an image that boots, and going back 2026-11-21 22:28:48 +00:00
wirelessd wirelessd: AQL limits and airtime accounting per radio 2026-11-23 17:27:09 +00:00
.envrc Build firmware for the Cudy TR3000 v1 from OpenWrt's kernel 2026-11-19 17:53:07 +00:00
.gitignore Run the VM interactively with the serial console on the terminal 2026-11-19 19:34:56 +00:00
AGENTS.md Make least privilege a rule for every service 2026-11-20 15:20:39 +00:00
Cargo.lock nanobus, netstate: queue statistics, queue parameters and airtime 2026-11-23 17:27:08 +00:00
Cargo.toml radiusd: pass 802.1X on from hostapd to the RADIUS servers 2026-11-23 13:29:42 +00:00
flake.lock Update inputs 2026-11-23 02:08:34 +00:00
flake.nix boards: OpenWrt One 2026-11-23 16:57:57 +00:00
README.md docs: installing and recovering an OpenWrt One 2026-11-23 16:57:57 +00:00
TODO.md vm-tests: queues and airtime; TODO: traffic fairness done 2026-11-23 17:27:22 +00:00
UPSTREAM.md sshd: users log in over SSH with their keys and get their CLI 2026-11-23 09:48:11 +00:00

uap-nix

Linux firmware for Wi-Fi access points, built with Nix. The kernel uses the patches, extra drivers, kernel configs and device trees of an OpenWrt release; the userspace is a small set of Rust daemons (initd, netconf, wirelessd, nanobus) plus busybox, hostapd and the usual network tools, all linked statically and packed into an initramfs. The image holds the programs alone: no shared libraries, no C runtime, no dynamic loader.

Supported devices

Device SoC Wi-Fi OpenWrt DTS
Cudy TR3000 v1 MT7981B (A53) MT7976C, 2x2 AX mt7981b-cudy-tr3000-v1
OpenWrt One MT7981B (A53) MT7976C, 3x3/2x2 AX mt7981b-openwrt-one
Zyxel NWA90AX MT7621A (MIPS) MT7915, 2x2 AX mt7621_zyxel_nwa50ax

The boards are defined in nix/boards. A new board needs its OpenWrt target, subtarget and DTS name, the kernel load address and the firmware files of its radio.

The x86_64 board runs the same userspace on the stock mainline kernel on a PC or in a VM, with USB Wi-Fi sticks as its radios: nix run .#x86_64. See The x86_64 board.

Documentation

The documentation is a book under docs/, written in Markdown and built with mdBook, with a search over every page:

nix build .#docs        # the static site
nix run .#docs-serve    # serve it locally while editing

It covers building, the configuration reference and what each service does, the console and CLI, logs, time, metrics, internals, running in a VM and testing, installing and what is still untested.

Quick start

nix build .#cudy-tr3000-v1-stock-fit          # FIT image for Cudy's U-Boot
nix build .#cudy-tr3000-v1-stock-sysupgrade   # the same, for OpenWrt's sysupgrade
nix build .#cudy-tr3000-v1-ubootmod-fit       # FIT image for OpenWrt's U-Boot
nix run .#cudy-tr3000-v1-vm                   # the userspace in a VM
nix build .#x86_64-iso                        # the x86_64 board as a bootable ISO
nix fmt

A broken configuration fails the image build; a change is committed only with every check green (see Testing).

Layout

Path What it holds
flake.nix packages, checks, devshells, the formatter
docs/ this documentation as a book
nix/boards/ the boards: their hardware and what the image needs on it
nix/platforms/ how a board is built: on OpenWrt's kernel, or on nixpkgs' for a PC
nix/kernel/ the kernel builder, the kernel options per target and for the test VMs, and the malta kernel of the arch test
nix/initramfs.nix, nix/overlay.nix the root filesystem and the Rust userspace
nix/modules/, nix/lib/ the options of a configuration module, which mirror the Rust config crate, and the functions over a configuration
nix/configurations/, nix/examples/ the configurations we run and the documented examples
nix/tests/ the VM tests and the configuration checks
nix/docs/ the book's build and its generated pages
patches/ kernel patches applied after the OpenWrt ones
the Rust crates one per program and for the shared parts

UPSTREAM.md lists problems in nixpkgs and upstream projects that we work around and could report.