Rebuild the world at DEF CON with the Nix Badge
  • C 50.1%
  • Nix 28.4%
  • Python 12.4%
  • Zig 7.6%
  • Shell 0.8%
  • Other 0.7%
Find a file
Morgan Jones 91400f88cb wifi: get it working
Ultimately the problem was both firmware and the CONFIG_32K_XTAL
bootloader config. The Milk-V Duo Module 01 routes a 32k crystal to an
interrupt input of the AIC8800 for timekeeping. If we don't mux it
out the card hangs.

Assisted-by: Claude Fable 5
2026-08-25 01:19:03 -07:00
modules/duo-s wifi: get it working 2026-08-25 01:19:03 -07:00
pkgs wifi: get it working 2026-08-25 01:19:03 -07:00
src Support Zig 0.15 2025-12-24 21:31:38 -08:00
.gitignore Merge badgeOS (Milk-V Duo S NixOS) history into the badge repo 2026-08-15 01:38:13 -07:00
COPYING.md badge: init for hardware samples 2025-07-15 23:52:31 -07:00
default.nix treewide: nixfmt 2025-07-16 00:06:54 -07:00
flake.lock wifi: get it working 2026-08-25 01:19:03 -07:00
flake.nix flake: Updates for v2. 2026-08-15 02:06:57 -07:00
README.md README: more updates 2026-08-15 02:12:08 -07:00
shell.nix treewide: nixfmt 2025-07-16 00:06:54 -07:00
v1.md flake: Updates for v2. 2026-08-15 02:06:57 -07:00

NixOS Badge

For the PCB, use our git server since it doesn't fit on GitHub anymore.

For the Nix Badge v1 readme, see v1.md.

This README is still very TODO, since this is the first release after DEF CON.

Hardware features

  • Dual-core ARM/RISC-V Milk-V Duo Module 01 (core selected at boot; both ARM and RISC-V boot)
  • 24 WS2812 LEDs on SPI3, powered from VSEL rather than the 3.3V buck (deliberately go red glitch-art on low battery)
  • AIC8800 WiFi (kernel driver needs a rebase from 5.10; we have the bootrom)
  • 0.5 TOPS TPU (works under Debian; drivers need forward-porting)
  • DSI → HDMI out via an Olimex-based bridge (needs a DSI kernel driver)
  • USB-C with mode switching
  • Serial + JTAG over the CH347
  • 10/100 Ethernet
  • Battery power (AA cells)
  • Voltage-measurement ADCs
  • Supercapacitor RTC circuit
  • SAO connector (6-pin keyed header)
  • OLED connector (4-pin I2C)
  • Front pin header for a Sharp Memory Display
  • Button

Build

  • Modify your config in modules/duo-s/common.nix
  • nix build will cross-compile a polyglot ARM and RISC-V image

Running

  • ARM is selected by default, set the physical builtins.currentSystem switch to aarch64-linux. Yes, really, this is not a joke.
  • Connect over serial (115200/8n1)
  • Run nix-badge to control the badge once it's booted