Release a1111 (lennon): isolate nokia-argon slider from 2720 Flip cover stack

- Write /usr/share/bananarchy/lid-profile per target in apply-bananarchy-overlay.sh (slider on nokia-argon, flip on nokia-beatles, none elsewhere), disable flip runlevel services, cover udev/config, and mux module loads on non-flip builds, and exit 0 immediately in flip daemons/init scripts when lid-profile != flip
- Guard startup Escape grab cleanup when locked and gate lid-state checks in display-power-sync, locker.so, and callscreen.so on lid-profile == flip so nokia-argon keeps pure a1108 sliding-lid behaviour
- Ship active-high shared cover backlight (kernel_backlight_invert = 0), active-black internal panel isolation (kernel_internal_sleep = 0), pixel-centered 240x240 cover UI, SW_LID hall sync, and shared Screen blank timeout on nokia-beatles
- Pin verified a1111 (lennon) image hashes for both nokia-argon and nokia-beatles and synchronize docs and host tests
This commit is contained in:
Luxferre committed 2026-11-11 14:20:42 +02:00
1 parent 7a2b965ce3
commit 83c8db10f1
38 files changed
+1351 -276

No files matched your search

+47 -3
View File
@@ -14,6 +14,8 @@ import tempfile
BASE = pathlib.Path(__file__).resolve().parent.parent
LID_SRC = BASE / "src/bananarchy-daemons/bananarchy-lid.c"
COVER_SRC = BASE / "src/bananarchy-daemons/bananarchy-cover-idle.c"
LOCKER_SRC = BASE / "src/dwm-plugins/locker_plugin.cpp"
CALLSCREEN_SRC = BASE / "src/dwm-plugins/callscreen_plugin.cpp"
GATE = BASE / "overlay/rootfs/usr/bin/bananarchy-lid-gate.sh"
LID_WRAPPER = BASE / "overlay/rootfs/usr/bin/bananarchy-lid-state.sh"
COMMON = BASE / "src/bananarchy-daemons/common.h"
@@ -26,6 +28,7 @@ DPMS_SYNC = BASE / "overlay/rootfs/usr/bin/bananarchy-display-power-sync"
INPUT_HOOKS = (
BASE / "overlay/rootfs/usr/share/sxmo/default_hooks/sxmo_hook_inputhandler.sh",
BASE / "overlay/rootfs/etc/skel/.config/sxmo/hooks/sxmo_hook_inputhandler.sh",
BASE / "overlay/rootfs/home/user/.config/sxmo/hooks/sxmo_hook_inputhandler.sh",
)
EVENT = BASE / "overlay/rootfs/usr/bin/bananarchy-cover-event.sh"
HOOKS = (
@@ -118,8 +121,18 @@ def main():
if " wake)" not in event or "coverctl WAKE" not in event:
return fail("cover event bridge lost the wake forwarding case")
common = COMMON.read_text(encoding="utf-8")
if "device_has_code(fd, EV_KEY, KEY_POWER)" not in common:
return fail("the End/Power key is not watched while the flip is closed")
if "device_has_code(fd, EV_KEY, KEY_POWER)" not in common or \
"device_has_code(fd, EV_KEY, KEY_CAMERA)" not in common:
return fail("the outer Power/Camera keys are not watched while closed")
locker = LOCKER_SRC.read_text(encoding="utf-8")
if "isLidClosed()" not in locker or \
"if (!visible || isLidClosed())" not in locker or \
'runAsyncArgv("/usr/bin/bananarchy-lid-gate.sh", "wake")' not in locker:
return fail("locker_plugin.cpp is not gated on /run/bananarchy/lid-state")
callscreen = CALLSCREEN_SRC.read_text(encoding="utf-8")
if "/run/bananarchy/lid-state" not in callscreen or \
'runAsyncArgv("/usr/bin/bananarchy-lid-gate.sh", "wake")' not in callscreen:
return fail("callscreen_plugin.cpp wakeDisplayHardware is not lid-gated")
conf = COVER_CONF.read_text(encoding="utf-8")
if "spi_word_bits" not in conf:
return fail("the cover config lost the 8/9-bit sign-off knob")
@@ -138,11 +151,42 @@ def main():
("%s", calls))
stub.chmod(0o755)
profile.write_text("slider\n")
state.write_text("closed\n")
if run_gate(profile, state, "wake", stub).returncode != 0:
return fail("nokia-argon slider device was blocked by the flip lid gate")
if calls.exists() and calls.read_text().strip():
return fail("nokia-argon slider device forwarded a wake to coverctl")
lid_state_out = root / "daemon-lid-state"
lid_env = dict(os.environ)
lid_env["BANANARCHY_LID_PROFILE"] = str(profile)
lid_env["BANANARCHY_LID_STATE"] = str(lid_state_out)
proc = subprocess.run([str(scratch / "lid-gate-host")],
env=lid_env, capture_output=True, text=True,
timeout=2)
if proc.returncode != 0 or lid_state_out.exists():
return fail("compiled lid daemon stayed active on a slider device")
overlay_sh = (BASE / "scripts/apply-bananarchy-overlay.sh").read_text(encoding="utf-8")
for token in ('LID_PROFILE="slider"', 'LID_PROFILE="flip"',
'LID_PROFILE="none"',
'printf \'%s\\n\' "$LID_PROFILE" > "$TARGET_ROOTFS/usr/share/bananarchy/lid-profile"',
'"$TARGET_ROOTFS/etc/runlevels/default/bananarchy-lid"',
'"$TARGET_ROOTFS/etc/runlevels/default/bananarchy-cover-display"',
'"$TARGET_ROOTFS/etc/runlevels/default/bananarchy-volume-keys"'):
if token not in overlay_sh:
return fail("apply-bananarchy-overlay.sh lost target lid isolation: %s" % token)
if '"/usr/share/bananarchy/lid-profile"' not in locker or \
'"/usr/share/bananarchy/lid-profile"' not in callscreen or \
'LID_PROFILE=' not in DPMS_SYNC.read_text(encoding="utf-8"):
return fail("plugins or display-power-sync lost the flip lid-profile check")
profile.write_text("bar\n")
state.write_text("closed\n")
if run_gate(profile, state, stub=stub).returncode != 0:
return fail("a non-flip device was blocked by the lid gate")
print("[ok] non-flip devices are unaffected")
print("[ok] non-flip / slider devices are completely unaffected")
profile.write_text("flip\n")
state.write_text("open\n")