Never-committed working tree state found in the dev worktree: a Pi 4 hardware module, a setup walkthrough, an upboard-serial refactor, and flake wiring that does not evaluate (aarch64 packages block nested inside packages.x86_64-linux; pkgs-aarch64 built with `inherit aarch64` instead of `system`, so it is really x86; references a nixosConfigurations.rpi4-installed that is never defined). Parked verbatim for reference. The real Pi 4 target is rebuilt on top of #87's mkPiInstalled/mkPiImage shape in feat/rpi4-target. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013A6683cCHnQxFUosx1krY4
32 lines
1.5 KiB
Nix
32 lines
1.5 KiB
Nix
# Shared serial peripheral configuration for UP Board hardware
|
|
# (Sintra, tejo, and any other systems with similar UART layout)
|
|
#
|
|
# Serial ports used by bitSpire ATM:
|
|
# ttyJ4 = Printer (Nippon NP-2511D-2) - optional on some configs
|
|
# ttyJ5 = Validator (iVizion, ID003 protocol)
|
|
# ttyJ7 = Dispenser (Fujitsu F53/F56)
|
|
#
|
|
# These symlinks + udev rules are shared between live.nix (for testing)
|
|
# and hardware-specific modules (upboard.nix, douro.nix).
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
# Serial peripheral symlinks
|
|
services.udev.extraRules = ''
|
|
# ── Validator (iVizion ID003) ─────────────────────────────────────
|
|
# ttyJ5 on UP Board (FTDI USB bridge) → /dev/ttyJ5
|
|
KERNEL=="ttyJ5", SYMLINK+="validator-device"
|
|
SUBSYSTEM=="tty", GROUP="uucp", MODE="0666"
|
|
|
|
# ── Dispenser (Fujitsu F56) ───────────────────────────────────────
|
|
# ttyJ7 on UP Board (SoC MMIO UART) → /dev/ttyJ7
|
|
KERNEL=="ttyJ7", SYMLINK+="dispenser-device"
|
|
SUBSYSTEM=="tty", GROUP="uucp", MODE="0666"
|
|
|
|
# ── Printer (Nippon NP-2511D-2) ───────────────────────────────────
|
|
# ttyJ4 on UP Board (optional - not all configs use it)
|
|
KERNEL=="ttyJ4", SYMLINK+="printer-device", OPTIONS+="static_node=ttyJ4"
|
|
SUBSYSTEM=="tty", GROUP="uucp", MODE="0666"
|
|
'';
|
|
}
|