- Rust 83%
- Nix 15.8%
- Cap'n Proto 1.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
- 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. |
||
| cli | ||
| config | ||
| config-tool | ||
| console | ||
| dhcp4c | ||
| dhcp6c | ||
| docs | ||
| exporter | ||
| initctl | ||
| initd | ||
| logd | ||
| nanobus | ||
| netconf | ||
| netstate | ||
| nix | ||
| patches | ||
| radiusd | ||
| remote | ||
| sandbox | ||
| snoopd | ||
| software | ||
| sshd | ||
| statusd | ||
| steering | ||
| sys | ||
| third_party/sunset | ||
| timed | ||
| uap | ||
| uap-controller | ||
| uap-remote | ||
| ubootenv | ||
| wirelessd | ||
| .envrc | ||
| .gitignore | ||
| AGENTS.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
| TODO.md | ||
| UPSTREAM.md | ||
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.