docs: rewrite feature overview and sync plugin reference in README and MANUAL
This commit is contained in:
@@ -10,50 +10,33 @@ This manual covers flashing, operating, and customizing **Bananarchy Linux** (Sx
|
||||
|
||||
---
|
||||
|
||||
## 1. What is prepared in this workspace
|
||||
## 1. System overview & workspace contents
|
||||
|
||||
### 1.1 System images (`images/`)
|
||||
- `images/bananarchy-nokia-argon.img` (linked as `images/nokia-argon-sxmo.img`) — raw partitioned image (`256 MiB` `ext2` `pmOS_boot` + `ext4` `pmOS_root`) ready for EDL flashing to `userdata` or raw `dd` to a microSD card.
|
||||
- `images/bananarchy-nokia-argon.sparse.img` (linked as `images/nokia-argon-sxmo.sparse.img`) — Android sparse image for `fastboot flash userdata`.
|
||||
- `images/boot-bananarchy-nokia-argon.img` (linked as `images/boot-nokia-argon-sxmo.img`) — standalone Android `boot.img` with Linux `6.12.1-msm8916`, initramfs, and appended DTB.
|
||||
- `images/bananarchy-nokia-argon.img` — raw partitioned image (`256 MiB` `ext2` `pmOS_boot` + `ext4` `pmOS_root`) ready for EDL flashing to `userdata` or raw `dd` to a microSD card.
|
||||
- `images/bananarchy-nokia-argon.sparse.img` — Android sparse image for `fastboot flash userdata`.
|
||||
- `images/boot-bananarchy-nokia-argon.img` — standalone Android `boot.img` with Linux `6.12.1-msm8916`, initramfs, and appended DTB.
|
||||
- Additional device images (`bananarchy-nokia-beatles.img`, `bananarchy-nokia-tough.img`, `bananarchy-nokia-sparkler.img`) can be generated at any time via `./rebuild-image.sh <device> --mkinitfs`.
|
||||
|
||||
### 1.2 Bootloader & EDL programmer (`bootloader/`)
|
||||
- `bootloader/lk2nd-msm8909.img` — secondary bootloader (`lk2nd`) providing Fastboot and `extlinux` boot discovery for MSM8905/MSM8909 devices.
|
||||
- `bootloader/loaders/8110.mbn` — signed Qualcomm Sahara/Firehose programmer (`05c6:9008`).
|
||||
|
||||
### 1.3 Integrated hardware & UX tweaks
|
||||
1. **Native 1:1 `240x320` resolution, cross-compiled Xlibre, `Fira Code` ligatures & ultra-low-latency Sxmo X11 UI**:
|
||||
- **Cross-compiled Xlibre (`X11Libre/xserver` 25.2.0)**: compiled specifically for ARMv7 Cortex-A7 (`-O2 -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -fno-plt -fomit-frame-pointer`) with all 3D/GLX/Glamor/VGA/DGA/XVideo bloat stripped out, rootless `elogind` device management, and `modesetting` KMS + `ShadowFB` (`drmModeDirtyFB` partial rectangle SPI updates) with automatic software cursor fallback on `/dev/dri/card0` (`panel-mipi-dbi`).
|
||||
- **Non-Nerd `Fira Code` with OpenType ligatures**: `Fira Code` (`font-fira-code`) is configured as the primary system and terminal font across Fontconfig, Xft, `st`, `dmenu`, `dwm`, `conky`, and `dunst`, with `DejaVu SansM Nerd Font` used strictly as a fallback for Private Use Area icon glyphs.
|
||||
- **Patched `sxmo-st` (`st`) with HarfBuzz ligatures & XIM**: patched with `libharfbuzz` (`hb.c`/`hb.h`) shaping (`liga`, `calt`, `clig`, `dlig`) so multi-character programming operators (`->`, `=>`, `!=`, `<=`, `>=`, `===`, `::`, `//`, `/*`) render as continuous ligatures at `pixelsize=18`, alongside full `XIM` (`fcitx5-t9`) input support.
|
||||
- **Patched `sxmo-dmenu` plugin (`dmenu.so` / `dmenu` / `xdmenu`) (`< 2 ms` popup/close)**: preloaded resident DWM plugin rendering a full-screen `240x296` 10-line vertical menu (positioned flush at `Y = 24..320` right below the 24px `dwm` bar, with a `26px` search bar and ten `27px` item rows) with a `#383838` top search bar, `#005577` prompt badge, `#1c1c1c` item list, `XIM` (`XSetLocaleModifiers("")`, `XSetICFocus`, `Xutf8LookupString`) for live `fcitx5-t9` search filtering and `#` mode switching, C-level focus preservation (`prevfocuswin`), built-in `< 0.5 ms` in-place Sxmo menu transitions (`Sys`, `Apps`, `Scripts`, `Modem`, `Config`, `Power`, `St`, `Nano`), and a `/tmp/dwm_plugin_dmenu.sock` IPC server for all `/usr/bin/dmenu` and `sxmo_dmenu.sh` calls.
|
||||
- **Patched `sxmo-dwm` (`dwm`) (`< 2 ms` display wake/unlock & native plugin system)**: configured for `240x320` (`bh = 24`, `#323232` top bar, `#005577` active tag/border, vertical `bstack` layout default, overflow-protected Pango status bar rendering keeping the right-aligned clock always visible, and a transparent-backgrounded bottom desktop softkey bar displaying `"Menu"` and `"Names"` over the wallpaper). Directly polls `/dev/input/by-path/platform-gpio-keys-event` (`SW_LID`) and intercepts locked-state wake keys (`XF86PowerOff`, `XF86PickupPhone`, `XF86KbdLcdMenu1`, `XF86KbdLcdMenu2`) in C to toggle `/sys/class/backlight/backlight/brightness` and `/sys/class/leds/white:kbd_backlight/brightness` in `< 2 ms` before running Sxmo state hooks asynchronously.
|
||||
- **Preloaded DWM plugins (`src/sxmo-dmenu/`, `src/dwm-plugins/` & `src/xdrawer/`, `< 2 ms` FIFO/socket wakeup & unified `.Xresources` theming)**: `dwm` dynamically loads `.so` plugins from `/usr/lib/dwm/plugins/` and `~/.local/lib/dwm/plugins/` (`dmenu.so`, `xdrawer.so`, `dialer.so`, `calllog.so`, `callscreen.so`, `contacts.so`, `sms.so`, `files.so`, `camera.so`, `themes.so`, `modem.so`, `networks.so`) and preloads them as resident background daemons (`dwm-plugin <name> --preload`) at startup. Each daemon keeps its X11 window, offscreen `Pixmap`, Xft/Pango layouts, and `stat()`-cached Sxmo TSV state initialized in memory while sleeping at 0% CPU on `/tmp/dwm_plugin_<name>.fifo`. Every UI element across `dwm`, `dmenu`, `st`, and all C++ plugins obeys a single unified color and font scheme configured via `~/.Xresources` (`theme.*`, `dwm.*`, `dmenu.*`, `st.*`), with proportional font sizing derived from `theme.baseFontSize` (`12px` / `15px` / `16px` / `18px` at default `15`) and instant live reload via `xthemes`.
|
||||
2. **Multi-mode `fcitx5-t9` keypad engine (`src/fcitx5-t9/`)**:
|
||||
- Supports 6 input modes cycled with `#` (`XF86NumericPound`): `abc`, `Abc`, `ABC`, `Sym`, `Ctl`, and `123`, updating the live top-bar status indicator (`[abc]`, `[Abc]`, `[ABC]`, `[Sym]`, `[Ctl]`, `[123]`) in real time.
|
||||
- Locks the candidate popup bar to the bottom of the screen (`X = 1, Y = 290, W = 238, H = 30`) with fixed-width 28-character monospace formatting (`Fira Code 9.5`), so neither the popup window nor individual letters ever jump when cycling through candidates.
|
||||
- Includes instant case toggling during preedit, full 32-character ASCII punctuation/symbol entry, terminal control sequences (`^A`–`^Z`, `Esc`, `Tab`, `F1`–`F12`), and a `550ms` long-press `*` `Ctrl+` modifier latch.
|
||||
3. **Bantam AI agent (`prebuilt/bantam/bantam`)**:
|
||||
- Fetched from the latest `master` branch of `https://code.luxferre.top/luxferre/bantam-cpp`, cross-compiled for `armv7`, and installed to `/usr/bin/bantam` and `/usr/local/bin/bantam` (with no default `.bantam.cfg` pre-created).
|
||||
- Integrated into the Sxmo **Apps** menu (`Applications -> Bantam`), launching in an `st` terminal with `$HOME` as its default working directory (`cd "$HOME" && sxmo_terminal.sh bantam`).
|
||||
4. **Mainline 6.12.1-msm8916 QDSP6 audio (loudspeaker, earpiece, MEMS & headset mics), voice call & LTE modem stack**:
|
||||
- Patched `q6core`, `q6afe`, `q6afe-dai`, `q6voice-dai`, `q6mvm`, and device trees (`VoiceMMode1` DAI + PM8909 WCD codec).
|
||||
- Automatic PM8909 WCD analog codec register initialization at boot (`CDC_A_MICB_1_VAL` `0xf141 = 0x60` for 2.8V internal MEMS microphone bias, and `CDC_A_RX_EAR_CTL` `0xf1c0 |= 0x20` for +6 dB earpiece PA gain).
|
||||
- WirePlumber `50-s16le.lua` (`S16LE` sample format enforcement), ALSA UCM2 profiles (`qdsp6.conf`, `HiFi.conf`, and `VoiceCall.conf`), `q6voiced` (`card=0, device=2`), `sxmo_audio.sh` / `sxmo_modemaudio.sh` PipeWire UCM profile switching, `sxmo_ob.sh` (`WOB_DISABLE_PLEDGE=1`), `rmtfs`, `msm-modem-uim-selection`, `msm8909-modem-wwan-port`, and `ModemManager` (`mmcli`).
|
||||
5. **Rear 2MP camera (`src/msm8905-cam/`, `xcamera` & `bananarchy-photo`) & SY7807 torch LED (`src/leds-msm8905-torch/`)**:
|
||||
- `msm8905-cam.ko`: powers PM8909 LDOs (`L2` 1.2V, `L6` 1.8V, `L17` 2.85V) and `CAMSS_MCLK0` (24 MHz on GPIO 26), configures the GalaxyCore `GC2395` MIPI CSI-2 sensor (`blsp_i2c3` `0x37`) and MSM8909 `CAMSS` (`CSIPHY0 -> CSID0 -> ISPIF -> VFE0 RDI0 -> VBIF -> CMA`), and exposes `/dev/video0` (`800x600` 24-bit `RGB3` V4L2 capture device).
|
||||
- `xcamera` (`camera.so`): preloaded native DWM camera viewfinder and gallery plugin launched directly from **Camera** in the Sxmo System menu (`@plugin:camera`).
|
||||
- `bananarchy-photo`: CLI and scriptable camera utility supporting instant JPEG/PNG photo capture, optional flash (`-f`), and `imv` photo viewing (`-v`).
|
||||
- `leds-msm8905-torch.ko`: exposes `/sys/class/leds/white:torch` (`GPIO 31`), configures WCD micbias/earpiece registers at boot, and hooks PM8909 `PON` clean shutdown.
|
||||
6. **Memory & swap tuning for 512 MB RAM**:
|
||||
- `384 MiB` ZSTD-compressed `zram0` swap (priority `100`) + `512 MiB` `/swapfile` (priority `10`), with `vm.swappiness=100` and `vm.page-cluster=0`.
|
||||
7. **Preinstalled on-device development & scripting stack**:
|
||||
- **C / C++ toolchain & CLI utilities**: `gcc`, `g++`, `musl-dev`, `make`, `git`, GNU `coreutils`, `nano` (default `$EDITOR`, configured system-wide via `/etc/nanorc` equivalent to `nano -FEDSMAGic/max%_T2`), `ed`, GNU `less` (default `$PAGER="less -RXF"`), `rlwrap`, `frotz` (Z-machine interactive fiction interpreter)
|
||||
- **Janet**: `janet`, `janet-dev`, `jpm` (Janet package manager)
|
||||
- **Perl**: `perl`, `perl-io-socket-ssl` (`IO::Socket::SSL`)
|
||||
- **Tcl & SQLite**: `tcl`, `tcl-lib` (`tcllib`), `tcl-tls`, `sqlite` (`sqlite3`), `sqlite-tcl` (`tcl-sqlite`)
|
||||
- **Hardware & media utilities**: `bananarchy-photo`, `v4l-utils` (`v4l2-ctl`), `i2c-tools`, `ffmpeg`, `mpv`, `imv`
|
||||
### 1.3 Core architecture highlights
|
||||
1. **Pure X11 (`Xlibre` + `sxmo-de-dwm`) for `240x320` QVGA displays**:
|
||||
- Uses a lightweight cross-compiled **Xlibre** server with `modesetting` KMS + partial-rectangle `ShadowFB` SPI updates and zero Wayland overhead.
|
||||
- **Patched `dwm`** provides a `240x320` vertical bottom-stack (`bstack`) layout, a 24px top status bar, a transparent `"Menu"` / `"Names"` desktop softkey bar, and direct `< 2 ms` C-level handling of physical slider (`SW_LID`) and wake keys.
|
||||
2. **Preloaded resident DWM plugins (`< 2 ms` wakeup)**:
|
||||
- Core phone applications (`dmenu`, `xdrawer`, `dialer`, `calllog`, `callscreen`, `contacts`, `sms`, `files`, `camera`, `themes`, `modem`, `networks`, `ringtones`, `wallpapers`) run as preloaded resident daemons (`dwm-plugin <name> --preload`) that sleep at 0% CPU and open instantaneously over FIFO/socket IPC.
|
||||
- All UI elements share a single **XRDB theming engine** (`~/.xthemes/*.xth` -> `~/.Xresources`) with 20 preinstalled color schemes, proportional font sizing (`theme.baseFontSize`), and live reload without restarting X11.
|
||||
3. **First-class terminal (`st`) & 6-mode `fcitx5-t9` keypad input**:
|
||||
- `st` is patched with HarfBuzz OpenType ligature shaping (`Fira Code` default) and live `.Xresources` reload.
|
||||
- `fcitx5-t9` provides 6 keypad input modes (`abc`, `Abc`, `ABC`, `Sym`, `Ctl`, `123` + `*` long-press `Ctrl+` latch) in a fixed bottom candidate bar (`Y = 290, H = 30`).
|
||||
4. **Mainline Linux 6.12 hardware drivers**:
|
||||
- **QDSP6 / Q6Voice audio & Dual-SIM modem**: Loudspeaker, boosted (+6 dB) earpiece, internal MEMS and headset microphones, `ModemManager` + `q6voiced` call audio routing, and Dual-SIM UIM slot switching (`msm-modem-uim-selection`).
|
||||
- **Rear 2MP camera & torch LED**: `msm8905-cam` V4L2 driver (`/dev/video0` `800x600` `RGB3` for GalaxyCore `GC2395`) and `leds-msm8905-torch` (`white:torch` + PM8909 clean poweroff).
|
||||
5. **Preinstalled developer & utility stack**:
|
||||
- `gcc`/`g++`, `make`, `git`, GNU `coreutils`, `nano`, `ed`, `less`, `rlwrap`, `janet` + `jpm`, `bantam` coding agent, `perl` (`IO::Socket::SSL`), `tcl` (`tcllib`, `tcl-tls`, `sqlite-tcl`), `sqlite3`, `frotz`, `ffmpeg`, `mpv`, `imv`, and standalone `snake` and `tetris` X11 games.
|
||||
|
||||
---
|
||||
|
||||
@@ -225,13 +208,13 @@ All fourteen core phone overlays are compiled as shared-object plugins (`/usr/li
|
||||
- **`3:Bluetooth`**: Toggle Bluetooth controller power (`doas rfkill unblock bluetooth` + `bluetoothctl power on/off`), scan for nearby devices (`*` or **Scan Nearby (`8s`)**), and manage paired/discovered devices (**Connect**, **Disconnect**, **Pair & Trust**, **Forget / Remove**).
|
||||
|
||||
13. **`Ringtones & Ringer Manager` (`ringtones.so` / `xringtones`) — Ringtone Browser, Live Preview & Ringer Settings**:
|
||||
- **Open**: Select **Ringtones** from the **Config**, **Audio**, or **Apps** menu, or run `xringtones`.
|
||||
- **Open**: Select **Ringtones** from the **System**, **Config**, **Audio**, or **Apps** menu, or run `xringtones`.
|
||||
- **Tabs (`Left`/`Right` or `1` / `2`)**:
|
||||
- **`1:Ringtones`**: Lists built-in synthesized ringtones (`/usr/share/sxmo/ringtones/*.wav` and `/usr/share/sxmo/ring.ogg`) alongside user audio files in `~/Ringtones/` and `~/Music/`. Press **`*`** or **Left softkey (`Play` / `Stop`)** to preview any ringtone live via `mpv`, and press **`Return` (`Set Ring`)** to save it as the active incoming call ringtone (`~/.config/sxmo/ringtone`).
|
||||
- **`2:Settings`**: Adjust **Ringer Mode** (`Ring + Vibrate`, `Ring Only`, `Vibrate Only`, `Silent`), **Ring Duration** (`10s`–`60s`), **Ring Loop Count** (`3x`–`50x`), **Vibrate Strength** (`Level 1`–`3`), and **Test Vibration** (`~/.config/sxmo/ringsettings`).
|
||||
|
||||
14. **`Desktop Wallpaper Manager` (`wallpapers.so` / `xwallpapers` / `xbackground`) — Live Preview & Wallpaper Selector**:
|
||||
- **Open**: Select **Wallpapers** from the **Config** or **Apps** menu, or run `xwallpapers` / `xbackground`.
|
||||
- **Open**: Select **Wallpapers** from the **System**, **Config**, or **Apps** menu, or run `xwallpapers` / `xbackground`.
|
||||
- **Controls**: Browses system wallpapers (`/usr/share/wallpapers/`) and user photos (`~/Pictures/Wallpapers/` and `~/Pictures/`) with a live decoded portrait thumbnail, image resolution, and file size. Press **`Left` / `Right`** (or `#`) to cycle the scaling mode (`Fill (Crop)`, `Scale (Stretch)`, `Fit (Max)`, `Center (1:1)`, `Tile`), press **`*`** or **Left softkey (`View [*]`)** to toggle a full-screen preview, and press **`Return` (`Apply`)** to apply the wallpaper immediately via `feh` and persist it in `~/.config/sxmo/wallpaper`.
|
||||
|
||||
#### 3.1.3 Standalone Keypad Games (`Snake` & `Tetris`)
|
||||
|
||||
Reference in New Issue
Block a user