secubox-deb/remote-ui/square
CyberMind 2072c0eae5
fix(eye-square): relocate firstboot.sh out of /usr/local/sbin/ (closes #207) (#208)
Debian policy reserves /usr/local/ for the local administrator;
packages may not install files there. dh_usrlocal was correctly
rejecting the staged tree built from remote-ui/square/files/.

Move:
  remote-ui/square/files/usr/local/sbin/firstboot.sh
  → remote-ui/square/files/usr/lib/secubox/firstboot.sh

Update ExecStart in secubox-firstboot.service to match. The new
location is namespaced under /usr/lib/secubox/ consistent with
the sister helpers find-usb-serial and leasewatch.sh shipped by
secubox-system.

Bump 1.0.2 → 1.0.3. Local dpkg-buildpackage now produces a valid
.deb; `dpkg-deb -c` confirms:
  - /usr/lib/secubox/firstboot.sh (0755)
  - /etc/systemd/system/secubox-firstboot.service (with new ExecStart)
  - no entries under /usr/local/

Co-authored-by: CyberMind-FR <gandalf@Gk2.net>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 06:53:31 +02:00
..
files fix(eye-square): relocate firstboot.sh out of /usr/local/sbin/ (closes #207) (#208) 2026-05-19 06:53:31 +02:00
build-eye-square-image.sh Feature/135 converge round square dashboards into re (#140) 2026-05-15 13:26:41 +02:00
CLAUDE.md feat(remote-ui): Phase 3 — Pillow+framebuffer kiosk for Pi 4B/400 (ref #127) 2026-05-14 05:59:42 +02:00
deploy.sh feat(remote-ui): Phase 3 — Pillow+framebuffer kiosk for Pi 4B/400 (ref #127) 2026-05-14 05:59:42 +02:00
install_pi4.sh feat(remote-ui): Phase 3 — Pillow+framebuffer kiosk for Pi 4B/400 (ref #127) 2026-05-14 05:59:42 +02:00
README.md feat(remote-ui): Phase 3 — Pillow+framebuffer kiosk for Pi 4B/400 (ref #127) 2026-05-14 05:59:42 +02:00

remote-ui/square — Eye Remote Square variant (Phase 3)

Phase 3: Pillow + framebuffer single-process kiosk targeting Raspberry Pi 4 Model B and Raspberry Pi 400 with the official Raspberry Pi 7" Touchscreen V1.1 (DSI, 800×480, 10-point capacitive).

Companion to the round/ Pi Zero W variant (also Pillow+fb).

See docs/superpowers/specs/2026-05-13-eye-square-phase3-python-kiosk-design.md for the full design.

Hardware

Board Power Display
Pi 4 Model B GPIO 5V (USB-C reserved for peripheral OTG) DSI 7" 800×480 V1.1
Pi 400 GPIO 5V DSI or HDMI (same image works on both)

Process map

systemd unit Purpose
secubox-firstboot.service one-shot: GPIO 5V check, hostname, SSH key, eye-square.toml
secubox-otg-gadget.service configfs USB composite gadget (ECM+ACM+HID+mass-storage)
secubox-eye-square-helper.service FastAPI on /run/secubox/eye-square-helper.sock, SO_PEERCRED
secubox-square-kiosk.service the kiosk — Pillow renders 800×480 to /dev/fb0, evdev reads touch

No X server, no Chromium, no Qt, no Openbox, no nginx.

Boot sequence

  1. Pi OS first-boot (regenerates SSH host keys, removes init= from cmdline, reboot)
  2. Pi OS normal boot + multi-user.target activates:
    • secubox-firstboot.service runs once (sets hostname, imports SSH key)
    • secubox-otg-gadget.service configures USB peripheral mode
    • secubox-eye-square-helper.service starts FastAPI on Unix socket
    • secubox-square-kiosk.service opens /dev/fb0 + /dev/input/event*, renders dashboard

Build

sudo bash remote-ui/square/build-eye-square-image.sh -o /tmp

Produces /tmp/secubox-eye-square_VERSION_arm64.img.xz (~400 MB compressed).

Deploy

sudo bash remote-ui/square/install_pi4.sh \
    -d /dev/sdX \
    -i /tmp/secubox-eye-square_*.img.xz \
    -s "<WiFi-SSID>" -p "<WiFi-PSK>" \
    -k ~/.ssh/id_ed25519.pub

For hot updates on a running Pi:

bash remote-ui/square/deploy.sh -h <pi-ip>