Compile WebKit GSettings schemas for clean rootfs builds

The live nokia-beatles target exposed two gaps: the phone was still running the baseline webarchy.so/networks.so binaries, and WebKit's network process aborted because apk --no-scripts left gschemas.compiled ungenerated. Deploy the current plugin binaries on the phone and make clean image builds compile the schema database from explicit glib/gsettings-desktop-schemas packages. Add a host test and build guards; live HTTP rendering and Bluetooth discovery now pass.
This commit is contained in:
Luxferre committed 2026-11-10 15:47:03 +02:00
1 parent a7b1a75465
commit f892531df6
11 files changed
+174 -7

No files matched your search

+4 -3
View File
@@ -30,7 +30,7 @@ It uses a pure **X11 (`Xlibre` + `sxmo-de-dwm`)** stack (no Wayland) with **Adre
- `nokia-beatles` boot chain: `images/boot-lk2nd-nokia-beatles.img` is built from upstream `msm8916-mainline/lk2nd` at pinned commit `cf45aefd22d744b2bf9b39455afae697ce430063` plus `bootloader/lk2nd/nokia-beatles.patch` (see `bootloader/lk2nd/README.md`; rebuild with `scripts/build-lk2nd-beatles.sh`). It keeps the upstream QCDT layout (both `0x14b` entries `0xb/0x100` and `0x1000b/0x100` sharing one `msm8905-qrd-skub` DTB, stock `qcom,board-id` order) with a compact `/lk2nd/nokia-beatles` node injected, and **adds `/cpus` with `cpu@0`..`cpu@3` and 4-byte `device_type` to the common `lk2nd.dtsi` so every QCDT DTB has it**. The 2720's MSM8905 is a partial-goods 2-core part and its aboot `ASSERT`s at `platform/msm_shared/partial_goods.c:80` when `/cpus`, `cpu@2` or `cpu@3` is missing — that was the actual "black screen / no fastboot" crash (Sahara MEMORY_DEBUG RLOG log, see `bootloader/lk2nd/README.md` and `backup/nokia-beatles-2720/crash-20261109/aboot-log.txt`). cmdline `lk2nd lk2nd.compatible=nokia,beatles`, `lk2nd,match-panel` for all three GC9305 panel names the aboot reports, and the single `qcom,mdss_spi_gc9305_v2_qvga_cmd` (the panel the live aboot reports) `lk2nd,panel-init` stream replayed on BLSP1 QUP5 (DC GPIO 110) only when aboot did not leave continuous splash enabled (or when `lk2nd.force-panel-init` is in the cmdline), so the 240x320 RGB565 main panel is initialized even without cont-splash. `spi-display.c` also paints the branded RGB565 boot splash into the framebuffer (without flushing during init): `DISABLE_SPLASH_PARTITION=1` plus `menu.c`'s bottom-only text means upstream lk2nd otherwise pushes a nearly black frame, which is what the "KaiOS logo then blank screen" is. `lk2nd/include/lk2nd/spi-panel-init.h` is shared with the host unit test; the repo copy is `bootloader/lk2nd/spi-panel-init.h` and `check-lk2nd-beatles.py` keeps them in sync and enforces that QCDT shape. Both the normal and diagnostic images carry `lk2nd.no-display` (RAM-only framebuffer, no QUP SPI before USB) because unbounded QUP/clock register polls used to wedge lk2nd with the boot vibrator stuck on. The port now bounds those polls (`QUP_FIFO_TIMEOUT`, `CLK_POLL_TIMEOUT`) and adds `oem display-init` / `oem display-test` / `oem scan-dtb` fastboot probes that run after USB is up, plus `oem screenshot` to verify the framebuffer. Live `oem display-init` confirmed the GC9305 v2 stream and the 240x320 RGB565 frame; a chain-loaded diagnostic falls back to the QCDT panel stream when aboot tags are absent, `oem scan-dtb` stages the final DTB after lk2nd DT updates, `oem ramoops console` validates and bounds pstore data, and the QUP per-word `SPEW` log is removed. The r3 port also makes `oem read-partition` block-safe: it rounds MMC reads up to the eMMC block size, rejects unaligned offsets and stages only the requested byte count. `images/boot-lk2nd-nokia-beatles-display.img` uses `lk2nd.display=on` for boot-time panel init via the downstream GC9305 v2 `lk2nd,panel-init` stream; flash it with `--lk2nd-image`. The diagnostic image additionally has `DEBUG=2 LK2ND_FORCE_FASTBOOT=1`. `check-lk2nd-beatles.py --expect-display` guards the display variant; `scripts/test-lk2nd-beatles-port.py` runs all three. lk2nd is confirmed working over live fastboot (`lk2nd:compatible=nokia,beatles`, `model=Nokia 2720 Flip`, panel `qcom,mdss_spi_gc9305_v2_qvga_cmd`, `unlocked=yes`). `flash-edl.py` defaults to `--method lk2nd` for every target; stock aboot accepts the port and lk2nd boots Bananarchy from `userdata` via `extlinux.conf` (`fdt /qcom-msm8905-nokia-beatles.dtb`). On `nokia-beatles` the default is now the Argon shape: lk2nd in `boot`, the standalone mainline `boot.img` in `recovery` (Volume Up fallback). `--method both` remains as a fallback that writes the standalone mainline `boot.img` to both slots. `--verify` reads back every slot and `--dump-diagnostics` saves small bootloader/config partitions for secure-boot analysis. `scripts/check-lk2nd-beatles.py` validates the boot header, both 2720 QCDT entries, `/cpus` in every QCDT DTB, the device node and the GC9305 v2 panel init stream; `scripts/test-lk2nd-beatles-port.py` adds the host C parser test. The stock 2720 aboot is locked (`devinfo.is_unlocked=0`) and verifies boot images against `Nokia_beatles ROOT CA0`; `flash-edl.py` therefore defaults to setting `devinfo.is_unlocked=1` on `nokia-beatles` via `unlock_devinfo()` before writing any boot image, saves `backup/devinfo-locked-<device>.img`, and supports `--no-unlock-bootloader` to skip. `scripts/make-unlocked-devinfo.py` produces the same patched image offline. Correction: the GPT has `keystore` but no `keymaster`, so `target_get_vb_version()` returns `VB_L=1` while `VB_M=2`; aboot therefore reads `devinfo` from eMMC, not RPMB. The 21:25 dump confirms eMMC `is_unlocked=1`, so the unlock is effective and no stock fastboot / `oem unlock-go` step is required. `--only-unlock`, `enable_oem_unlock()` and `scripts/make-oem-unlock-config.Line truncated
- `bootloader/loaders/`: device-specific signed Firehose programmers; `DEVICE_LOADERS` in `flash-edl.py` maps each target codename to one (`8k.mbn` serves both `nokia-sparkler` and `nokia-leo`), and `DEVICE_LOADER_VARIANTS` maps `--variant us` on `nokia-beatles` to `2720v.mbn` (`Nokia_bts_us`). Never flash a different device's programmer: Sahara rejects the signature and `--list-loaders` shows the embedded attestation identity.
- `vendor/edl/`: vendored, patched EDL client library (MIT) used by `flash-edl.py`; a local `edl/` checkout or `BANANARCHY_EDL_DIR` overrides it.
- `scripts/rootfs-packages.txt`: single source of truth for the `armv7` rootfs package set, read by both `bootstrap-rootfs.sh` and `rebuild-image.sh`. It intentionally contains no `device-*` package; `scripts/apply-bananarchy-overlay.sh` installs the per-device `devices/<device>/modules-initfs` list as `/usr/share/mkinitfs/modules/00-device-<device>.modules` (plus its `initramfs.load` mapping) so a clean-clone bootstrap still builds the correct initramfs. `scripts/check-rebuild.sh` guards this. The package set also includes `msm-firmware-loader`, its OpenRC companion and `msm-firmware-loader-wcnss`; explicit sysinit/boot links are required because packages are installed with `--no-scripts`. This mounts the stock `modem` and `persist` partitions before udev and supplies WCNSS/modem firmware plus factory Wi-Fi NV data, allowing both `wlan0` and `hci0` to enumerate.
- `scripts/rootfs-packages.txt`: single source of truth for the `armv7` rootfs package set, read by both `bootstrap-rootfs.sh` and `rebuild-image.sh`. It intentionally contains no `device-*` package; `scripts/apply-bananarchy-overlay.sh` installs the per-device `devices/<device>/modules-initfs` list as `/usr/share/mkinitfs/modules/00-device-<device>.modules` (plus its `initramfs.load` mapping) so a clean-clone bootstrap still builds the correct initramfs. `scripts/check-rebuild.sh` guards this. The package set also includes `msm-firmware-loader`, its OpenRC companion and `msm-firmware-loader-wcnss`; explicit sysinit/boot links are required because packages are installed with `--no-scripts`. This mounts the stock `modem` and `persist` partitions before udev and supplies WCNSS/modem firmware plus factory Wi-Fi NV data, allowing both `wlan0` and `hci0` to enumerate. The package set explicitly contains `glib` and `gsettings-desktop-schemas`; because apk is invoked with `--no-scripts`, `apply-bananarchy-overlay.sh` must run `compile-gsettings-schemas.sh` to generate `gschemas.compiled`, otherwise WebKitGTK's network process aborts with an internal error.
- `scripts/rootfs-prune-packages.txt`: denylist of Wayland-only, Rust-based, and retired packages purged from existing rootfs trees by `bootstrap-rootfs-container.sh` and `rebuild-image.sh`.
- `scripts/prune-rootfs-packages.sh`: two-phase rootfs pruner (`world` before `apk add`, `purge` after) that reads the denylist and pins `install_if` packages with negative `!pkg` world constraints plus `apk fix`; the `world` phase is required so apk can atomically replace Rust `sudo-rs` with C `sudo`.
@@ -54,12 +54,13 @@ All cross-compilation scripts run inside rootless Docker (`alpine:3.24` `armv7`
- `./chroot-shell.sh` — opens an `armv7` container shell to manage packages in `rootfs/` (`pkg-add`, `pkg-del`, `pkg-search`); bootstraps `rootfs/` first if needed.
- `./rebuild-image.sh <device> [--mkinitfs]` — verifies the clone, syncs `prebuilt/` into `overlay/rootfs/`, bootstraps `rootfs/` from scratch when missing, applies the overlay, and produces flashable images in `images/`.
- `./scripts/bootstrap-rootfs.sh [rootfs-dir] [device] [--force|--check]` — creates a complete `armv7` rootfs from `scripts/rootfs-packages.txt` inside rootless Docker; idempotent via `etc/bananarchy/rootfs-bootstrap.done`.
- `./scripts/compile-gsettings-schemas.sh [rootfs-dir]` — compiles the target rootfs's GSettings XML into `usr/share/glib-2.0/schemas/gschemas.compiled`; called by `apply-bananarchy-overlay.sh` and guarded by `check-rebuild.sh`.
- `./scripts/prune-rootfs-packages.sh <rootfs-dir> world|purge` — removes Wayland-only, Rust-based, and retired packages from a target rootfs inside the build container.
- `./scripts/build-bananarchy-daemons.sh` — cross-builds the three compiled ARM idle daemons (`bananarchy-lid`, `bananarchy-cover-idle`, `bananarchy-volume-keys`) from `src/bananarchy-daemons/`; `--check` validates the ARM ELF artifacts and overlay sync. No Python-based daemon runs in the idle system.
- `./scripts/build-lk2nd-beatles.sh` — cross-builds all three beatles lk2nd images (normal, diagnostic and display; the display image is the flasher default) from the pinned upstream lk2nd commit plus `bootloader/lk2nd/nokia-beatles.patch` in rootless Docker (`--check` validates all three shipped images, `--only normal|diagnostic|display` builds one, `--force-panel-init` forces the panel replay, `--with-display` enables SPI display during boot). Offline validators: `scripts/check-lk2nd-beatles.py` and `scripts/test-lk2nd-beatles-port.py`.
- `./scripts/build-beatles-cover-panel.py` — builds the opt-in two-panel DTB (and optionally a boot image / `pmOS_boot` patch) for the physical gpio13/reset sign-off.
- `./scripts/build-beatles-no-cover-dtb.py` — builds the verified single-panel rollback DTB (and optionally a boot image / `pmOS_boot` patch).
- `./scripts/test-webarchy-renderer.py`, `./scripts/test-idle-blank-lock.py`, `./scripts/test-bluetooth-scan.py`, `./scripts/test-battery-charge-event.py`, `./scripts/test-gps-time-sync.py`, `./scripts/test-cover-idle.py` and `./scripts/test-cover-dt.py` — host unit/integration tests for the Webarchy renderer profile, the idle-blank screenlock wiring, the Bluetooth discovery parser, the charger plug/unplug icon refresh, the GPS-only time source, the cover display state machine and the external-panel DT wiring (all also run by `check-rebuild.sh`).
- `./scripts/test-webarchy-renderer.py`, `./scripts/test-webkit-gsettings.py`, `./scripts/test-idle-blank-lock.py`, `./scripts/test-bluetooth-scan.py`, `./scripts/test-battery-charge-event.py`, `./scripts/test-gps-time-sync.py`, `./scripts/test-cover-idle.py` and `./scripts/test-cover-dt.py` — host unit/integration tests for the Webarchy renderer profile and GSettings schema build, the idle-blank screenlock wiring, the Bluetooth discovery parser, the charger plug/unplug icon refresh, the GPS-only time source, the cover display state machine and the external-panel DT wiring (all also run by `check-rebuild.sh`).
- `./scripts/check-rebuild.sh` — offline preflight for a clean clone (syntax, package list, plugin artifacts, overlay sync, SMS long-message rendering guard, ignored local agent config, Docker, version helper).
- `./scripts/sync-prebuilt-overlay.sh [--check]` — mirrors `prebuilt/` artifacts into `overlay/rootfs/`; `--check` only reports drift.
- `./scripts/bootstrap-flash-deps.sh` — installs `pyusb` and `pyserial` into the gitignored `.flash-deps/` directory for `flash-edl.py`.
@@ -74,7 +75,7 @@ All cross-compilation scripts run inside rootless Docker (`alpine:3.24` `armv7`
- **SMS text accounting**: never treat `std::string::size()` (UTF-8 bytes) as an SMS character count. Use code-point-aware logic such as `smsTextMetrics()`: GSM-7 septets (160 per part, 153 when concatenated) or UCS-2 UTF-16 units (70 per part, 67 when concatenated). SMS log headers are parsed by `parseSmsHeaderLine()`, which strips `[SIM n]` tags; do not write those tags back into `sms.txt`.
- **Documentation**: keep `README.md`, `MANUAL.md`, `SDK.md`, and `CHANGELOG.md` synchronized with any new user-facing features, SDK functions, or keybindings, and do not leave third-party `.md` files inside `src/` or `edl/`.
- **Artifact sources**: `prebuilt/` is the single source of truth for compiled artifacts and `scripts/rootfs-packages.txt` for the `armv7` package set. Never edit `overlay/rootfs/` copies of binaries by hand; run `./scripts/sync-prebuilt-overlay.sh` after changing `prebuilt/`.
- **Package hygiene**: keep `scripts/rootfs-packages.txt` free of Rust-based top-level packages (use C `sudo`, never `sudo-rs`) and Wayland-purpose packages; `libwpe` and the `wayland-libs-*` shared libraries stay because GTK3/WebKitGTK link them directly, but no Wayland compositor, backend, or viewer is shipped. `scripts/check-rebuild.sh` enforces this.
- **Package hygiene**: keep `scripts/rootfs-packages.txt` free of Rust-based top-level packages (use C `sudo`, never `sudo-rs`) and Wayland-purpose packages; `libwpe` and the `wayland-libs-*` shared libraries stay because GTK3/WebKitGTK link them directly, but no Wayland compositor, backend, or viewer is shipped. `scripts/check-rebuild.sh` enforces this and guards the compiled WebKit GSettings database.
- **Power management**: idle blanking is `dwm`'s native evdev timer (`src/sxmo-dwm/dwm.c`) plus `bananarchy-idle-blank.sh`; the timeout lives in `~/.config/sxmo/idle_blank_timeout` (default 300 s, `0` = off), is edited via **Config -> Screen blank** / `bananarchy-idle-timeout.sh`, and is reloaded on `SIGUSR1`. `~/.cache/sxmo/sxmo.noidle` and `SXMO_UNLOCK_IDLE_TIME` still override it. `bananarchy-screen-wake.sh` (called from the ring and notification hooks) wakes the panel for calls/SMS and resets the timer; locking or closing the lid blanks immediately. A blank also arms `bananarchy-idle-lock.sh`: after `~/.config/sxmo/idle_lock_delay` seconds of dark panel (default 30, `0` = immediate, `off` = disabled) it runs the trusted `sxmo_state.sh set screenoff` so `locker.so` receives `LOCK_BLANK`; every wake path cancels the pending lock. Runtime power policy: `/etc/bananarchy-power-policy.conf` +
`/usr/bin/bananarchy-power-policy.sh` (OpenRC default runlevel, `doas` rule)
drive `WIFI_LISTEN_INTERVAL` (wcn36xx module option), `MODEM_DRX_MODE`
+8 -1
View File
@@ -13,6 +13,13 @@ Release versions follow the `<year-letter><MM><DD>` format (where `2026` is `a`,
Work since `a1108` has focused on reliable 2720 Flip hardware support and a reproducible boot/flash path. Earlier incremental and superseded diagnostic entries are consolidated here.
### Live nokia-beatles plugin verification and WebKit GSettings schema fix
- **Stale live runtime**: the phone was still running the pre-fix `webarchy.so` (`3e3c3ac7...`) and `networks.so` (`97eaae44...`) from the baseline image, while `prebuilt/`, `overlay/rootfs/` and the local `rootfs/` already carried the rebuilt artifacts (`8eb1b493...` and `e12103ee...`). That is why the earlier repository fixes were not visible on the device. The current binaries were deployed, their hashes verified, and both resident plugins restarted.
- **Actual WebKit root cause**: with the current `webarchy.so`, `G_MESSAGES_DEBUG=all` exposed `GLib-GIO-ERROR **: No GSettings schemas are installed on the system` in `WebKitNetworkProcess`, immediately followed by `ERROR: WebKit encountered an internal error ... WebLoaderStrategy.cpp(679)`. The rootfs had the `gsettings-desktop-schemas` XML files but no `gschemas.compiled`, because packages are installed with `--no-scripts` and the apk trigger never ran. The earlier renderer-profile fix was necessary but not sufficient. The package set now explicitly contains `glib` and `gsettings-desktop-schemas`; both image containers install host `glib` tools; and `apply-bananarchy-overlay.sh` calls `compile-gsettings-schemas.sh` to produce `usr/share/glib-2.0/schemas/gschemas.compiled`. `scripts/test-webkit-gsettings.py` guards the wiring and compiles a synthetic schema. Live verification: after compiling the schemas, the WebKit internal error disappeared and an HTTP probe rendered 51,420 green pixels in the 240x217 browser viewport.
- **Live Bluetooth verification**: starting from `Powered: no`, the deployed `networks.so` powered the WCNSS controller on, ran `bluetoothctl --timeout 15 scan on`, and merged an injected `[NEW] Device AA:BB:CC:DD:EE:FF BT_PROBE` discovery line even though the persistent `bluetoothctl devices` list was deliberately empty. The plugin reported `Found 1 device(s)` and retained `BT_PROBE` in its device list. The controller ended `Powered: yes`.
- **Final live state**: the phone has the current plugin binaries, the compiled `gschemas.compiled` database, normal plugin environments with no Bluetooth stub in `PATH`, and no debug-only WebKit environment. Webarchy and Networks were returned to their normal preloaded state; the Bluetooth controller was powered back off.
### Live 2720 Flip verification and cover DT gating
- **Live test performed**: the phone was reachable over root SSH (`keys/phone_id_ed25519`). We backed up `/boot` on the phone and the host, deployed the two-panel DTB, a rebuilt `boot.img`, an initramfs containing the external panel firmware and the `mux-core`/`mux-gpio`/`spi-mux` modules, plus the updated cover daemon/scripts, then rebooted. `/dev/fb1` appeared as 240x240 @ 32bpp (stride 960), `card0` internal / `card1` external / `card2` msm, `bananarchy-coverctl STATUS` reported `backend=fb`, and the real framebuffer passed the whole state machine (open = all black, `LID CLOSED` = still black, `BUTTON` = clock/network/battery lit, `LID OPEN` = black again, `BUTTON` while open ignored, 3 s blank timeout = black with `visible=0`). Keypad, Xorg, dwm, backlight and `sxmo_state.sh` stayed healthy at the software level. Loading the mux modules in the initramfs also moved both panel probes from ~27 s to ~1.1 s and removed the `[pmOS-rd] /dev/fb0 did not appear after waiting 10 seconds` error.
@@ -57,7 +64,7 @@ Work since `a1108` has focused on reliable 2720 Flip hardware support and a repr
### Webarchy WebKit renderer
- **Unexpected WebKit error on the 2720 Flip**: `webarchy.so` used `setenv(..., "0")` for the WebKitGTK presence flags `WEBKIT_DISABLE_COMPOSITING_MODE`, `WEBKIT_DISABLE_DMABUF_RENDERER` and `WEBKIT_SKIA_ENABLE_CPU_RENDERING` while still requesting `WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS`. WebKitGTK treats the presence of those variables as "disable", so the WebProcess started with conflicting renderer state and died on every navigation, which WebKit reported as an "Unexpected WebKit error". `configureWebkitRenderer()` now unsets all three flags first, enables the CPU renderer only where required, and chooses `WEBKIT_HARDWARE_ACCELERATION_POLICY_NEVER` on `nokia,beatles` (and after the first WebProcess crash) while `nokia-argon` keeps `WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS` and WebGL. Create `~/.config/sxmo/webarchy_software_renderer` to force the software profile on any target. Load failures now report the GError domain/code in the browser status line instead of an opaque message. `scripts/check-rebuild.sh` guards the profile and the rebuilt `webarchy.so`.
- **Unexpected WebKit error on the 2720 Flip**: `webarchy.so` used `setenv(..., "0")` for the WebKitGTK presence flags `WEBKIT_DISABLE_COMPOSITING_MODE`, `WEBKIT_DISABLE_DMABUF_RENDERER` and `WEBKIT_SKIA_ENABLE_CPU_RENDERING` while still requesting `WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS`. WebKitGTK treats the presence of those variables as "disable", so the WebProcess started with conflicting renderer state and died on every navigation, which WebKit reported as an "Unexpected WebKit error". `configureWebkitRenderer()` now unsets all three flags first, enables the CPU renderer only where required, and chooses `WEBKIT_HARDWARE_ACCELERATION_POLICY_NEVER` on `nokia,beatles` (and after the first WebProcess crash) while `nokia-argon` keeps `WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS` and WebGL. Create `~/.config/sxmo/webarchy_software_renderer` to force the software profile on any target. Load failures now report the GError domain/code in the browser status line instead of an opaque message. `scripts/check-rebuild.sh` guards the profile and the rebuilt `webarchy.so`. Live testing later showed this renderer fix was necessary but not sufficient: the shipped rootfs also lacked compiled GSettings schemas (see the live WebKit GSettings schema fix above).
### Nokia 2720 Flip hardware
+1 -1
View File
@@ -293,7 +293,7 @@ All twenty-five phone applications are compiled as shared-object plugins (`/usr/
21. **Webarchy Web browser (`webarchy.so` / `webarchy` / `xwebarchy`)**:
- **Open**: select **Webarchy (Web)** from the System or Applications menu, or run `webarchy [url]` / `xwebarchy [url]`.
- **Engine, User-Agent, encoding, fonts, and multimedia**: built on WPE / WebKit (`webkit2gtk-4.1` + `libwpe-1.0`) with Adreno 304 hardware acceleration (`WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS` and WebGL) and 512 MB RAM pressure tuning (`160 MB` WebProcess cap). Uses `UTF-8` as the primary/default encoding when a server specifies none, configures Google **Noto** (`Noto Sans`, `Noto Serif`, `Noto Sans Symbols`, `Noto Sans Math`, `Noto Color Emoji`) as the default non-monospace web fonts while keeping **Fira Code** with OpenType ligatures (`calt`, `liga`) for monospace (`code`, `pre`, `kbd`, `samp`, `tt`), enables all HTML5/GStreamer multimedia playback (`MediaSource` / MSE, WebAudio, inline `<video>`/`<audio>`, and autoplay without user gesture requirements) by default, and uses `Mozilla/5.0 (Mobile; rv:123.0) Gecko/123.0 Firefox/123.0 KAIOS/4.0` as the default User-Agent (overridable via `Menu -> User-Agent Override` across 4 presets or a custom multi-tap string persisted in `~/.config/sxmo/webarchy_ua.txt`).
- **Renderer profile and troubleshooting**: `nokia-argon` and the other slab targets keep Adreno 304 hardware acceleration (`WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS` + WebGL). The 2720 Flip (`nokia,beatles`) starts on the CPU renderer (`WEBKIT_HARDWARE_ACCELERATION_POLICY_NEVER`) because its DMABUF/WebKit renderer cannot be initialised reliably; WebKitGTK's `WEBKIT_DISABLE_*` variables are presence flags, so they are never left set to `0`. Create `~/.config/sxmo/webarchy_software_renderer` to force the CPU profile on any target. If the WebProcess crashes on a hardware profile, Webarchy switches to software rendering once and reloads the page automatically. Load failures show the WebKit `GError` domain and code in the bottom status line, which makes an "Unexpected WebKit error" diagnosable instead of opaque.
- **Renderer profile and troubleshooting**: `nokia-argon` and the other slab targets keep Adreno 304 hardware acceleration (`WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS` + WebGL). The 2720 Flip (`nokia,beatles`) starts on the CPU renderer (`WEBKIT_HARDWARE_ACCELERATION_POLICY_NEVER`) because its DMABUF/WebKit renderer cannot be initialised reliably; WebKitGTK's `WEBKIT_DISABLE_*` variables are presence flags, so they are never left set to `0`. Create `~/.config/sxmo/webarchy_software_renderer` to force the CPU profile on any target. If the WebProcess crashes on a hardware profile, Webarchy switches to software rendering once and reloads the page automatically. Load failures show the WebKit `GError` domain and code in the bottom status line, which makes an "Unexpected WebKit error" diagnosable instead of opaque. The image build also compiles `usr/share/glib-2.0/schemas/gschemas.compiled` from the explicit `glib` and `gsettings-desktop-schemas` packages; if that file is missing, WebKit's network process logs `No GSettings schemas are installed on the system` and reports an internal error before a page can load.
- **Dual navigation modes (`[LNK]` Keypad Link Mode vs `[CUR]` Mouse Cursor Emulation Mode)**:
- **Keypad Link Mode (default)**: `Up` / `Down` scrolls vertically; `4` / `Left` and `6` / `Right` (or customizable Kopher keys in `~/.config/sxmo/smallweb_controls.tsv`) highlight the previous / next interactive element (`<a>`, `<button>`, `<input>`, `<select>`, `<textarea>`, `<video>`, `<audio>`) and display its label/URL in the bottom status bar; `5` / `Center OK` clicks the highlighted element or opens a NeoUI multi-tap text entry modal when an HTML `<input>` or `<textarea>` is selected (`Left softkey` or `Call` submits the form); `1` / `7` scrolls horizontally; `3` / `9` jumps to page top / bottom; `0` reloads; `#` cycles page zoom (`100%` / `85%` / `120%` / `70%`).
- **Mouse Cursor Emulation Mode (optional, off by default — toggle with `*#` chord or `Menu -> Toggle Mouse Cursor`)**: renders an on-screen pointer that moves with acceleration using `D-Pad` or `2`/`4`/`6`/`8` (plus diagonals `1`/`3`/`7`/`9`), automatically scrolls the page when pushed against the viewport edges, updates the bottom status bar with `(x,y)` coordinates and the hovered DOM element, and clicks or opens multi-tap input on `5` / `Center OK`.
+1 -1
View File
@@ -48,7 +48,7 @@ Instead of spawning slow shell scripts for everyday phone tasks, Bananarchy runs
- **IRCv3 client (`xirc` / `irc.so`)**: multi-server IRC client (`Buffers`, `Chat`, `Servers`) with OpenSSL TLS, IRCv3 capability negotiation (`CAP LS 302`: `sasl`, `server-time`, `message-tags`, `multi-prefix`, `away-notify`, `account-notify`, `chghost`, `cap-notify`), `SASL PLAIN` authentication, slash commands, and resident background mode with highlight vibration alerts; the default network is Abjects (`irc.abjects.net`, TLS port `6697`) auto-joining `#bananarchy`.
- **Tox / Trifa P2P messenger and audio call client (`xtox` / `tox.so`)**: encrypted P2P messenger (`Friends`, `Chat`, `My Tox ID`) built on `c-toxcore` (`libtoxcore.so.2`) with DHT + TCP relay bootstrap, friend requests, persistent message history, and `ToxAV` 48 kHz Opus voice calls integrated with `xcallscreen`.
- **Kopher SmallWeb browser (`xkopher` / `kopher` / `xsmallweb` / `smallweb.so`)**: multi-protocol SmallWeb client for **Gopher** (`gopher://`) with optional TLS (`gophers://`), **Gemini** (`gemini://`), **Spartan** (`spartan://`), and **Nex** (`nex://`), featuring WAP-style default keypad controls from [Kopher](https://code.luxferre.top/luxferre/kopher.git), user-adjustable keybindings (`~/.config/sxmo/smallweb_controls.tsv`), 10 bookmarks, custom homepage support, and link focus that always scrolls the viewport to the focused link in both wrapped and unwrapped modes.
- **Webarchy Web browser (`webarchy` / `xwebarchy` / `webarchy.so`)**: full-featured HTML5/CSS3/JS web browser built on WPE / WebKit (`webkit2gtk-4.1` + `libwpe-1.0`) with Adreno 304 hardware acceleration (`WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS`, WebGL, accelerated 2D canvas, and 512 MB RAM pressure tuning), default KaiOS 4.0 User-Agent (`Mozilla/5.0 (Mobile; rv:123.0) Gecko/123.0 Firefox/123.0 KAIOS/4.0`) with preset and custom User-Agent override (`~/.config/sxmo/webarchy_ua.txt`), `UTF-8` default encoding fallback, `Noto Sans` / `Noto Serif` (`font-noto` + `font-noto-emoji`) as the default non-monospace browser fonts and `Fira Code` with OpenType ligatures as the monospace font, full GStreamer multimedia (`MediaSource` / MSE, WebAudio, inline HTML5 `<video>`/`<audio>` autoplay without user gesture requirements), unobtrusive bookmarking (`*HTTPS`/`*HTTP` header badge, `*`+`0-9` save / `#`+`0-9` load chords, and bookmark manager), and dual navigation modes (keypad link-stepping mode with NeoUI multi-tap form input by default, plus an optional `*#` accelerated mouse cursor emulation mode), and a device-aware renderer profile: the 2720 Flip uses the WebKit CPU renderer (with automatic software fallback after a WebProcess crash) while the 8110 4G keeps Adreno 304 acceleration; `~/.config/sxmo/webarchy_software_renderer` forces the CPU profile on any target.
- **Webarchy Web browser (`webarchy` / `xwebarchy` / `webarchy.so`)**: full-featured HTML5/CSS3/JS web browser built on WPE / WebKit (`webkit2gtk-4.1` + `libwpe-1.0`) with Adreno 304 hardware acceleration (`WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS`, WebGL, accelerated 2D canvas, and 512 MB RAM pressure tuning), default KaiOS 4.0 User-Agent (`Mozilla/5.0 (Mobile; rv:123.0) Gecko/123.0 Firefox/123.0 KAIOS/4.0`) with preset and custom User-Agent override (`~/.config/sxmo/webarchy_ua.txt`), `UTF-8` default encoding fallback, `Noto Sans` / `Noto Serif` (`font-noto` + `font-noto-emoji`) as the default non-monospace browser fonts and `Fira Code` with OpenType ligatures as the monospace font, full GStreamer multimedia (`MediaSource` / MSE, WebAudio, inline HTML5 `<video>`/`<audio>` autoplay without user gesture requirements), unobtrusive bookmarking (`*HTTPS`/`*HTTP` header badge, `*`+`0-9` save / `#`+`0-9` load chords, and bookmark manager), and dual navigation modes (keypad link-stepping mode with NeoUI multi-tap form input by default, plus an optional `*#` accelerated mouse cursor emulation mode), and a device-aware renderer profile: the 2720 Flip uses the WebKit CPU renderer (with automatic software fallback after a WebProcess crash) while the 8110 4G keeps Adreno 304 acceleration; `~/.config/sxmo/webarchy_software_renderer` forces the CPU profile on any target. The image build also compiles the installed GSettings schema XML into `usr/share/glib-2.0/schemas/gschemas.compiled`; without that database WebKit's network process aborts with an internal error before any renderer policy can help.
- **GPS-only system time**: **Config -> Time source** switches from NTP to GNSS only (stopping `chronyd` and disabling every network-up NTP burst) and **Config -> Sync GPS time** steps the clock from a ModemManager GPS UTC value or a valid RMC fix, writes the RTC and refreshes the status bar. All GPS queries now resolve the GNSS-capable modem through `bananarchy-gps-modem.sh` instead of the ambiguous `mmcli -m any`, which fixes empty GPS data on the dual-SIM 2720 Flip. See `MANUAL.md` sections 5.6 and 5.8.
- **2720 Flip cover display behaviour**: the compiled `bananarchy-cover-idle` renderer keeps the external panel fully off while the flip is open, waits for a side-button `BUTTON` event when closed, then shows the clock, battery and compact main network indicators until the same **Config -> Screen blank** timeout expires with no further button press. `bananarchy-volume-keys` turns the external keys into trusted cover wake events, `bananarchy-cover-status.sh` publishes modem/Wi-Fi indicators from network events, and the daemon blocks in `poll()` with no timer while off. The external GC9305 DT is **opt-in** (`devices/nokia-beatles/qcom-msm8905-nokia-beatles-cover.dts`, built with `scripts/build-beatles-cover-panel.py`): a live test produced `/dev/fb1` (240x240, 32bpp) and the full renderer state machine, but the shared SPI bus darkened the main panel, so the shipping DTB stays on the verified single-panel layout. `FBIOBLANK` powers the cover fbdev down when it is off, `bananarchy-cover-diagnose.sh` reports the live panel state, `scripts/test-cover-idle.py` and `scripts/test-cover-dt.py` validate the renderer and both DT layouts on the host, and `scripts/build-beatles-no-cover-dtb.py` builds the single-panel rollback.
- **GPS reception test utility (`bananarchy-gps`) and OpenStreetMap navigator (`xgps` / `xmaps` / `xnav` / `gps.so`)**: CLI GNSS/GPS diagnostic tool (`bananarchy-gps status|enable|disable|nmea|watch`) and 3-tab NeoUI GPS navigator (`1:GPS Status`, `2:OSM Map`, `3:Nav/Search`) with live NMEA/QMI PDS satellite and 3GPP cell telemetry, interactive `240x212` OpenStreetMap slippy-map tile viewer with offline PNG tile cache (`~/.cache/sxmo/osm_tiles/`), Nominatim place search, saved waypoints, and OSRM turn-by-turn route geometry and step navigation.
+1
View File
@@ -167,6 +167,7 @@ EOF
util-linux \
sfdisk \
coreutils \
glib \
android-tools \
zstd >/dev/null
+1
View File
@@ -463,4 +463,5 @@ chown -R 10000:10000 "$TARGET_ROOTFS/home/user/.ssh" 2>/dev/null || true
chown -R 0:0 "$TARGET_ROOTFS/etc/skel/.ssh" "$TARGET_ROOTFS/root/.ssh" \
2>/dev/null || true
"$BASE_DIR/scripts/compile-gsettings-schemas.sh" "$TARGET_ROOTFS"
echo "Bananarchy overlay applied to $TARGET_ROOTFS for device $DEVICE."
+1 -1
View File
@@ -33,7 +33,7 @@ cp /etc/apk/repositories "$ROOTFS/etc/apk/repositories"
cp "$REPO"/keys/*.rsa.pub "$ROOTFS/etc/apk/keys/"
echo "[2/8] Installing host helper tools..."
apk add --no-cache python3 kmod openssl >/dev/null
apk add --no-cache python3 kmod openssl glib >/dev/null
echo "[3/8] Installing the Bananarchy armv7 package set..."
PKGS="$(grep -v '^[[:space:]]*#' "$PKGS_FILE" | grep -v '^[[:space:]]*$' | tr '\n' ' ')"
+18
View File
@@ -1137,6 +1137,24 @@ if command -v g++ >/dev/null 2>&1 && \
fail "host webarchy renderer profile test failed"
fi
echo "[check] Webarchy GSettings schemas..."
GS_SCHEMA_COMPILER="$BASE_DIR/scripts/compile-gsettings-schemas.sh"
if [ ! -x "$GS_SCHEMA_COMPILER" ]; then
fail "missing or non-executable scripts/compile-gsettings-schemas.sh"
fi
if ! command -v glib-compile-schemas >/dev/null 2>&1; then
fail "glib-compile-schemas is required to build WebKitGTK rootfs images"
fi
if ! command -v gsettings >/dev/null 2>&1; then
fail "gsettings is required to verify compiled WebKitGTK schemas"
fi
if [ ! -x "$BASE_DIR/scripts/test-webkit-gsettings.py" ]; then
fail "missing host unit test scripts/test-webkit-gsettings.py"
fi
if ! "$BASE_DIR/scripts/test-webkit-gsettings.py" >/dev/null 2>&1; then
fail "host WebKit GSettings schema test failed"
fi
echo "[check] Idle blank screenlock wiring..."
IDLE_BLANK="$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-idle-blank.sh"
IDLE_LOCK="$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-idle-lock.sh"
+41
View File
@@ -0,0 +1,41 @@
#!/bin/sh
# Compile the target rootfs's GSettings XML schemas.
# Apk installs packages with --no-scripts, so gschemas.compiled is not created
# by package triggers. WebKitGTK's network process aborts when the compiled
# schema database is missing, producing an "Unexpected WebKit error".
set -eu
BASE_DIR="$(cd "$(dirname "$0")/.." && pwd)"
TARGET_ROOTFS="${1:-${ROOTFS_DIR:-$BASE_DIR/rootfs}}"
SCHEMA_DIR="$TARGET_ROOTFS/usr/share/glib-2.0/schemas"
if [ ! -d "$SCHEMA_DIR" ]; then
echo "Error: GSettings schema directory is missing: $SCHEMA_DIR" >&2
exit 1
fi
schema_found=0
for schema_file in "$SCHEMA_DIR"/*.gschema.xml "$SCHEMA_DIR"/*.enums.xml; do
if [ -f "$schema_file" ]; then
schema_found=1
break
fi
done
if [ "$schema_found" -ne 1 ]; then
echo "Error: no GSettings schema XML files found in $SCHEMA_DIR" >&2
exit 1
fi
if ! command -v glib-compile-schemas >/dev/null 2>&1; then
echo "Error: glib-compile-schemas is required to compile $SCHEMA_DIR" >&2
exit 1
fi
glib-compile-schemas --strict --targetdir="$SCHEMA_DIR" "$SCHEMA_DIR" >/dev/null
if [ ! -s "$SCHEMA_DIR/gschemas.compiled" ]; then
echo "Error: glib-compile-schemas did not create gschemas.compiled" >&2
exit 1
fi
chmod 0644 "$SCHEMA_DIR/gschemas.compiled"
echo "[ok] compiled GSettings schemas in $SCHEMA_DIR"
+2
View File
@@ -30,6 +30,8 @@ font-noto
font-noto-emoji
frotz
git
glib
gsettings-desktop-schemas
gst-libav
gst-plugins-bad
gst-plugins-good
+96
View File
@@ -0,0 +1,96 @@
#!/usr/bin/env python3
"""Host test for the WebKitGTK GSettings schema build wiring.
The live WebKitNetworkProcess aborts with "No GSettings schemas are installed
on the system" when the rootfs contains schema XML but no gschemas.compiled.
This test guards the package/build wiring and compiles a synthetic schema with
the same helper used by apply-bananarchy-overlay.sh.
"""
import os
import pathlib
import shutil
import subprocess
import sys
import tempfile
BASE = pathlib.Path(__file__).resolve().parent.parent
HELPER = BASE / "scripts/compile-gsettings-schemas.sh"
PACKAGES = BASE / "scripts/rootfs-packages.txt"
OVERLAY = BASE / "scripts/apply-bananarchy-overlay.sh"
BOOTSTRAP = BASE / "scripts/bootstrap-rootfs-container.sh"
REBUILD = BASE / "rebuild-image.sh"
SCHEMA_XML = """<?xml version="1.0" encoding="UTF-8"?>
<schemalist>
<schema id="org.bananarchy.webkit.probe" path="/org/bananarchy/webkit/probe/">
<key name="enabled" type="b">
<default>true</default>
</key>
</schema>
</schemalist>
"""
def read(path):
return path.read_text(encoding="utf-8")
def main():
for tool in ("glib-compile-schemas", "gsettings"):
if not shutil.which(tool):
raise SystemExit("missing required host tool: %s" % tool)
if not HELPER.is_file() or not os.access(HELPER, os.X_OK):
raise SystemExit("missing executable scripts/compile-gsettings-schemas.sh")
helper = read(HELPER)
if "glib-compile-schemas --strict --targetdir" not in helper:
raise SystemExit("compile helper lost its strict targetdir compilation")
if "gschemas.compiled" not in helper:
raise SystemExit("compile helper no longer validates gschemas.compiled")
packages = {
line.strip()
for line in read(PACKAGES).splitlines()
if line.strip() and not line.lstrip().startswith("#")
}
for package in ("glib", "gsettings-desktop-schemas"):
if package not in packages:
raise SystemExit("rootfs package set is missing %s" % package)
overlay = read(OVERLAY)
if "scripts/compile-gsettings-schemas.sh" not in overlay:
raise SystemExit("overlay application no longer compiles GSettings schemas")
bootstrap = read(BOOTSTRAP)
if "apk add --no-cache python3 kmod openssl glib" not in bootstrap:
raise SystemExit("bootstrap container no longer installs glib host tools")
rebuild = read(REBUILD)
if " glib \\\n" not in rebuild:
raise SystemExit("image build container no longer installs glib host tools")
print("[ok] WebKit GSettings package and build wiring")
with tempfile.TemporaryDirectory(prefix="bananarchy-gsettings-") as tmp:
root = pathlib.Path(tmp)
schema_dir = root / "usr/share/glib-2.0/schemas"
schema_dir.mkdir(parents=True)
(schema_dir / "org.bananarchy.webkit.probe.gschema.xml").write_text(
SCHEMA_XML, encoding="utf-8")
result = subprocess.run(
[str(HELPER), str(root)], capture_output=True, text=True)
if result.returncode != 0:
raise SystemExit("schema compile failed:\n%s" % result.stderr.strip())
compiled = schema_dir / "gschemas.compiled"
if not compiled.is_file() or compiled.stat().st_size == 0:
raise SystemExit("helper did not produce gschemas.compiled")
env = os.environ.copy()
env["GSETTINGS_SCHEMA_DIR"] = str(schema_dir)
listed = subprocess.run(
["gsettings", "list-schemas"], env=env,
capture_output=True, text=True)
if listed.returncode != 0 or \
"org.bananarchy.webkit.probe" not in listed.stdout:
raise SystemExit("compiled schema database is not readable by gsettings")
print("[ok] WebKit GSettings schema compilation")
if __name__ == "__main__":
main()