2026-10-19 09:30:01 +03:00
# Bananarchy Linux
2026-10-19 09:23:54 +03:00

2026-10-19 11:03:01 +03:00
**Bananarchy** is a keypad-first Linux distribution hardforked from postmarketOS (`v26.06` / Alpine `edge` `armv7` ), purpose-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** .
2026-10-19 09:23:54 +03:00
2026-10-19 09:28:04 +03:00
See [The Bananarchy Manifesto ](./MANIFESTO.md ) for the rationale behind this entire project.
2026-10-20 21:15:16 +03:00
Bananarchy targets an ultra-lightweight **Sxmo X11 (`sxmo-de-dwm`)** environment (with all Wayland components removed) powered by a cross-compiled **Xlibre (`X11Libre/xserver` 25.2.0)** display server (`modesetting` KMS + `ShadowFB` Damage partial-rectangle SPI transfers, software cursor fallback, rootless `elogind` ), **patched `sxmo-dwm`** (`240x320` vertical `bstack` layout, 24px Pango status bar with overflow-protected right-aligned clock, direct C `SW_LID` slider and locked-key wake handling in `< 2 ms` ), **patched `sxmo-dmenu`** (`240x320` full-width 9-line vertical menu flush below the 24px top bar with `#383838` search bar, `#005577` prompt badge, and `XIM` `fcitx5-t9` text input in `< 15 ms` ), **patched `sxmo-st`** terminal (`pixelsize=15` ) with **HarfBuzz (`libharfbuzz`) OpenType ligature shaping** (`liga` , `calt` , `clig` , `dlig` ) and `XIM` support, and **non-Nerd `Fira Code` (`font-fira-code`) with ligatures** as the primary system and terminal font (with `DejaVu SansM Nerd Font` used strictly as an icon fallback). It features a sub-95 MB idle RAM footprint on 512 MB devices, full Qualcomm QDSP6/Q6Voice audio (loudspeaker, earpiece speaker, and internal/headset microphones with PM8909 WCD analog codec 2.8V micbias and +6 dB EAR PA gain), GSM/WCDMA/LTE modem routing (`ModemManager` + `q6voiced` ), rear 2MP camera support (`msm8905-cam` V4L2 driver for GalaxyCore `GC2395` + MSM8909 `CAMSS` on `/dev/video0` and `bananarchy-photo` CLI/Sxmo app), pre-integrated **Bantam** AI agent (`https://code.luxferre.top/luxferre/bantam-cpp` ), a complete on-device development & scripting stack (`git` , `gcc` /`g++` , `make` , `nano` , `janet` + `jpm` , `perl` + `IO::Socket::SSL` , `tcl` + `tcllib` /`tcl-tls` /`sqlite-tcl` , `sqlite` , `i2c-tools` , `v4l-utils` ), and a custom **6-mode `fcitx5-t9` input engine** with a fixed bottom candidate bar (`X=1, Y=290, W=238, H=30` ) supporting lowercase, one-shot Shift, Caps Lock, all 32 ASCII punctuation symbols, terminal control codes (`^A` -`^Z` , `Esc` , `Tab` , `F1` -`F12` ), and direct numeric entry with live top-bar mode indication (`[abc]` , `[Abc]` , `[ABC]` , `[Sym]` , `[Ctl]` , `[123]` ).
2026-10-19 09:23:54 +03:00
2026-10-19 09:30:01 +03:00
The current Bananarchy version is `v0.0.1` .
2026-10-19 09:23:54 +03:00
---
2026-10-19 11:03:01 +03:00
## Supported MSM8909 / MSM8905 devices
2026-10-19 09:23:54 +03:00
2026-10-19 11:03:01 +03:00
| Device | Codename | SoC | CPU / RAM | Display & panel firmware | Device tree (`.dtb` ) |
2026-10-19 09:23:54 +03:00
| :--- | :--- | :--- | :--- | :--- | :--- |
| **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` |
---
2026-10-19 11:03:01 +03:00
## Repository structure
2026-10-19 09:23:54 +03:00
```text
bananarchy/
├── README.md # Project architecture, build system, and quickstart guide
2026-10-19 09:28:04 +03:00
├── MANIFESTO.md # The Bananarchy Manifesto
2026-10-19 23:34:06 +03:00
├── MANUAL.md # Complete flashing, keypad, T9, camera, audio, Bantam, and modem manual
2026-10-19 09:23:54 +03:00
├── 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, MBR raw .img, and Android .sparse.img
├── chroot-shell.sh # Rootless Docker armv7 package & rootfs customization shell
├── artwork/ # Bananarchy master icon, generated icons, wallpapers, and splashes
│ ├── icon-large.png # Master 1024x1024 Bananarchy emblem
│ ├── icon-{512..16}.png # Downsampled RGB square icons
│ ├── icon-transparent-{512..32}.png # Alpha-keyed RGBA icons for UI themes
│ ├── favicon.ico # Multi-resolution ICO
│ ├── wallpaper-240x320.png / .jpg # Default Sxmo 240x320 portrait wallpaper
│ ├── wallpaper-240x320-centered.png/.jpg# Centered 240x320 portrait wallpaper
│ ├── wallpaper-320x240.png / .jpg # Landscape 320x240 QVGA wallpaper
│ ├── wallpaper-240x240.png # Square 240x240 wallpaper (Nokia 2720 Flip external display)
│ ├── splash-240x320.png / .ppm # 240x320 boot splash image
│ └── banner-800x240.png # Project header banner
├── bootloader/
│ ├── lk2nd-msm8909.img # lk2nd secondary bootloader for MSM8905/MSM8909
│ └── loaders/
│ └── 8110.mbn # Qualcomm Sahara/Firehose programmer (05c6:9008)
├── devices/ # Device definitions, DTBs, and MIPI-DBI panel init sequences
│ ├── common-msm8909/ # Shared udev keypad rules, WirePlumber S16LE, ALSA UCM2, zram
│ ├── nokia-argon/ # Nokia 8110 4G device package, DTS/DTB, and GC9305 panel init
│ ├── nokia-beatles/ # Nokia 2720 Flip device package, DTS/DTB, and GC9305 panel init
│ ├── nokia-tough/ # Nokia 800 Tough device package, DTS/DTB, and GC9305 panel init
│ └── nokia-sparkler/ # Nokia 8000 4G & 6300 4G device package, DTS/DTB, and GC9307/9305 init
├── patches/
│ ├── kernel/
│ │ ├── 0001-msm8909-qdsp6-voice-sound-nokia-argon-6.12.patch
│ │ ├── 0002-msm8905-nokia-beatles-and-coconut-dts.patch
│ │ └── config-bananarchy-msm8909.armv7
│ ├── edl/
│ │ └── 0001-edl-msm8909-32bit-elf-and-multi-cmd-firehose.patch
│ ├── sxmo/
│ │ └── 0001-bananarchy-sxmo-240x320-keypad-ui.patch
2026-10-20 21:15:16 +03:00
│ ├── xlibre/
│ │ ├── 0001-xlibre-msm8905-spi-drm-and-shared-vt.patch
│ │ ├── 0002-xf86-input-libinput-xlibre25.patch
│ │ └── 0003-xf86-video-fbdev-xlibre25.patch
2026-10-19 09:23:54 +03:00
│ └── fcitx5-t9/
│ └── 0001-bananarchy-multimode-t9-and-fcitx5-5.1.19.patch
├── src/
2026-10-20 21:15:16 +03:00
│ ├── sxmo-dwm/ # Patched sxmo-dwm (240x320 bstack, Pango bar, direct C SW_LID & locked-key wake)
│ ├── sxmo-dmenu/ # Patched sxmo-dmenu (240x320 vertical 9-line menu, #383838 search bar, XIM fcitx5-t9)
│ ├── sxmo-st/ # Patched sxmo-st terminal with HarfBuzz Fira Code ligature shaping & XIM
│ ├── xf86-input-libinput/ # X11Libre xf86-input-libinput DDX driver
│ ├── xf86-video-fbdev/ # X11Libre xf86-video-fbdev fallback DDX driver
2026-10-19 09:23:54 +03:00
│ ├── fcitx5-t9/ # C++20 source of Bananarchy's 6-mode fcitx5-t9 input method
2026-10-19 23:34:06 +03:00
│ ├── leds-msm8905-torch/ # Kernel driver for SY7807 rear torch LED, WCD codec init & PM8909 PON shutdown
│ └── msm8905-cam/ # Kernel V4L2 driver for GC2395 2MP rear camera & MSM8909 CAMSS (/dev/video0)
2026-10-19 09:23:54 +03:00
├── overlay/
2026-10-20 21:15:16 +03:00
│ └── rootfs/ # Complete Bananarchy rootfs overlay (OS branding, Sxmo X11, audio, camera, T9)
2026-10-19 09:23:54 +03:00
├── prebuilt/
2026-10-20 21:15:16 +03:00
│ ├── xlibre/ # Prebuilt armv7 Xlibre Xorg binary and modesetting/libinput/fbdev DDX modules
│ ├── sxmo-x11/ # Prebuilt armv7 patched dwm, dmenu, and st (with HarfBuzz ligatures)
2026-10-19 23:34:06 +03:00
│ ├── kernel-6.12.1-msm8916/ # Prebuilt QDSP6/Q6Voice .ko, torch .ko, camera .ko, and 5 device DTBs
2026-10-19 09:23:54 +03:00
│ ├── fcitx5-t9/ # Prebuilt armv7 libt9.so and fcitx5 addon/inputmethod configs
│ └── bantam/ # Prebuilt armv7 bantam AI agent binary
└── scripts/
├── generate-artwork.py # Generates all wallpapers, icons, and splashes from icon-large.png
├── mipi-dbi-cmd.py # Compiles MIPI-DBI panel .txt init sequences into .bin firmware
2026-10-20 21:15:16 +03:00
├── build-xlibre.sh # Cross-compiles Xlibre + xf86-input-libinput + xf86-video-fbdev for armv7 Cortex-A7
├── build-sxmo-x11.sh # Cross-compiles patched sxmo-st (HarfBuzz ligatures), sxmo-dmenu (XIM), and sxmo-dwm
2026-10-19 23:34:06 +03:00
├── build-kernel-audio.sh # Cross-compiles Linux 6.12.1-msm8916 QDSP6/torch/camera modules & DTBs
2026-10-19 09:23:54 +03:00
├── build-fcitx5-t9.sh # Cross-compiles src/fcitx5-t9 for armv7
├── build-bantam.sh # Fetches master from https://code.luxferre.top/luxferre/bantam-cpp & cross-compiles for armv7
├── apply-bananarchy-overlay.sh # Applies overlay, prebuilts, artwork, and device DTB to rootfs
└── configure-rootfs-from-scratch.sh # Full rootfs configuration script from base Alpine/pmOS packages
```
---
2026-10-19 11:03:01 +03:00
## Build & customization workflow
2026-10-19 09:23:54 +03:00
2026-10-19 11:03:01 +03:00
### 1. Regenerate artwork assets
2026-10-19 09:23:54 +03:00
Whenever `artwork/icon-large.png` is updated, regenerate all icons, `240x320` wallpapers, and boot splashes:
```bash
./scripts/generate-artwork.py
```
2026-10-19 11:03:01 +03:00
### 2. Recompile core components (optional — prebuilts included)
2026-10-19 09:23:54 +03:00
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
2026-10-20 21:15:16 +03:00
# Rebuild cross-compiled Xlibre (X11Libre/xserver) + libinput/fbdev DDX drivers
./scripts/build-xlibre.sh
# Rebuild patched sxmo-st (HarfBuzz Fira Code ligatures), sxmo-dmenu (XIM), and sxmo-dwm
./scripts/build-sxmo-x11.sh
2026-10-19 09:23:54 +03:00
# Rebuild multi-mode fcitx5-t9 input engine (src/fcitx5-t9 -> prebuilt/fcitx5-t9)
./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
2026-10-19 23:34:06 +03:00
# Rebuild Linux 6.12.1-msm8916 QDSP6/Q6Voice audio modules, torch LED module, camera module & DTBs
2026-10-19 09:23:54 +03:00
./scripts/build-kernel-audio.sh
```
2026-10-19 11:03:01 +03:00
### 3. Customize rootfs packages or configs
2026-10-19 09:23:54 +03:00
```bash
./chroot-shell.sh
# Inside the container shell:
# pkg-add <pkg>
# pkg-del <pkg>
# pkg-search <pattern>
```
2026-10-19 11:03:01 +03:00
### 4. Build flashable device images
2026-10-19 09:23:54 +03:00
```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/` :
2026-10-19 11:03:01 +03:00
- `images/bananarchy-<device>.img` (raw partitioned MBR image for EDL `userdata` or microSD card)
2026-10-19 09:23:54 +03:00
- `images/bananarchy-<device>.sparse.img` (Android sparse image for `fastboot flash userdata` )
2026-10-19 11:03:01 +03:00
- `images/boot-bananarchy-<device>.img` (kernel + initramfs + DTB boot image)
2026-10-19 09:23:54 +03:00
---
## Flashing via USB EDL (`05c6:9008`)
```bash
sudo ./flash-edl.sh nokia-argon
```
2026-10-19 11:03:01 +03:00
See [MANUAL.md ](MANUAL.md ) for complete EDL, Fastboot, and microSD installation instructions, keypad navigation shortcuts, and the multi-mode T9 reference.
2026-10-19 09:28:04 +03:00
## 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.