# Bananarchy Linux ![Bananarchy Banner](artwork/banner-800x240.png) **Bananarchy** is a keypad-first Linux distribution hardforked from postmarketOS (`v26.06` / Alpine `edge` `armv7`), built for **Qualcomm MSM8905 (Snapdragon 205)** and **Qualcomm MSM8909 (Snapdragon 210)** smart feature phones with **240x320 QVGA non-touch displays** and **physical 12-key T9 keypads**. - **Current public release**: `a1025` (codenamed `argonaut`) — see the [changelog](./CHANGELOG.md) for release notes. - **Project philosophy**: read [The Bananarchy Manifesto](./MANIFESTO.md) for the background and goals behind the distribution. - **User and flashing guide**: see the [user manual](./MANUAL.md) for installation, keypad navigation, and hardware details. --- ## Key features ### System and hardware support - **Mainline Linux 6.12 kernel**: custom patches and out-of-tree drivers for Qualcomm QDSP6/Q6Voice audio routing, Dual-SIM modem control, the rear 2MP GalaxyCore `GC2395` camera (`/dev/video0`), the `SY7807` flashlight LED (`white:torch`), physical keypad/slider events, and clean PM8909 poweroff. - **Alpine Linux Edge base**: full access to the Alpine package ecosystem with `< 95 MB` idle RAM usage on 512 MB devices and full local root access out of the box. - **Pure X11 graphical stack**: cross-compiled **Xlibre** (`X11Libre/xserver`) display server paired with a customized **Sxmo (`sxmo-de-dwm`)** window manager (`240x320` vertical stack layout, Conky desktop clock and system status widget, `< 2 ms` slider/key wake latency, and zero Wayland overhead). ### Keypad-first user experience and native DWM plugins Instead of spawning slow shell scripts for everyday phone tasks, Bananarchy runs a suite of preloaded C/C++ plugins inside DWM that sleep at 0% CPU and open in `< 2 ms`: - **System and context menus (`dmenu`)**: instant full-screen 10-line vertical menus with live T9 filtering, built-in submenus, and hardware toggles. - **Global controls drawer (`xdrawer`)**: press **both softkeys together** from anywhere to adjust speaker, earpiece, and ringtone volume, ringer mode, flashlight, sound and microphone mute, screen brightness, and keypad backlight. - **Phone dialer (`xdialer`), call log (`xcalllog`), and call screen (`xcallscreen`)**: press any digit on the home screen to start dialing with live T9 contact matching, run interactive carrier USSD codes (`*100#`, etc.), or type `*#06#` to inspect both IMEIs. Incoming and active calls open a dedicated call screen with earpiece/speaker switching, microphone mute, DTMF keypad, and one-key call recording (`~/Recordings/`). - **Contacts (`xcontacts`) and SMS manager (`xsms`)**: full phonebook editor with direct Qualcomm QMI SIM card contact import and export across SIM 1 and SIM 2, paired with a threaded SMS conversation view and multi-tap message composer. - **Modem and Dual-SIM manager (`xmodem`)**: 4-tab cellular control center (`SIMs`, `Radio`, `AT`, `Log`) supporting physical SIM 1 / SIM 2 active slot switching, SIM PIN unlock and PUK unblock wizards, 2G/3G/4G radio mode selection, interactive USSD sessions, and a live AT command console. - **Networks and Bluetooth manager (`xnetworks`)**: 3-tab connectivity manager for Wi-Fi networks, WPA2 password entry, Wi-Fi hotspot, USB tethering, mobile data and APN editing, and Bluetooth pairing. - **File manager (`xfiles`), music and tracker player (`xmusic`), and camera (`xcamera`)**: keypad directory browser with built-in text and image viewers (plus one-click actions to play audio, preview images, set any image as wallpaper, or install any audio file as ringtone), a 3-tab music and chiptune tracker module player (`WAV`, `MP3`, `OGG`, `FLAC`, `Opus`, `MOD`, `XM`, `IT`, `S3M`, and more), and a live V4L2 camera viewfinder with digital zoom, flash/torch control, self-timer, and photo gallery. - **Themes (`xthemes`), wallpapers (`xwallpapers`), and ringtones (`xringtones`)**: installable `.Xresources` color and font themes (`~/.xthemes/*.xth`, 20 preinstalled schemes) with live zero-restart reload across the entire UI and terminal, alongside dedicated managers for desktop wallpapers and call ringtones/vibration. ### Input, terminal, and developer tools - **6-mode `fcitx5-t9` keypad input**: press `#` to cycle between `abc`, `Abc`, `ABC`, `Sym` (all 32 ASCII punctuation symbols), `Ctl` (`Ctrl` sequences, arrows, `PageUp`/`PageDown`, `F1`–`F12`), and `123` numeric modes with a fixed bottom candidate bar. - **First-class Linux terminal (`st`)**: patched with HarfBuzz OpenType ligatures (`Fira Code` as the default system and terminal font), XIM T9 input, and live theme reloading. - **On-device development and AI**: preinstalled `gcc`/`g++`, `make`, `git`, GNU `coreutils`, `nano`, `ed`, `sqlite3`, `perl`, `tcl`, the [Janet](https://janet-lang.org/) language and `jpm`, the [Bantam](https://bantam.luxferre.top/) coding agent, `frotz` (interactive fiction), and standalone X11 keypad games (`Snake` and `Tetris`). --- ## Supported MSM8909 and MSM8905 devices | Device | Codename | SoC | CPU / RAM | Display and panel firmware | Device tree (`.dtb`) | | :--- | :--- | :--- | :--- | :--- | :--- | | **Nokia 8110 4G** | `nokia-argon` | Qualcomm MSM8905 (SD205) | 2x Cortex-A7 @ 1.1 GHz, 512 MB | 2.4" 240x320 SPI (`nokia,argon-gc9305-v2-panel.bin`) | `qcom-msm8905-nokia-argon.dtb` | | **Nokia 2720 Flip** | `nokia-beatles` | Qualcomm MSM8905 (SD205) | 2x Cortex-A7 @ 1.1 GHz, 512 MB | 2.8" 240x320 SPI (`nokia,beatles-gc9305-panel.bin`) | `qcom-msm8905-nokia-beatles.dtb` | | **Nokia 800 Tough** | `nokia-tough` (`nokia-coconut`) | Qualcomm MSM8905 (SD205) | 2x Cortex-A7 @ 1.1 GHz, 512 MB | 2.4" 240x320 SPI (`nokia,coconut-gc9305-panel.bin`) | `qcom-msm8905-nokia-coconut.dtb` | | **Nokia 8000 4G** | `nokia-sparkler` | Qualcomm MSM8909 (SD210) | 4x Cortex-A7 @ 1.1 GHz, 512 MB | 2.8" 240x320 SPI (`nokia,sparkler-gc9307-hlt-28-panel.bin`) | `qcom-msm8909-nokia-sparkler.dtb` | | **Nokia 6300 4G** *(sibling)* | `nokia-leo` | Qualcomm MSM8909 (SD210) | 4x Cortex-A7 @ 1.1 GHz, 512 MB | 2.4" 240x320 SPI (`nokia,leo-gc9305-hlt-24-panel.bin`) | `qcom-msm8909-nokia-leo.dtb` | --- ## Repository structure ```text bananarchy/ ├── README.md # Project overview, repository layout, and build workflow ├── CHANGELOG.md # Public release build history ├── MANIFESTO.md # The Bananarchy Manifesto ├── MANUAL.md # Complete flashing, keypad, plugin, T9, camera, and modem manual ├── flash-edl.sh # Automated USB EDL flasher wrapper (sudo + ModemManager handling) ├── flash-edl.py # Multi-device Qualcomm Sahara/Firehose EDL flasher ├── rebuild-image.sh # Builds boot.img and partitioned MBR .img ├── chroot-shell.sh # Rootless Docker armv7 package and rootfs customization shell ├── artwork/ # Bananarchy master icon, generated icons, wallpapers, and splashes ├── bootloader/ # lk2nd secondary bootloader and Sahara/Firehose programmer (8110.mbn) ├── devices/ # Device definitions, DTBs, and MIPI-DBI panel init sequences ├── patches/ # Upstream kernel, EDL, Sxmo, Xlibre, and fcitx5-t9 patch sets ├── src/ │ ├── sxmo-dwm/ # Patched sxmo-dwm (240x320 bstack, Pango bar, softkey bar, and plugin API) │ ├── dwm-plugins/ # DWM plugins (dialer, calllog, callscreen, contacts, sms, files, camera, │ │ # themes, modem, networks, ringtones, wallpapers, music), theme.h, and runner │ ├── xdrawer/ # XDrawer global phone controls DWM plugin (xdrawer.so / xdrawer) │ ├── sxmo-dmenu/ # Resident DWM menu plugin (dmenu.so) and client (dmenu / xdmenu) │ ├── sxmo-st/ # Patched sxmo-st terminal with HarfBuzz Fira Code ligatures and XIM │ ├── xf86-input-libinput/ # Xlibre xf86-input-libinput DDX driver │ ├── xf86-video-fbdev/ # Xlibre xf86-video-fbdev fallback DDX driver │ ├── fcitx5-t9/ # 6-mode fcitx5-t9 keypad input method │ ├── games/ # Standalone keypad X11 games (snake.cpp, tetris.cpp) │ ├── leds-msm8905-torch/ # Kernel driver for SY7807 torch LED, WCD codec init, and PON shutdown │ └── msm8905-cam/ # Kernel V4L2 driver for GC2395 2MP rear camera (/dev/video0) ├── overlay/rootfs/ # System configuration overlay applied over the target rootfs ├── prebuilt/ # Pre-compiled armv7 binaries and kernel modules └── scripts/ # Cross-compilation, artwork generation, version, and overlay scripts ``` --- ## Build and customization workflow ### 1. Regenerate artwork assets Whenever `artwork/icon-large.png` is updated, regenerate all icons, `240x320` wallpapers, and animated boot splashes: ```bash ./scripts/generate-artwork.py ``` ### 2. Recompile core components (optional — prebuilts included) All components are pre-compiled in `prebuilt/` and `overlay/rootfs/`, and can be rebuilt from source at any time using rootless Docker (`alpine:3.24`): ```bash # Rebuild cross-compiled Xlibre (X11Libre/xserver) + libinput/fbdev DDX drivers ./scripts/build-xlibre.sh # Rebuild patched sxmo-st, sxmo-dmenu, sxmo-dwm, and all 14 C++ DWM plugins ./scripts/build-sxmo-x11.sh # Rebuild standalone X11 games (snake, tetris) ./scripts/build-games.sh # Rebuild multi-mode fcitx5-t9 input engine ./scripts/build-fcitx5-t9.sh # Fetch latest master from https://code.luxferre.top/luxferre/bantam-cpp and cross-compile Bantam AI agent ./scripts/build-bantam.sh # Rebuild Linux 6.12.1-msm8916 QDSP6/Q6Voice audio modules, torch LED module, camera module, and DTBs ./scripts/build-kernel-audio.sh ``` ### 3. Customize rootfs packages or configs ```bash ./chroot-shell.sh # Inside the container shell: # pkg-add # pkg-del # pkg-search ``` ### 4. Build flashable device images ```bash # Build for Nokia 8110 4G (default) ./rebuild-image.sh nokia-argon # Or build for Nokia 2720 Flip, Nokia 800 Tough, or Nokia 8000 4G: ./rebuild-image.sh nokia-beatles --mkinitfs ./rebuild-image.sh nokia-tough --mkinitfs ./rebuild-image.sh nokia-sparkler --mkinitfs ``` Output images are written to `images/`: - `images/bananarchy-.img`: partitioned MBR image with `pmOS_boot` + `pmOS_root` for EDL `userdata`, `fastboot flash userdata`, or a microSD card. --- ## Flashing via USB EDL (`05c6:9008`) ```bash sudo ./flash-edl.sh nokia-argon ``` See [MANUAL.md](MANUAL.md) for complete EDL, Fastboot, and microSD installation instructions, keypad navigation shortcuts, and the multi-mode T9 reference. ## Credits All Bananarchy-specific components were initially created by Luxferre and released into the public domain with no warranties. Alpine Linux, postmarketOS/Nura, and other third-party components are guided by their respective licensing terms.