Files
bananarchy/overlay/rootfs/etc/init.d/bananarchy-cover-display
T
Luxferre 40a840b49b Drive the 2720 Flip cover panel from userspace while closed
The shipping single-panel DTB left the external GC9305 unused because
bananarchy-cover-idle only knew /dev/fb1. The compiled daemon now owns the
shared QUP5 bus while the flip is closed: it claims gpio13/21/23 through
the gpiochip ABI, replays the external firmware over /dev/spidev0.1 at the
verified 25 MHz and pushes 240x240 RGB565 frames. LID OPEN restores the mux
and releases the panel lines; activation also requires the main panel to be
DPMS-off. Polarities are config keys and live SET knobs, with
SET backend none as a rollback. /dev/fb1 keeps precedence and the two-panel
spi-mux DT stays opt-in.

Rebuilt the a1108/dejavu nokia-beatles image and pinned the verified hash
ccc8c44517a6a3b78e16e45e9dddbf89f6f04a35ee4c52246d38d89970bd13ac in
check-rebuild.sh. e2fsck -fn passes on both partitions, debugfs confirms
the four updated rootfs files byte-for-byte, and the bootfs sync, boot image
check, artifact sync, host tests and rebuild preflight all pass.

This is an intermediate checkpoint: eyes-on confirmation that the cover
lights up and several more polarity/CS fixes are still required.
2026-11-10 19:41:57 +02:00

40 lines
1.3 KiB
Plaintext
Executable File

#!/sbin/openrc-run
# Bananarchy cover display daemon. Only active on flip devices; the
# lid-profile file is written by scripts/apply-bananarchy-overlay.sh.
description="Nokia 2720 Flip external cover display"
# The recovered native bananarchy-coverd busy-loops at 100% CPU on the
# spidev backend (gpio110/DC is owned by panel-mipi-dbi-spi) and paints
# nothing. Keep that binary installed as a diagnostic, but run the compiled
# idle IPC server: it drives the external panel through /dev/spidev0.1 only
# while the flip is closed and hands the QUP5 bus back on open. No Python
# runs here.
command="/usr/bin/bananarchy-cover-idle"
command_args="--config /etc/bananarchy/cover-display.conf"
command_background="yes"
pidfile="/run/bananarchy/cover-display.pid"
output_log="/run/bananarchy/cover-display.log"
error_log="/run/bananarchy/cover-display.log"
depend() {
need udev
after udev-settle
}
start_pre() {
mkdir -p /run/bananarchy
chmod 0755 /run/bananarchy
}
start() {
if [ "$(cat /usr/share/bananarchy/lid-profile 2>/dev/null)" != "flip" ]; then
ebegin "Skipping cover display (not a flip device)"
eend 0
return 0
fi
default_start
# Seed the compact network/battery indicators once at boot; later changes
# arrive from the NetworkManager dispatcher (bananarchy-cover-event.sh).
/usr/bin/bananarchy-cover-event.sh network >/dev/null 2>&1 &
}