Quick reference for which controller/image outputs to use, what they include, and how USB is configured.
| Package | Go tags | Extras |
|---|---|---|
controller |
netgo |
Minimal production binary. |
controller-debug |
netgo,debug |
Serial console on /dev/ttyGS1, hot-reload command, screenshots to FAT, debug button scripting. |
Build directly if needed: nix build .#controller or nix build .#controller-debug.
| Image output | Controller used | USB role | Notes |
|---|---|---|---|
image |
controller |
Host (dr_mode=host, usblp) |
Direct USB-printer use (/dev/usb/lp0); no gadget shell; UART console disabled. |
image-debug |
controller-debug |
Host (dr_mode=host, usblp) |
Host-mode + debug controller; debug console via UART (no gadget shell). |
image-gadget |
controller |
Gadget (dwc2,g_serial) |
Console on ttyGS0/HDMI; no debug hooks. |
image-gadget-debug |
controller-debug |
Gadget (dwc2,g_serial) |
Adds serial console + reload flow via /dev/ttyGS1. |
All four image outputs above include the integrated HBP/CUPS runtime support.
Build commands (examples):
nix build .#image→result/seedetcher.imgnix build .#image-debug→result/seedetcher-debug.imgnix build .#image-gadget→result/seedetcher-gadget.imgnix build .#image-gadget-debug→result/seedetcher-gadget-debug.img
Flash via ./scripts/flash-sdcard.sh -i seedetcher-debug.img from macOS, pointing at the built image.
- Requires
image-gadget-debugrunning in gadget mode (serial gadget active). - From host:
nix run .#reload /dev/ttyACM0(device path may vary). - Uses the debug controller hooks to stream a new binary over
/dev/ttyGS1.
- Development with serial shell/hot reload: use
image-gadget-debug. - Production/field use without shell: use
image. - Printing directly to USB printer (no host PC in the loop): use
image/image-debug(switches OTG to host and loadsusblpso/dev/usb/lp0appears). - For HBP runtime behavior and operational details, see
docs/dev/hbp-runtime.md.
- Host images set
dr_mode=host(nog_serialincmdline.txt) and auto-loadusblp. - Host mode shell/debug path is UART (no gadget shell).
- Host printing path uses direct 1bpp PCL streaming to
/dev/usb/lp0. - Gadget images use raster-to-PDF fallback path for capture/dev (
/dev/ttyGS1), not direct PCL.