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

+3 -3
View File
@@ -2,7 +2,7 @@
![Bananarchy Banner](artwork/banner-800x240.png)
This manual covers flashing, operating, and customizing **Bananarchy Linux** (`240x320` native edition) on **Qualcomm MSM8905 and MSM8909** Nokia feature phones. Current release: `a1108` (codename `dejavu`); see the [changelog](./CHANGELOG.md) for release notes.
This manual covers flashing, operating, and customizing **Bananarchy Linux** (`240x320` native edition) on **Qualcomm MSM8905 and MSM8909** Nokia feature phones. Current release: `a1111` (codename `lennon`); see the [changelog](./CHANGELOG.md) for release notes.
- **Nokia 8110 4G (`nokia-argon`)**
- **Nokia 2720 Flip (`nokia-beatles`)**
- **Nokia 800 Tough (`nokia-tough` / `nokia-coconut`)**
@@ -456,7 +456,7 @@ Three native X11 games (`/usr/bin/snake`, `/usr/bin/tetris`, and `/usr/bin/scoun
- **X startup and keypad**: OpenRC starts independent services in parallel; `etc/init.d/local` replaces its stock `after *` dependency, which deadlocked with parallel startup on this image. `udev_settle_timeout=2` stops missing modem firmware from holding the display manager behind a long `udevadm settle`, and `bananarchy-sshd-debug` starts independently of `local.d`. A boot-open flip reads `/run/bananarchy/lid-state` and starts in `state=unlock` with no passcode screen, so the keypad is live as soon as `dwm` starts. If the keypad is dead, check `rc-service bananarchy-lid status`, `cat /run/bananarchy/lid-state`, `sxmo_state.sh get`, `/tmp/bananarchy_screen_locked`, `DISPLAY=:0 xwininfo -id 0xa00001` and `DISPLAY=:0 xinput list`.
- **Display distortion above 71% brightness**: the internal panel uses 25 MHz SPI on `nokia-beatles`, rather than the 50 MHz timing used by the other targets. This keeps the link stable when the MPP2 backlight PWM duty rises above the level-10/14 operating point. The brightness range remains 1–14 with no artificial cap, and panel offsets/init registers are unchanged. The timing can be checked with `dtc -I dtb -O dts /boot/qcom-msm8905-nokia-beatles.dtb | grep -A8 'display@0'`.
- **Closing the flip**: `bananarchy-lid` keeps a sticky hall reading, re-reads gpio36/gpio92 immediately on every `EV_SW` edge, and uses a 20 ms debounce/loop. On close it writes `/run/bananarchy/lid-state`, `/tmp/bananarchy_screen_locked`, `sxmo.state`, both backlights and DPMS synchronously before spawning any hook, then runs `sxmo_state.sh set screenoff` through a generation-guarded wrapper. On open it releases the cover's shared SPI bus, restores the main panel and **keeps the desktop locked**: it writes state `lock`, sends `LOCK` to `locker.so` and runs `sxmo_state.sh set lock`, so the passcode lockscreen appears instead of an auto-unlocked desktop. A close is ~45-90 ms and an open ~10-130 ms. `bananarchy-lid-state.sh` drops stale hook spawns by lid state and generation. Check `rc-service bananarchy-lid status`, `sxmo_state.sh get`, `/tmp/bananarchy_screen_locked` and `grep -E " gpio(36|92) " /sys/kernel/debug/gpio`. If the hall polarity is inverted, set `BANANARCHY_LID_GPIO_FILE` to a different debugfs GPIO file.
- **Cover display status and behaviour**: `bananarchy-cover-idle` is the compiled 0%-CPU default daemon and answers `bananarchy-coverctl` (`PING`, `STATUS`, `LID CLOSED|OPEN`, `BUTTON`, `NETWORK`, `BATTERY`, `NOTIFY`, `BLANK`/`UNBLANK`, `TEST`, `SET`, `PROBE`); the native `bananarchy-coverd` is retained only for diagnostics. With the flip open the daemon does not touch the shared QUP5 SPI bus; initial closed-flip activation still requires `card0-SPI-1/dpms = Off`. The shipping single-panel DTB uses `backend = kernel`: the KaiOS 3.10 DTS shows that the two GC9305s share CS0, gpio110 D/C and one PWM backlight, while gpio13 selects the panel, gpio23 is the external reset and gpio21 is TE. A live TE scan proved gpio13 high = cover and low = internal. On a closed-flip button event the daemon claims gpio13/gpio23, pulses reset, replays the exact vendor 240x240 init through `/sys/kernel/debug/dri/0/command`, and flushes a 240x240 `/dev/fb0` damage rect once per second. The shared PWM is active-low for the cover and active-high for the main panel: duty 0 lights the cover, duty 14 lights the internal panel. `/run/bananarchy/cover-backlight` contains `1` while the cover is lit and `0` while the cover owns the bus but is dark; `bananarchy-display-power-sync` holds the matching brightness, `bl_power` and DPMS state. `STATUS` reports `backend=kernel`, `mux=cover`; `BLANK` sends display-off and returns the external backlight to its OFF duty; `LID OPEN` restores gpio13 low, duty 14, `bl_power=0`, DPMS On and re-initialises the internal panel. The outer panel stays off until a trusted side-key `BUTTON` / `WAKE` arrives; it blanks after the same **Config -> Screen blank** timeout (`blank_timeout = auto`). The legacy `spidev`, 8/9-bit, `PROBE`, `SET mux_closed_level 0|1`, `SET kernel_backlight_invert 0|1` and `SET backend none` paths remain for rollback. `bananarchy-cover-diagnose.sh` reports the debugfs hook, backlight marker, GPIO lines, DPMS, firmware and daemon state. `scripts/test-cover-idle.py`, `scripts/test-cover-spidev.py`, `scripts/test-cover-kernel.py`, `scripts/test-cover-dt.py` and `scripts/test-lid-gate.py` guard the state machine, both backends, DT layouts and lid gate on the host. The opt-in two-panel `spi-mux` DT remains experimental because its separate gpio21 D/C wiring contradicts the vendor DTS and a live test darkened the main panel; `scripts/build-beatles-no-cover-dtb.py` builds the shipping rollback DTB.
- **Cover display status and behaviour**: `bananarchy-cover-idle` is the compiled 0%-CPU default daemon and answers `bananarchy-coverctl` (`PING`, `STATUS`, `LID CLOSED|OPEN`, `BUTTON`, `NETWORK`, `BATTERY`, `NOTIFY`, `BLANK`/`UNBLANK`, `TEST`, `SET`, `PROBE`); the native `bananarchy-coverd` is retained only for diagnostics. With the flip open the daemon does not touch the shared QUP5 SPI bus; initial closed-flip activation requires `card0-SPI-1/dpms = Off`. The shipping single-panel DTB uses `backend = kernel`: the KaiOS 3.10 DTS and kernel driver show that the two GC9305s share CS0, gpio110 D/C and one active-high PMIC MPP2 PWM backlight (`kernel_backlight_invert = 0`, `kernel_backlight_level = 14`), while gpio13 selects the panel (high = cover, low = internal), gpio23 is the external reset and gpio21 is TE. Because the internal 240x320 TN panel is normally-white while the external 240x240 panel is normally-black, a closed-flip button event wakes DRM with gpio13 low, paints an X11 `override_redirect` cover window and `/dev/fb0` solid black while leaving the internal GC9305 scanning black GRAM (`kernel_internal_sleep = 0`) so it blocks the shared backlight, switches gpio13 high, pulses gpio23, replays the exact vendor 240x240 init through `/sys/kernel/debug/dri/0/command`, and presents a centered 240x240 clock/date/status frame once per second. `/run/bananarchy/cover-backlight` contains `0` during dark GRAM preparation, `1` while the cover is lit, and is unlinked when dark; `bananarchy-display-power-sync` holds the matching brightness, `bl_power` and DPMS state (honouring `/run/bananarchy/cover-runtime.conf` for runtime `SET` overrides). `STATUS` reports `backend=kernel`, `mux=cover`; `BLANK` turns the shared backlight off, sleeps both controllers, parks gpio13 low and forces DPMS Off; `LID OPEN` sleeps the external panel, restores gpio13 low, brightness 14, `bl_power=0`, DPMS On and re-initialises the internal panel to the passcode lockscreen. The outer panel stays off until a trusted side-key `BUTTON` / `WAKE` arrives, and blanks dynamically after the same **Config -> Screen blank** timeout (`blank_timeout = auto`, reading `~/.config/sxmo/idle_blank_timeout` and `sxmo.noidle`). The legacy `spidev`, 8/9-bit, `PROBE`, `SET mux_closed_level 0|1`, `SET kernel_backlight_invert 0|1`, `SET kernel_internal_sleep 0|1` and `SET backend none` paths remain for rollback. `bananarchy-cover-diagnose.sh` reports the debugfs hook, backlight marker, GPIO lines, DPMS, firmware and daemon state. `scripts/test-cover-idle.py`, `scripts/test-cover-spidev.py`, `scripts/test-cover-kernel.py`, `scripts/test-cover-dt.py` and `scripts/test-lid-gate.py` guard the state machine, both backends, DT layouts and lid gate on the host. The opt-in two-panel `spi-mux` DT remains experimental because its separate gpio21 D/C wiring contradicts the vendor DTS and a live test darkened the main panel; `scripts/build-beatles-no-cover-dtb.py` builds the shipping rollback DTB.
- **Camera app frozen / UI unresponsive**: check `top` for `bananarchy-volume-keys`. The daemon must be a single instance at 0% CPU; stale evdev fds are pruned by `prune_devices()`/`drop_device()` and guarded by `flock`. `rc-service bananarchy-volume-keys status` and `bananarchy-keypad-diagnose.sh` report its state. `xcamera` should return immediately and `bananarchy-photo <file>` should write a 600x800 JPEG.
- **Camera**: `/dev/video0` is provided by the out-of-tree `msm8905-cam` module, loaded at boot by `/etc/modules-load.d/bananarchy-hardware.conf` and `etc/local.d/10-bananarchy-hardware.start`. Check with `v4l2-ctl --list-devices`; a missing node means the module did not load (previously caused by a missing `/bin/sed` breaking the `modules` service).
@@ -674,4 +674,4 @@ The bootstrap is idempotent: an up-to-date rootfs is left untouched. `prebuilt/`
## Verified 2720 Flip image set
For the `a1108` / `dejavu` release, use the verified `nokia-beatles` raw image, standalone boot image, and display-enabled lk2nd image generated in `images/`. These files are local build outputs and are not tracked in git; `scripts/check-rebuild.sh` pins their hashes when present. `scripts/set-bananarchy-hostname.sh` gives every image its target codename as the default hostname, and the display lk2nd image now requires the low-bit reboot cookie so **Reboot to loader** reaches the visible Fastboot menu. The default `147147` unlock passcode remains provisioned with the locker path unchanged. The X session performs a one-shot startup cleanup of stale `dmenu` and xlocker keyboard grabs, while `dwm` keeps the known-good 350 ms wake guard. `prepare-release.sh` rebuilds missing images from source and packages them; use `BA_REBUILD=1` for a forced source rebuild.
For the `a1111` / `lennon` release, use the verified `nokia-argon` and `nokia-beatles` raw images, plus the standalone boot image and display-enabled lk2nd image generated in `images/`. These files are local build outputs and are not tracked in git; `scripts/check-rebuild.sh` pins their hashes when present. `scripts/set-bananarchy-hostname.sh` gives every image its target codename as the default hostname, `scripts/apply-bananarchy-overlay.sh` writes `/usr/share/bananarchy/lid-profile` per target (`slider` on `nokia-argon`, `flip` on `nokia-beatles`, `none` on candybar targets) so flip-only daemons stay disabled on non-flip devices, and the display lk2nd image requires the low-bit reboot cookie so **Reboot to loader** reaches the visible Fastboot menu. The default `147147` unlock passcode remains provisioned with the locker path unchanged. The X session performs a one-shot startup cleanup of stale `dmenu` and xlocker keyboard grabs when unlocked, while `dwm` keeps the known-good 350 ms wake guard. `prepare-release.sh` rebuilds missing images from source and packages them; use `BA_REBUILD=1` for a forced source rebuild.