wip(rpi4): park the Pi 4 sketch — superseded by the Pi 5 machinery in #87

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
This commit is contained in:
Padreug 2026-09-20 11:17:41 +02:00
commit 7e59951fcc
7 changed files with 533 additions and 4 deletions

View file

@ -0,0 +1,32 @@
# 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"
'';
}