Geminux combines a custom-patched Linux `7.3.5` kernel, pure-Linux MTK flasher, XLibre graphics server, patched suckless X11 stack, and custom C11 applications and daemons, packaged cleanly into signed Alpine APK packages so standard userspace updates continue working indefinitely.
- **Wi-Fi / Bluetooth CONSYS**: Staged `mt6797_wlan_core` and `btmt6797` drivers backed by NVRAM/factory firmware provisioning (`geminux-wifi-nvram` and `firmware-cache/mt6797/`), hardened by `0007` and `0009` for peer deauth, GTK rekey, and drop-free RX/TX buffer handling.
- **Modem / Telephony / eSIM / IMS**: Staged `mt6797-ccci-cldma` driver exposing `/dev/ccci_md_ctl`, `/dev/ccci_fs`, `/dev/ccci_rpc`, `/dev/ttyC0..3`, and `ccmni*` network interfaces with the 16-byte `struct mt6797_ccci_header` UAPI ([mt6797_ccci.h](file:///home/lux/proj/geminux/prebuilt/kernel/include/linux/mt6797_ccci.h)). `geminux-ccci-daemon` ([geminux-ccci-fs.c](file:///home/lux/proj/geminux/src/geminux-daemons/geminux-ccci-fs.c)) serves MD1 boot handshake v2, NVRAM/CCCI_FS file I/O, and RPC queries (`MD_STATE=READY`); `geminux-cellctl` ([geminux-cellctl.c](file:///home/lux/proj/geminux/src/geminux-daemons/geminux-cellctl.c)) handles physical SIM vs. ST33 eUICC `AT+ESIMS` slot switching, `lpac` AT-`CSIM`/`CGLA` APDU bridging for eSIM provisioning, and `ccmni*` LTE PDN bring-up; `geminux-imsd` ([geminux-imsd.c](file:///home/lux/proj/geminux/src/geminux-daemons/geminux-imsd.c)) provides 3GPP VoLTE over `ccmni*` and VoWiFi `SWu` IKEv2/IPsec via `strongswan`, ISIM/USIM MILENAGE AKA, kernel XFRM `ipsec-3gpp` with RFC 4303 userspace ESP fallback, SIP `REGISTER`/`INVITE`/`BYE`/`MESSAGE`, 3GPP `RP-DATA` SMS, and 20 ms `timerfd` AMR-NB/AMR-WB/G.711/DTMF RTP bridged to PipeWire/ALSA `VoiceCall` UCM2.
- **Boot, LUKS2 FDE & recovery**: Packed LK-compatible Android boot images (`images/boot-geminux.img`, `images/recovery-geminux.img`) built with `mkbootimg-osm0sis` (`16 MiB` boot slot ceiling, `512 KiB` DTB ceiling). The kernel includes built-in `BLK_DEV_DM=y`, `DM_CRYPT=y`, and ARMv8 AES-CE (`CRYPTO_AES_ARM64_CE_BLK=y`), and the initramfs bundles `cryptsetup` plus a standalone binary Gemini US keymap (`/etc/gemini-us.kmap`). With `DM_DISABLE_UDEV=1`, [src/initramfs/init](file:///home/lux/proj/geminux/src/initramfs/init) runs the off-mode charger guard, optionally unlocks LUKS2 `PARTLABEL=linux` into `/dev/mapper/geminux_root` (whole-device dynamic segment), checks ext4 non-interactively (`e2fsck -p </dev/null`), and expands the root filesystem via `resize2fs -f </dev/null` on first boot. [src/initramfs/init-recovery](file:///home/lux/proj/geminux/src/initramfs/init-recovery) exposes a USB NCM/RNDIS gadget shell (`172.16.42.1/24`) with LUKS2-aware `unlock-root`, `check-fs`, and `mount-root`.
- **XLibre (`25.x`)**: Cross-compiled against pure Alpine Edge `aarch64` sysroots with `modesetting_drv.so`, `fbdev_drv.so`, `libinput_drv.so`, and Panfrost Glamor EGL (`libglamoregl.so`) ([scripts/build-xlibre.sh](file:///home/lux/proj/geminux/scripts/build-xlibre.sh)). [10-geminux-gpu.conf](file:///home/lux/proj/geminux/overlay/rootfs/etc/X11/xorg.conf.d/10-geminux-gpu.conf) configures `modesetting` with `AccelMethod "none"`, `ShadowFB "true"`, `TearFree "true"`, `PageFlip "false"`, `SWcursor "true"`, and `Rotate "left"` to eliminate rotated DSI tearing and Glamor fence spin-wait CPU overhead while keeping Panfrost EGL/OpenGL 3D acceleration active for clients. Zero Wayland compositors (`sway`, `weston`, `phosh`, `xwayland`, etc.) are installed.
-`st` with HarfBuzz font shaping (`hb.c`) supporting Fira Code programming ligatures, Nerd Font fallback, mouse/two-finger wheel scrollback, immediate cursor redraw on `FocusIn`/`FocusOut` + unfocused cursor-blink timeout gating (paired with `dwm``FocusChangeMask`/`NotifyWhileGrabbed` guards and `libgemui` focus restore across grabs), and `SIGUSR1` live `.Xresources` reload.
-`dwm` with Pango/HarfBuzz multi-font bar (`drw.c`), EWMH/XEmbed system tray, touch-friendly `>= 68px` status bar, `Mod4 = Fn+Alt` + one-shot `Super_L` tap-latch, `Fn+F` (`XF86XK_UWB`/`XF86XK_RFKill`) hardware Airplane Mode binding, `SIGHUP` self-reexec, and `SIGUSR1``.Xresources` reload.
-`dmenu` with Pango/HarfBuzz, dynamic full-screen-height item rows (`68px` touch rows), and mouse/touch click selection, paired with `geminux-launcher` pinning the 11 GUI apps alongside `Webarchy Browser`, `Bantam AI agent`, and `Lynx Web Browser` in `st` (and wrapping `Terminal=true``.desktop` entries in `st -e`).
- **Webarchy & pure-C `gdk-pixbuf`**: [src/webarchy/webarchy.cpp](file:///home/lux/proj/geminux/src/webarchy/webarchy.cpp) provides a standalone C++20 `GTK3` + `WebKit2GTK-4.1` multi-tab browser adapted for the `2160x1080` ultrawide display (`1080x506` logical @ `GDK_SCALE=2`) with a collapsible flush-right vertical tab bar, DPI-scaled `pt` CSS reloaded live from `~/.Xresources` via `SIGUSR1`, persistent SQLite cookies/bookmarks under `~/.local/share/geminux/webarchy` and `~/.config/geminux/webarchy`, single-instance FIFO URL forwarding, and automatic CPU renderer fallback on WebProcess crash. [scripts/build-webarchy.sh](file:///home/lux/proj/geminux/scripts/build-webarchy.sh) also cross-compiles pure-C GNOME `gdk-pixbuf 2.42.12` (`-Dbuiltin_loaders=all`, zero `libglycin`/`librsvg`) so `gtk+3.0` and `gst-plugins-good` install cleanly without Rust, and [scripts/compile-gsettings-schemas.sh](file:///home/lux/proj/geminux/scripts/compile-gsettings-schemas.sh) compiles `/usr/share/glib-2.0/schemas/gschemas.compiled` for `WebKitNetworkProcess`.
-`geminux-powerd` — `epoll` over `/dev/input/event*` (`SW_LID`, `KEY_POWER`, keyboard/touch/pointer activity), filtered `KOBJECT_UEVENT` (`input`, `power_supply`, `drm`), `/run/geminux/powerd.sock`, and `timerfd`; caches CPUfreq/profile writes, tears down/reloads `mt6797_consys` across suspend (`-EBUSY` workaround with retry-hardened resume reload), manages persisted hardware Airplane Mode (`/var/lib/geminux/airplane-mode`, `/run/geminux/airplane-mode`) by unloading CONSYS Wi-Fi/BT kernel modules and placing MD1 in `AT+CFUN=4` while leaving `usb0` up, drives two-stage screensaver idle dim/lock/suspend timed from the last active user input, and resolves the active desktop user dynamically from UID `10000`.
-`geminux-statusd` — `epoll` over `signalfd` (`SIGUSR1`), `RTMGRP_LINK`/`RTMGRP_IPV4_IFADDR`, filtered `KOBJECT_UEVENT` (`power_supply`, `net`), `inotify`, and minute-aligned `timerfd`; displays `AIRPLANE` when hardware Airplane Mode is active and deduplicates root `WM_NAME` updates with zero child shell forks.
-`geminux-leds` — AW9120 back cover RGB controller driving `rgb:indicator-1..5` (default off when idle/full; `rgb:indicator-6` amber while charging; persistent manual override; `SIGPIPE`-safe socket server at `/run/geminux/leds.sock`).
-`geminux-ccci-daemon` — `epoll` over `/dev/ccci_*`, uevents, and `/run/geminux/ccci.sock`, serving MD1 boot HS v2, `CCCI_FS` NVRAM I/O, and RPC cleanly (idles if MD firmware is absent).
To keep Alpine Edge `aarch64` userspace freely updatable while locking all hardware-tuned components:
1. Build-time host Docker containers use `postmarketos/v26.06` solely for `gcc-aarch64`, `binutils-aarch64`, and `mkbootimg-osm0sis`. All `$SYSROOT` trees and the target `$ROOTFS` use only pure **Alpine Edge** (`main`, `community`, `testing`) plus the RSA-4096 signed local `@geminux` repository (`/var/lib/geminux/apk-repo`).
2. [scripts/package-local-apks.sh](file:///home/lux/proj/geminux/scripts/package-local-apks.sh) builds ten `.apk` packages via `apk mkpkg` and indexes them into `APKINDEX.tar.gz` via `apk mkndx`:
-`geminux-bantam` (`bantam` minimalist C++20 CLI AI agent with `kilo-auto/free` default model, built via [scripts/build-bantam.sh](file:///home/lux/proj/geminux/scripts/build-bantam.sh))
-`geminux-gsocket` (`gs-netcat` / `gsocket` NAT traversal toolkit built via [scripts/build-gsocket.sh](file:///home/lux/proj/geminux/scripts/build-gsocket.sh))
-`geminux-gdk-pixbuf` (pure-C zero-glycin `gdk-pixbuf 2.42.12` built via [scripts/build-webarchy.sh](file:///home/lux/proj/geminux/scripts/build-webarchy.sh))
-`geminux-webarchy` (`webarchy` / `xwebarchy` browser built via [scripts/build-webarchy.sh](file:///home/lux/proj/geminux/scripts/build-webarchy.sh))
-`geminux-config` (includes `/etc/mpv/mpv.conf`, `/etc/htoprc`, `/etc/skel/.config/htop/htoprc`, `/etc/skel/.lynx.cfg`, `/etc/skel/.apexrc`, `/etc/skel/.bashrc` with `GPG_TTY`, `/etc/profile.d/10-geminux-env.sh` adding `sbin` paths for `dosfstools`, and `/etc/init.d/geminux-sdcard` + `/etc/udev/rules.d/95-geminux-sdcard.rules` + `/usr/sbin/geminux-sdcard-mount` for boot/`eudev` hotplug automounting of `/dev/mmcblk1p1` or superfloppy `/dev/mmcblk1` into `/media/sdcard` with `UID 10000` + `plugdev``0660`/`0775` permissions across `vfat`, `exfat`, and POSIX `ext4`/`ext3`/`ext2`)
3.`/etc/apk/world` pins all ten with `name@geminux=version` and locks out Rust/Wayland/upstream overrides (with `librsvg`, `rav1e`/`rav1e-libs`, and `libdovi` whitelisted) via `!` constraints from [scripts/rootfs-prune-packages.txt](file:///home/lux/proj/geminux/scripts/rootfs-prune-packages.txt). Verified automatically by an ELF binary Rust scan, `apk upgrade --simulate`, and 9 host Python unit suites in [scripts/check-rebuild.sh](file:///home/lux/proj/geminux/scripts/check-rebuild.sh).
4.`/etc/apk/protected_paths.d/geminux.list` shields Geminux configuration directories across upgrades.
## Pure-Linux flasher and eMMC layout
[flash-mtk.py](file:///home/lux/proj/geminux/flash-mtk.py) uses vendored GPLv3 `mtkclient` + single-chip `MTK_DA_V5_MT6797.bin` to communicate directly over USB BROM/DA without MediaTek's proprietary GUI. Protected partitions in `LBA 0..0x6FFFF` (`preloader`, `nvram`, `proinfo`, `lk`, `tee1`, `md1img`, etc.) are backed up and write-blocked by default (`0x0E000000` protected boundary verified in [scripts/test-flash-mtk-gpt.py](file:///home/lux/proj/geminux/scripts/test-flash-mtk-gpt.py)).
On staged copies of `geminux-rootfs.img` (without mutating the build output), [scripts/geminux_accounts.py](file:///home/lux/proj/geminux/scripts/geminux_accounts.py) performs pure-Python `$6$` SHA-512 password hashing and offline `debugfs`/`e2fsck``/etc/{passwd,group,shadow}` + `/home/<username>` provisioning, and [scripts/geminux_luks.py](file:///home/lux/proj/geminux/scripts/geminux_luks.py) optionally wraps the staged ext4 image in an encrypted LUKS2 container via unprivileged host `cryptsetup reencrypt --encrypt --disable-locks`.