diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 0862891..f022ec5 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -4,41 +4,42 @@ Geminux combines a custom-patched Linux `7.3.5` kernel, pure-Linux MTK flasher, ## Kernel and MediaTek MT6797X support -- **Kernel tree**: Vanilla Linux `7.3.5` patched via [patches/kernel/](file:///home/lux/proj/geminux/patches/kernel) (`0001-ixoo-gemini-pda-mainline-7.3.5.patch`, `0002-mt6797-ccci-cldma-and-md1-domain.patch`, `0003-arm64-dts-mediatek-geminux-gemini-pda.patch`, `0004-gemini-ssd2092-display-and-touch.patch`, `0005-mt6797-consys-wifi-factory-firmware.patch`, `0006-mt6797-boot-cleanups.patch`, `0007-mt6797-wlan-peer-deauth-and-rekey.patch`). +- **Kernel tree**: Vanilla Linux `7.3.5` patched via [patches/kernel/](file:///home/lux/proj/geminux/patches/kernel) (`0001-ixoo-gemini-pda-mainline-7.3.5.patch`, `0002-mt6797-ccci-cldma-and-md1-domain.patch`, `0003-arm64-dts-mediatek-geminux-gemini-pda.patch`, `0004-gemini-ssd2092-display-and-touch.patch`, `0005-mt6797-consys-wifi-factory-firmware.patch`, `0006-mt6797-boot-cleanups.patch`, `0007-mt6797-wlan-peer-deauth-and-rekey.patch`, `0008-gemini-resume-wake-and-spm-standby.patch`, `0009-mt6797-wlan-drop-free-stability.patch`, `0010-mt6797-ccci-md1-boot-hs-v2-and-rpc.patch`), with `CONFIG_XFRM_USER=y` and `esp4`, `esp6`, `af_key`, and `xfrm_interface` modules enabled for 3GPP IMS IPsec. - **Graphics & display**: MediaTek DRM (`mediatek-drm`), Solomon Systech `SSD2092` DSI FHD+ panel & touchscreen, early-boot `simpledrm` (`DRM_SIMPLEDRM=y` + rotated `TER16x32` console), Mali-T880 `panfrost` GPU driver, and `sii902x` Slimport/HDMI bridge. -- **Wi-Fi / Bluetooth CONSYS**: Staged `mt6797_wlan_core` and `btmt6797` drivers backed by NVRAM/factory firmware provisioning (`geminux-wifi-nvram` and `firmware-cache/mt6797/`). -- **Modem / Telephony**: 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)). +- **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 = 68px` status bar, `Mod4 = Fn+Alt` + one-shot `Super_L` tap-latch, and `SIGUSR1` `.Xresources` reload. + - `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`). - **Zero-Rust notifications**: `dunst v1.12.2` compiled with `WAYLAND=0 DUNSTIFY=0` and custom pure-C PNG (`libpng` + Cairo) / JPEG (`libjpeg-turbo`) icon loader replacing `gdk-pixbuf` ([src/dunst-notify/](file:///home/lux/proj/geminux/src/dunst-notify/)), paired with a lightweight GDBus `notify-send` / `dunstify`. - **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`. -- **Zero-Rust media & `yt-dlp` stack**: [scripts/build-mpv.sh](file:///home/lux/proj/geminux/scripts/build-mpv.sh) cross-compiles `libplacebo v7.360.1` (`-Ddovi=disabled`), `FFmpeg n7.1.5` (private `/usr/lib/geminux-mpv` `RUNPATH`, zero `librav1e`), `mpv v0.40.0` (Panfrost X11 EGL + PipeWire/Pulse/ALSA), and `gst-libav 1.28.9` (`libgstlibav.so` linked against private `geminux-mpv` libs for WebKit HTML5 media), paired with `mpg123`, `openmpt123`, `python3`/`py3-pip`, and `yt-dlp-core` + `yt-dlp-ejs-rt-quickjs` (`quickjs`, avoiding `deno`/`py3-cryptography`). +- **Native media & `yt-dlp` stack**: Native Alpine Edge `mpv` (configured via [overlay/rootfs/etc/mpv/mpv.conf](file:///home/lux/proj/geminux/overlay/rootfs/etc/mpv/mpv.conf) for Panfrost X11 EGL, PipeWire/Pulse/ALSA, and `/tmp/geminux-mpv.sock` media-key IPC), `ffmpeg`/`ffprobe`, and `gst-libav` (for WebKit HTML5 media), paired with `mpg123`, `openmpt123`, `python3`/`py3-pip`, and `yt-dlp-core` + `yt-dlp-ejs-rt-quickjs` (`quickjs`, avoiding `deno`/`py3-cryptography`). ## Custom UI toolkit and zero-poll C11 daemons - **`libgemui.so`** ([src/libgemui/](file:///home/lux/proj/geminux/src/libgemui)): Double-buffered Cairo + Pango/HarfBuzz Xlib toolkit polling X11 events, `SIGUSR1` self-pipe for instant `.Xresources` reloads, dynamic timers, `MSG_NOSIGNAL`/drained Unix socket IPC (`gemui_unix_cmd`), and non-blocking extra FDs (such as V4L2 or `inotify`). -- **11 landscape HiDPI applications** ([src/geminux-apps/](file:///home/lux/proj/geminux/src/geminux-apps)): `geminux-control`, `geminux-audio`, `geminux-datetime`, `geminux-net` (5 tabs including active WLAN persistence and `DNS` configuration), `geminux-dialer`, `geminux-callscreen`, `geminux-sms`, `geminux-contacts`, `geminux-camera` (MT6797 Media Controller pipeline + 10-bit Bayer demosaic/AWB software ISP), `geminux-themes`, and `geminux-lock`. +- **11 landscape HiDPI applications** ([src/geminux-apps/](file:///home/lux/proj/geminux/src/geminux-apps)): `geminux-control` (including hardware Airplane Mode toggle), `geminux-audio`, `geminux-datetime`, `geminux-net` (5 tabs including Wi-Fi, Cellular/ST33 eSIM management, Airplane Mode banner, and `DNS` configuration), `geminux-dialer`, `geminux-callscreen`, `geminux-sms`, `geminux-contacts`, `geminux-camera` (MT6797 Media Controller pipeline + 10-bit Bayer demosaic/AWB software ISP), `geminux-themes`, and `geminux-lock`. - **Zero-poll C11 daemons** ([src/geminux-daemons/](file:///home/lux/proj/geminux/src/geminux-daemons)): - - `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), 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`; deduplicates root `WM_NAME` updates with zero child shell forks. + - `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-touchd` — XInput 2.2 multi-touch gesture daemon (2-finger tap/hold right-click, 3-finger middle-click, 2-finger scroll). - `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`; idles cleanly if MD firmware is absent. + - `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). + - `geminux-cellctl` & `geminux-imsd` — cellular/eSIM controller (`AT+ESIMS`, `lpac`, `ccmni*`) and event-driven IMS daemon (`/run/geminux/imsd.sock`). - `geminux-modem-ctl`, `geminux-bt-obex` (GLib `GMainLoop`/GDBus), `geminux-dnsctl`, `geminux-power-ctl`, `geminux-power-audit`, `geminux-tzctl`, `geminux-wifi-nvram`, and `geminux-checkpw`. -## APK package pinning and zero-Rust enforcement +## APK package pinning and package policy 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 eleven `.apk` packages via `apk mkpkg` and indexes them into `APKINDEX.tar.gz` via `apk mkndx`: +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-kernel-modules` - `geminux-xlibre` - `geminux-suckless` @@ -46,11 +47,10 @@ To keep Alpine Edge `aarch64` userspace freely updatable while locking all hardw - `geminux-ui` - `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-mpv` (`mpv v0.40.0`, `ffmpeg`, `ffprobe`, private `libplacebo`/FFmpeg shared libs, and `libgstlibav.so` built via [scripts/build-mpv.sh](file:///home/lux/proj/geminux/scripts/build-mpv.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/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 eleven with `name@geminux=version` and locks out Rust/Wayland/upstream overrides 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 8 host Python unit suites in [scripts/check-rebuild.sh](file:///home/lux/proj/geminux/scripts/check-rebuild.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 diff --git a/INSTALL.md b/INSTALL.md index c4f5340..19a2aa0 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -25,6 +25,7 @@ This generates: - `images/boot-geminux.img` (`<= 16 MiB` LK boot slot image containing `Image.gz`, `mt6797-gemini-pda-geminux.dtb`, and initramfs) - `images/recovery-geminux.img` (initramfs recovery image with USB NCM network shell) - `images/geminux-rootfs.img` (ext4 root filesystem labeled `geminux-root`) +- `images/geminux-rootfs.simg` (Android sparse copy of `geminux-rootfs.img` when `img2simg` is installed) - `images/SHA256SUMS` ## Step 2: Backup factory partitions and extract MediaTek firmware @@ -97,6 +98,7 @@ Additional flashing and offline image utilities: ## First boot and recovery notes +- Disconnecting/reflashing notes: eSIM profiles provisioned onto the hardware ST33 eUICC survive full eMMC rootfs reflashes (whereas flashing `linux` replaces `/` and `/home`). - Disconnect the USB-C cable and hold the **Esc** (power) button until the unit boots. - If flashed with `--encrypt`, the initramfs loads the standalone binary Gemini US keyboard map (`/etc/gemini-us.kmap`) on `tty1` and prompts for the LUKS2 passphrase before mounting `PARTLABEL=linux` via `cryptsetup open --allow-discards` as `/dev/mapper/geminux_root` (off-mode battery charging still runs before the unlock prompt). Because LUKS2 data segment 0 uses dynamic whole-device length, unlocking immediately maps the full `linux` partition. - On first boot, the initramfs runs non-interactive `e2fsck -p` and `resize2fs -f` (`` / `apn-set ` / `ims-set ` / `data-up [apn]` / `data-down` + - `doas geminux-cellctl esim-info` / `esim-list` / `esim-download 'LPA:1$smdp$matchingId' [confirm-code]` / `esim-enable <#idx|iccid>` / `esim-disable <#idx|iccid>` / `esim-delete <#idx|iccid>` / `esim-notif-process` - **Audio & date/time**: `geminux-audio` manages PipeWire sink/source routing, mute state, and per-stream volume via `wpctl`/`pactl`. `geminux-datetime` manages the system timezone (`geminux-tzctl`) and shows live Chrony NTP sync status. -- **Connectivity**: `geminux-net` manages Wi-Fi (`nmcli`, keeping the currently associated WLAN connection pinned at the top with a `Disconnect` control), 4G/CCCI state (`mmcli` + `/run/geminux/ccci.sock`), Bluetooth (`bluetoothctl` / `rfkill`), SiI9024 external HDMI output (`xrandr`), and the **`DNS` tab** (`geminux-dnsctl`, supporting router-provided Default DNS, Cloudflare, Google, RadicalDNS, Quad9, custom IPv4/IPv6 nameservers, and live DNS lookup testing). +- **Connectivity & Airplane Mode**: `geminux-net` manages Wi-Fi (`nmcli`, keeping the currently associated WLAN connection pinned at the top with a `Disconnect` control), 4G/eSIM/CCCI state (`geminux-cellctl` + `mmcli` + `/run/geminux/ccci.sock`), Bluetooth (`bluetoothctl` / `rfkill`), SiI9024 external HDMI output (`xrandr`), and the **`DNS` tab** (`geminux-dnsctl`, supporting router-provided Default DNS, Cloudflare, Google, RadicalDNS, Quad9, custom IPv4/IPv6 nameservers, and live DNS lookup testing). Hardware Airplane Mode (`Fn + F`, `geminux-control`, `geminux-net`, or `doas geminux-power-ctl airplane on|off|toggle|status`) unloads the CONSYS Wi-Fi/BT kernel modules and puts MT6797 MD1 into `AT+CFUN=4` flight mode across reboots while keeping USB NCM (`usb0`) active. - **Camera**: `geminux-camera` configures the MT6797 Media Controller pipeline (`ov5670`/`s5k4e6` -> `seninf` -> `camsv`), captures 10-bit Bayer (`SBGGR10`/`SGRBG10`) frames over V4L2 `mmap` with a pure-C demosaic + AWB software ISP, and writes native `libjpeg-turbo` stills to `~/Pictures/` and MJPEG-AVI clips to `~/Videos/`. - **System control, LEDs & lock**: `geminux-control` adjusts display backlight, PipeWire audio volume, MT6797X power profile (`eco`, `balanced`, `performance`), and AW9120 LEDs (`/run/geminux/leds.sock`). `geminux-leds` drives the 5-LED RGB back strip (`rgb:indicator-1..5`, defaulting to off when idle or 100% charged) plus `rgb:indicator-6` (amber while charging), supports calibrated presets including `rgb 160 16 0` ("Amber Warn"), and preserves manual `off` / `rgb` overrides across battery uevents. `geminux-lock` secures the X session using `doas -n /usr/sbin/geminux-checkpw`, resolving the desktop account dynamically from UID `10000` (`--username` or default `user`). `geminux-powerd` implements an input-driven screensaver: on battery it dims then triggers `geminux-lock` + suspend, while on AC / `performance` it triggers `geminux-lock` + backlight blanking (waking back onto the lock screen on key, touch, pointer, or power-button activity), timed strictly from the last active user input. - **microSD card automount (`/media/sdcard`)**: Automatically checks (`fsck.fat -a`, `fsck.exfat -p`, `e2fsck -p`) and mounts `/dev/mmcblk1p1` (or unpartitioned superfloppy `/dev/mmcblk1`) at `/media/sdcard` on boot (`geminux-sdcard` OpenRC service) and `eudev` hotplug (`95-geminux-sdcard.rules` -> `/usr/sbin/geminux-sdcard-mount`), cleanly unmounting on card removal or shutdown. Normal desktop users (`UID 10000` in `plugdev` `GID 106`) receive full read/write access: `0660` `plugdev` nodes on `/dev/mmcblk1*`, `uid=10000,gid=106,fmask=0002,dmask=0002,allow_utime=0020` on `vfat`/`exfat` (plus `quiet` on `vfat`), and `10000:106` ownership + `02775` setgid `plugdev` (`u+rwX,g+rwX`, preserving `lost+found`) on writable `ext4`/`ext3`/`ext2` cards. Inspect or manage manually via `geminux-sdcard-mount status`, `geminux-sdcard-mount remove` (before physical eject), or `geminux-sdcard-mount add` (auto-escalating via `doas`), and format/label/repair FAT cards with `dosfstools` (`mkfs.vfat`, `fsck.vfat`, `fatlabel`, included in default shell `PATH`). -- **CLI developer, media & security tools**: Zero-Rust `mpv` (`/etc/mpv/mpv.conf` with Panfrost X11 EGL + PipeWire) & `ffmpeg`/`ffprobe`, `mpg123`, `openmpt123`, `yt-dlp` (`yt-dlp-ejs-rt-quickjs`), `python3` & `pip3` (`py3-pip`), `gpg` (`gnupg` + `pinentry-curses` + `GPG_TTY`), `pass`, `dosfstools` (`mkfs.vfat`, `fsck.vfat`, `fatlabel`), `bantam` (`geminux-bantam`, minimalist C++20 OpenAI-compatible terminal AI agent defaulting to `kilo-auto/free`; see [src/bantam/README.md](file:///home/lux/proj/geminux/src/bantam/README.md)), `lynx` (configured via `~/.lynx.cfg` with `http://frogfind.com` start page, UTF-8, vi keys, mouse support, and persistent sessions/cookies), `gsocket` (`gs-netcat` plus `gs-key`/`gs-enter`/`gs-deploy-cmd`), `dtach` (`dmux`), `ovault`, default `htop` layout (`/etc/htoprc` / `~/.config/htop/htoprc`), `/etc/skel/.apexrc` defaults (`EDITOR='nano -FEDSMAGic/max%_T2'`, `PAGER='less -RXF'`, `nn`, `pg`, `l`, `defalias`/`toalias`/`savealias`, `rw`/`ee`, `sshed`, `dl`, `gcm`/`gp`/`gpm`, `sloc`, and `doas`-aware `pkgadd`/`pkgdel`/`pkgsearch`/`sysup`/`sysclean`), and `/etc/skel/.gitconfig` are preinstalled. +- **CLI developer, media & security tools**: Native Alpine Edge `mpv` (`/etc/mpv/mpv.conf` with Panfrost X11 EGL + PipeWire + `/tmp/geminux-mpv.sock` IPC), `ffmpeg`/`ffprobe`, `gst-libav`, `mpg123`, `openmpt123`, `yt-dlp` (`yt-dlp-ejs-rt-quickjs`), `python3` & `pip3` (`py3-pip`), `gpg` (`gnupg` + `pinentry-curses` + `GPG_TTY`), `pass`, `dosfstools` (`mkfs.vfat`, `fsck.vfat`, `fatlabel`), `bantam` (`geminux-bantam`, minimalist C++20 OpenAI-compatible terminal AI agent defaulting to `kilo-auto/free`; see [src/bantam/README.md](file:///home/lux/proj/geminux/src/bantam/README.md)), `lynx` (configured via `~/.lynx.cfg` with `http://frogfind.com` start page, UTF-8, vi keys, mouse support, and persistent sessions/cookies), `gsocket` (`gs-netcat` plus `gs-key`/`gs-enter`/`gs-deploy-cmd`), `dtach` (`dmux`), `ovault`, default `htop` layout (`/etc/htoprc` / `~/.config/htop/htoprc`), `/etc/skel/.apexrc` defaults (`EDITOR='nano -FEDSMAGic/max%_T2'`, `PAGER='less -RXF'`, `nn`, `pg`, `l`, `defalias`/`toalias`/`savealias`, `rw`/`ee`, `sshed`, `dl`, `gcm`/`gp`/`gpm`, `sloc`, and `doas`-aware `pkgadd`/`pkgdel`/`pkgsearch`/`sysup`/`sysclean`), and `/etc/skel/.gitconfig` are preinstalled. ## Maintaining Alpine Edge packages safely @@ -75,4 +78,4 @@ doas apk update doas apk upgrade ``` -Because custom Geminux components (`geminux-kernel-modules`, `geminux-xlibre`, `geminux-suckless`, `geminux-dunst`, `geminux-ui`, `geminux-bantam`, `geminux-gsocket`, `geminux-mpv`, `geminux-gdk-pixbuf`, `geminux-webarchy`, `geminux-config`) are exact-version pinned (`name@geminux=version`) in `/etc/apk/world` and Rust/Wayland/upstream overrides (`!rust`, `!cargo`, `!librsvg`, `!libglycin`, `!gdk-pixbuf`, `!deno`, `!py3-cryptography`, `!xorg-server`, `!linux-edge`, etc.) are negated in `/etc/apk/world`, normal Alpine Edge upgrades update upstream libraries, CLI tools, NetworkManager, ModemManager, PipeWire, and Mesa without overwriting custom patched binaries or pulling Rust packages. +Because custom Geminux components (`geminux-kernel-modules`, `geminux-xlibre`, `geminux-suckless`, `geminux-dunst`, `geminux-ui`, `geminux-bantam`, `geminux-gsocket`, `geminux-gdk-pixbuf`, `geminux-webarchy`, `geminux-config`) are exact-version pinned (`name@geminux=version`) in `/etc/apk/world` and Rust/Wayland/upstream overrides (`!rust`, `!cargo`, `!libglycin`, `!gdk-pixbuf`, `!deno`, `!py3-cryptography`, `!xorg-server`, `!linux-edge`, etc., with `librsvg`, `rav1e`/`rav1e-libs`, and `libdovi` whitelisted) are negated in `/etc/apk/world`, normal Alpine Edge upgrades update upstream libraries, CLI tools, NetworkManager, ModemManager, PipeWire, and Mesa without overwriting custom patched binaries or pulling disallowed Rust packages. diff --git a/POWER-OPTIMIZATION.md b/POWER-OPTIMIZATION.md index 46a7b6b..665dd87 100644 --- a/POWER-OPTIMIZATION.md +++ b/POWER-OPTIMIZATION.md @@ -19,10 +19,11 @@ Configured in [kernel/configs/geminux-mt6797x.config](file:///home/lux/proj/gemi All background system services avoid wake-up timers and polling loops: -- **`geminux-powerd`**: Sleeps indefinitely in `epoll_wait()` over `/dev/input/event*` (`SW_LID`, `KEY_POWER`, keyboard/touch/pointer activity), `KOBJECT_UEVENT` netlink (filtered strictly to `input`, `power_supply`, and `drm` subsystems), `/run/geminux/powerd.sock`, and a lazy-rearming `timerfd`; caches applied CPUfreq/profile state to avoid redundant sysfs and `/run/geminux/power-profile` rewrites; implements two-stage screensaver dimming and auto-lock/blank or suspend strictly timed from the last active user input (`dim_timeout_s` / `suspend_timeout_s`). Before entering `/sys/power/state`, it unloads `mt6797_consys` (and reverse dependents `btmt6797`, `radio_mt6797`, `gnss_mt6797`, `mac`) so `mt6797_consys_prepare()` no longer refuses suspend with `-EBUSY` and the `CONN`/`VCN*` rails power down cleanly; on resume, it asynchronously reloads them while preserving Bluetooth `rfkill` soft-block state and verifies `SW_LID` before re-enabling the backlight. +- **`geminux-powerd`**: Sleeps indefinitely in `epoll_wait()` over `/dev/input/event*` (`SW_LID`, `KEY_POWER`, keyboard/touch/pointer activity), `KOBJECT_UEVENT` netlink (filtered strictly to `input`, `power_supply`, and `drm` subsystems), `/run/geminux/powerd.sock`, and a lazy-rearming `timerfd`; caches applied CPUfreq/profile state to avoid redundant sysfs and `/run/geminux/power-profile` rewrites; implements two-stage screensaver dimming and auto-lock/blank or suspend strictly timed from the last active user input (`dim_timeout_s` / `suspend_timeout_s`). Before entering `/sys/power/state`, it unloads `mt6797_consys` (and reverse dependents `btmt6797`, `radio_mt6797`, `gnss_mt6797`, `mac`) so `mt6797_consys_prepare()` no longer refuses suspend with `-EBUSY` and the `CONN`/`VCN*` rails power down cleanly; on resume, it uses retry-hardened async CONSYS reload while preserving Bluetooth `rfkill` soft-block state and verifies `SW_LID` before re-enabling the backlight. In hardware Airplane Mode (`Fn+F` / `geminux-power-ctl airplane on`, persisted under `/var/lib/geminux/airplane-mode`), `geminux-powerd` keeps the CONSYS Wi-Fi/BT kernel modules unloaded and places MD1 in `AT+CFUN=4` flight mode while leaving `usb0` active. - **`geminux-statusd`**: Uses `signalfd` (`SIGUSR1`), `RTMGRP_LINK` netlink, filtered `KOBJECT_UEVENT` (`power_supply` and `net` only), `inotify`, and a minute-aligned `timerfd`; deduplicates root `WM_NAME` updates (`XStoreName`) so `dwm` never repaints when the bar text is unchanged, with zero child shell forks. +- **Display & terminal idle efficiency**: [10-geminux-gpu.conf](file:///home/lux/proj/geminux/overlay/rootfs/etc/X11/xorg.conf.d/10-geminux-gpu.conf) uses `AccelMethod "none"` + `ShadowFB "true"` + `TearFree "true"` for rotated `SSD2092` scanout, avoiding Glamor fence spin-waits, and `st` disables its cursor-blink timeout when unfocused so idle XLibre CPU usage remains near `0%`. - **`geminux-touchd`**: Event-driven XInput 2.2 multi-touch gesture recognizer with zero polling loops. -- **`geminux-ccci-daemon` & `geminux-modem-ctl`**: Event-driven `epoll_wait()` over `/dev/ccci_*`, filtered `ccci` uevents, AT port, and netlink; enter completely idle sleep when no modem activity is pending. +- **`geminux-ccci-daemon`, `geminux-modem-ctl` & `geminux-imsd`**: Event-driven `epoll_wait()` over `/dev/ccci_*`, filtered `ccci` uevents, AT port, `/run/geminux/imsd.sock`, SIP/ESP sockets, and netlink; enter completely idle sleep when no modem activity is pending, and `geminux-imsd` arms its 20 ms RTP `timerfd` strictly during active calls. - **`geminux-bt-obex`, `geminux-leds` & `geminux-lock`**: Event-driven GLib/GDBus and `epoll_wait()` + `KOBJECT_UEVENT` control without periodic polling. `geminux-leds` keeps the back AW9120 cover strip (`rgb:indicator-1..5`) off (`0 mA`) when idle or at 100% charge, lighting only `rgb:indicator-6` during active battery charging unless manually overridden. `geminux-lock` uses a `15 s` refresh interval once input is grabbed and redraws only when clock minute/date or battery status changes. ## Cluster gating and profiles diff --git a/README.md b/README.md index 9c4fe40..c8d31ae 100644 --- a/README.md +++ b/README.md @@ -1,44 +1,44 @@ # Geminux -Geminux is an Alpine Linux (`aarch64`, musl, OpenRC) distribution built specifically for the Planet Computers Gemini PDA (Wi-Fi + 4G, MediaTek MT6797X / Helio X27). It runs a patched Linux `7.3.5-geminux` kernel, XLibre Xorg with Panfrost Glamor 3D acceleration, a custom Pango/HarfBuzz-enabled DWM/st/dmenu desktop with Fira Code ligatures and Noto fonts, zero-poll C11 system daemons, 11 landscape HiDPI applications (`libgemui.so`), the ported Webarchy ultrawide `GTK3`/`WebKit2GTK` browser (`geminux-webarchy`, right-side vertical tab bar), zero-Rust `mpv` + `ffmpeg` (`geminux-mpv`), `mpg123`, `openmpt123`, `yt-dlp`, `python3`/`pip`, `gpg` (`gnupg`), `pass`, `dosfstools`, boot/hotplug `/media/sdcard` microSD automount (`geminux-sdcard` / `eudev`), the preinstalled `bantam` CLI AI agent (`geminux-bantam`, `kilo-auto/free` default), `lynx`, `gsocket`, and a pure-Linux MediaTek flasher with account provisioning and optional LUKS2 full-disk encryption. +Geminux is an Alpine Linux (`aarch64`, musl, OpenRC) distribution built specifically for the Planet Computers Gemini PDA (Wi-Fi + 4G, MediaTek MT6797X / Helio X27). It runs a patched Linux `7.3.5-geminux` kernel, XLibre Xorg with tear-free rotated `ShadowFB` scanout and Panfrost EGL/OpenGL 3D acceleration, a custom Pango/HarfBuzz-enabled DWM/st/dmenu desktop with Fira Code ligatures and Noto fonts, zero-poll C11 system daemons, 11 landscape HiDPI applications (`libgemui.so`), MT6797 MD1 cellular bring-up with ST33 eUICC eSIM provisioning (`lpac` + `geminux-cellctl`), 3GPP VoLTE / VoWiFi / SMS-over-IMS (`geminux-imsd`), hardware Airplane Mode (`Fn+F`), the ported Webarchy ultrawide `GTK3`/`WebKit2GTK` browser (`geminux-webarchy`, right-side vertical tab bar), native Alpine Edge `mpv` + `ffmpeg` + `gst-libav`, `mpg123`, `openmpt123`, `yt-dlp`, `python3`/`pip`, `gpg` (`gnupg`), `pass`, `dosfstools`, boot/hotplug `/media/sdcard` microSD automount (`geminux-sdcard` / `eudev`), the preinstalled `bantam` CLI AI agent (`geminux-bantam`, `kilo-auto/free` default), `lynx`, `gsocket`, and a pure-Linux MediaTek flasher with account provisioning and optional LUKS2 full-disk encryption. ## Key design goals - Pure Alpine Edge userspace updatable via `apk update && apk upgrade` -- Pinned kernel, modules, XLibre, suckless desktop, custom UI, Webarchy browser, pure-C `gdk-pixbuf`, `mpv`/`ffmpeg`, `bantam`, `gsocket`, and device configs across 11 local signed `@geminux` APK packages (`name@geminux=version`) -- Zero Rust-dependent packages preinstalled (verified across installed ELF binaries and blocked via `!` pins in `/etc/apk/world`) +- Pinned kernel, modules, XLibre, suckless desktop, custom UI, Webarchy browser, pure-C `gdk-pixbuf`, `bantam`, `gsocket`, and device configs (including `/etc/mpv/mpv.conf`) across 10 local signed `@geminux` APK packages (`name@geminux=version`) +- Non-whitelisted Rust/Wayland/override packages blocked via `!` pins in `/etc/apk/world` and verified via ELF scan (`librsvg`, `rav1e`/`rav1e-libs`, and `libdovi` are explicitly whitelisted for ecosystem compatibility and native `ffmpeg`/`mpv`/`gst-libav`) - Full eMMC occupancy for Linux (`geminux-root`) without Android dual-boot sharing, while strictly preserving the MediaTek protected region (`LBA 0..0x6FFFF`) - Optional LUKS2 + `dm-crypt` full-disk encryption (`--encrypt`, `aes-xts-plain64` with ARMv8 AES-CE, Argon2id) with early-boot `simpledrm` + Gemini matrix keyboard unlock and automatic first-boot ext4 expansion, alongside offline desktop/`root` credential provisioning during flashing -- Aggressive battery optimization from kernel (`HZ_100`, `RCU_LAZY`, `SUSPEND`, LZ4 `zram`, `SCHEDUTIL`) up to userspace (`epoll`-based zero-poll daemons, A72 big-cluster gating, WirePlumber idle suspend, Wi-Fi `powersave = 2` keeping CONSYS awake while associated and gated on toggle-off/suspend, Bluetooth disabled at boot, default-off cover LEDs, lid-close S3 suspend) +- Aggressive battery optimization from kernel (`HZ_100`, `RCU_LAZY`, `SUSPEND`, LZ4 `zram`, `SCHEDUTIL`) up to userspace (`epoll`-based zero-poll daemons, rotated `ShadowFB` + `st` cursor-blink gating, A72 big-cluster gating, WirePlumber idle suspend, Wi-Fi `powersave = 2` keeping CONSYS awake while associated and gated on toggle-off/suspend, Bluetooth disabled at boot, `Fn+F` hardware Airplane Mode cutting all radios while leaving `usb0` up, default-off cover LEDs, lid-close S3 suspend) ## Component stack | Subsystem | Implementation | Source / Script | | --- | --- | --- | -| Kernel & boot | Linux `7.3.5-geminux` + Gemini x27 patches (`SSD2092` DSI/touch, CONSYS Wi-Fi/BT + peer deauth/GTK rekey fix, CCCI/CLDMA, `sii902x`, `dm-crypt` LUKS2 initramfs) | [scripts/build-kernel.sh](file:///home/lux/proj/geminux/scripts/build-kernel.sh) | +| Kernel & boot | Linux `7.3.5-geminux` + Gemini x27 patches (`SSD2092` DSI/touch, CONSYS Wi-Fi/BT + peer deauth/GTK rekey/drop-free stability `0007`/`0009`, S3 resume/SPM `0008`, CCCI/CLDMA + MD1 boot HS v2/RPC `0002`/`0010`, XFRM/ESP IPsec, `sii902x`, `dm-crypt` LUKS2 initramfs) | [scripts/build-kernel.sh](file:///home/lux/proj/geminux/scripts/build-kernel.sh) | | Flasher & GPT | Vendored GPLv3 `mtkclient` + MT6797 DA + GPT builder + offline credential & LUKS2 provisioning | [flash-mtk.sh](file:///home/lux/proj/geminux/flash-mtk.sh), [flash-mtk.py](file:///home/lux/proj/geminux/flash-mtk.py), [scripts/geminux_accounts.py](file:///home/lux/proj/geminux/scripts/geminux_accounts.py), [scripts/geminux_luks.py](file:///home/lux/proj/geminux/scripts/geminux_luks.py) | -| Display server | XLibre Xorg 25.x (`Glamor`, `modesetting`, `fbdev`, `libinput`) | [scripts/build-xlibre.sh](file:///home/lux/proj/geminux/scripts/build-xlibre.sh) | -| Window manager & terminal | Patched `dwm` (Pango, systray, `.Xresources`, `Mod4`), `st` (HarfBuzz ligatures, focus cursor sync, wheel scrollback), full-height `dmenu` | [scripts/build-suckless.sh](file:///home/lux/proj/geminux/scripts/build-suckless.sh) | +| Display server | XLibre Xorg 25.x (`modesetting` `ShadowFB` + `TearFree` rotated 2D scanout alongside Panfrost Glamor/EGL 3D, `fbdev`, `libinput`) | [scripts/build-xlibre.sh](file:///home/lux/proj/geminux/scripts/build-xlibre.sh) | +| Window manager & terminal | Patched `dwm` (Pango, systray, `.Xresources`, `Mod4`, `Fn+F` Airplane Mode keybind, `SIGHUP` self-reexec), `st` (HarfBuzz ligatures, focus cursor sync & unfocused cursor-blink gating, wheel scrollback), full-height `dmenu` | [scripts/build-suckless.sh](file:///home/lux/proj/geminux/scripts/build-suckless.sh) | | Notifications | Pure-X11 zero-`gdk-pixbuf` `dunst v1.12.2` + custom GDBus `notify-send` / `dunstify` | [scripts/build-dunst.sh](file:///home/lux/proj/geminux/scripts/build-dunst.sh) | | Web browser | Webarchy C++20 `GTK3` + `WebKit2GTK-4.1` ultrawide browser (right-side vertical tab bar, DPI-scaled `.Xresources` `SIGUSR1` theming) + pure-C `gdk-pixbuf 2.42.12` | [scripts/build-webarchy.sh](file:///home/lux/proj/geminux/scripts/build-webarchy.sh), [scripts/compile-gsettings-schemas.sh](file:///home/lux/proj/geminux/scripts/compile-gsettings-schemas.sh) | -| UI & system daemons | `libgemui.so`, 11 landscape HiDPI apps (`geminux-net` DNS tab + active WLAN persistence), zero-poll C11 daemons (`geminux-dnsctl`, etc.) | [scripts/build-geminux-ui.sh](file:///home/lux/proj/geminux/scripts/build-geminux-ui.sh) | -| Media & CLI tools | Zero-Rust `mpv v0.40.0` (Panfrost X11 EGL + PipeWire), `ffmpeg`/`ffprobe`, `libgstlibav.so`, `mpg123`, `openmpt123`, `yt-dlp` (`quickjs`), `python3`/`pip3`, `gpg` (`gnupg`), `pass`, `dosfstools` (`mkfs.vfat`/`fsck.vfat`/`fatlabel`), `bantam`, `lynx`, `gsocket`, `.apexrc`, default `htoprc` | [scripts/build-mpv.sh](file:///home/lux/proj/geminux/scripts/build-mpv.sh), [scripts/build-bantam.sh](file:///home/lux/proj/geminux/scripts/build-bantam.sh), [scripts/build-gsocket.sh](file:///home/lux/proj/geminux/scripts/build-gsocket.sh) | -| Local APK repository | 11 signed `@geminux` `.apk` packages + `APKINDEX.tar.gz` | [scripts/package-local-apks.sh](file:///home/lux/proj/geminux/scripts/package-local-apks.sh) | +| UI & system daemons | `libgemui.so`, 11 landscape HiDPI apps (`geminux-net` Cellular/eSIM/DNS + Airplane Mode banner), zero-poll C11 daemons (`geminux-cellctl` dual-SIM / ST33 `lpac` eSIM + `ccmni*` PDN, `geminux-imsd` VoLTE/VoWiFi `SWu`/SMS-over-IMS/RTP, `geminux-powerd` hardware Airplane Mode, `geminux-dnsctl`, etc.) | [scripts/build-geminux-ui.sh](file:///home/lux/proj/geminux/scripts/build-geminux-ui.sh) | +| Media & CLI tools | Native Alpine Edge `mpv` (`/etc/mpv/mpv.conf` with Panfrost X11 EGL + PipeWire + IPC), `ffmpeg`/`ffprobe`, `gst-libav`, `mpg123`, `openmpt123`, `yt-dlp` (`quickjs`), `python3`/`pip3`, `gpg` (`gnupg`), `pass`, `dosfstools` (`mkfs.vfat`/`fsck.vfat`/`fatlabel`), `bantam`, `lynx`, `gsocket`, `.apexrc`, default `htoprc` | [scripts/build-bantam.sh](file:///home/lux/proj/geminux/scripts/build-bantam.sh), [scripts/build-gsocket.sh](file:///home/lux/proj/geminux/scripts/build-gsocket.sh), [overlay/rootfs/etc/mpv/mpv.conf](file:///home/lux/proj/geminux/overlay/rootfs/etc/mpv/mpv.conf) | +| Local APK repository | 10 signed `@geminux` `.apk` packages + `APKINDEX.tar.gz` | [scripts/package-local-apks.sh](file:///home/lux/proj/geminux/scripts/package-local-apks.sh) | | Full build & checks | Full image assembly + offline verification suite | [rebuild-image.sh](file:///home/lux/proj/geminux/rebuild-image.sh), [scripts/check-rebuild.sh](file:///home/lux/proj/geminux/scripts/check-rebuild.sh) | ## Repository layout - [kernel/](file:///home/lux/proj/geminux/kernel) and [patches/kernel/](file:///home/lux/proj/geminux/patches/kernel) — kernel manifest, MT6797X configuration, and Linux `7.3.5` patch queue - [src/](file:///home/lux/proj/geminux/src) — initramfs scripts, `st`, `dwm`, `dmenu`, `dunst-notify`, `bantam`, `webarchy`, `libgemui`, `geminux-apps`, and `geminux-daemons` -- [overlay/rootfs/](file:///home/lux/proj/geminux/overlay/rootfs) — OpenRC services (including `geminux-sdcard`), ALSA UCM2, XKB layout, console keymap, Xorg drop-ins, 21 `.xth` themes, PipeWire/WirePlumber, udev (`95-geminux-sdcard.rules` microSD automount to `/media/sdcard`), and NetworkManager configs +- [overlay/rootfs/](file:///home/lux/proj/geminux/overlay/rootfs) — OpenRC services (including `geminux-sdcard`), ALSA UCM2, XKB layout, console keymap, Xorg drop-ins, 21 `.xth` themes, PipeWire/WirePlumber, udev (`95-geminux-sdcard.rules` microSD automount to `/media/sdcard`), `/etc/mpv/mpv.conf`, and NetworkManager configs - [scripts/](file:///home/lux/proj/geminux/scripts) — cross-compilation builders, APK packager, rootfs bootstrapper, verification suite, and unit tests - [prebuilt/](file:///home/lux/proj/geminux/prebuilt) — cross-compiled `aarch64` staging tree (`images/` holds built boot, recovery, and ext4 rootfs images) ## Verification status vs. on-device testing -All cross-compiled binaries, kernel/DTB artifacts, GPT repartitioning logic, offline credential/LUKS2 builders, XKB keymap compilation, `.Xresources`-to-`dunstrc` theme syncing, MT6797 CCCI framing/handshake unit tests, zero-poll power policy tests, Webarchy renderer profile & WebKit GSettings schema tests, `dosfstools` & `/media/sdcard` automount tests, ELF binary Rust scan, and `apk upgrade --simulate` checks are verified automatically via [scripts/check-rebuild.sh](file:///home/lux/proj/geminux/scripts/check-rebuild.sh). +All cross-compiled binaries, kernel/DTB artifacts, GPT repartitioning logic, offline credential/LUKS2 builders, XKB keymap compilation, `.Xresources`-to-`dunstrc` theme syncing, MT6797 CCCI framing/handshake unit tests, 3GPP IMS/AKA/ESP/SIP/RTP protocol tests ([scripts/test-ims-protocol.py](file:///home/lux/proj/geminux/scripts/test-ims-protocol.py)), zero-poll power policy tests, Webarchy renderer profile & WebKit GSettings schema tests, `dosfstools` & `/media/sdcard` automount tests, ELF binary Rust scan, and `apk upgrade --simulate` checks are verified automatically via [scripts/check-rebuild.sh](file:///home/lux/proj/geminux/scripts/check-rebuild.sh). -Live hardware bring-up on a physical Planet Computers Gemini PDA (x27 Wi-Fi + 4G) has been verified for USB BROM/DA flashing, offline account provisioning, LUKS2 full-disk encryption unlock & first-boot ext4 resize, `SSD2092` FHD+ display & multi-touch gestures (`geminux-touchd`), CONSYS Wi-Fi/BT (`geminux-net` DNS tab & associated WLAN persistence), Webarchy ultrawide Panfrost GPU rendering, PipeWire audio, Media Controller + 10-bit Bayer camera ISP, AW9120 RGB back LEDs, Chrony online time sync, and USB NCM networking. Accessory/carrier-dependent checks (such as live cellular calls/SMS with a SIM card and external Slimport/HDMI monitors) are documented in the hardware checklist in [INSTALL.md](file:///home/lux/proj/geminux/INSTALL.md). +Live hardware bring-up on a physical Planet Computers Gemini PDA (x27 Wi-Fi + 4G) has been verified for USB BROM/DA flashing, offline account provisioning, LUKS2 full-disk encryption unlock & first-boot ext4 resize, `SSD2092` FHD+ display & multi-touch gestures (`geminux-touchd`), tear-free rotated `ShadowFB` scanout, lid-close S3 deep sleep & resume, CONSYS Wi-Fi/BT (`geminux-net` DNS tab & associated WLAN persistence), MT6797 MD1 baseband boot (`MD_STATE=READY`), ST33 eUICC / physical SIM slot switching & `geminux-imsd` standby, `Fn+F` hardware Airplane Mode radio teardown/restore, Webarchy ultrawide Panfrost GPU rendering, PipeWire audio, Media Controller + 10-bit Bayer camera ISP, AW9120 RGB back LEDs, Chrony online time sync, and USB NCM networking. Accessory/carrier-dependent checks (such as live VoLTE/VoWiFi calls/SMS with an active carrier SIM/eUICC profile and external Slimport/HDMI monitors) are documented in the hardware checklist in [INSTALL.md](file:///home/lux/proj/geminux/INSTALL.md). ## Quick start (host build and checks) @@ -47,7 +47,7 @@ Live hardware bring-up on a physical Planet Computers Gemini PDA (x27 Wi-Fi + 4G ./scripts/check-rebuild.sh ``` -To rebuild all cross-compiled components from scratch (kernel, XLibre, suckless desktop, dunst, UI apps/daemons, Bantam, gsocket, mpv/FFmpeg/`gst-libav`, pure-C `gdk-pixbuf`/Webarchy, signed `@geminux` APKs, and rootfs ext4): +To rebuild all cross-compiled components from scratch (kernel, XLibre, suckless desktop, dunst, UI apps/daemons, Bantam, gsocket, pure-C `gdk-pixbuf`/Webarchy, signed `@geminux` APKs, and rootfs ext4): ```sh ./rebuild-image.sh --rebuild-all --force-bootstrap diff --git a/overlay/rootfs/etc/apk/protected_paths.d/geminux.list b/overlay/rootfs/etc/apk/protected_paths.d/geminux.list index 152a42d..c940a8f 100644 --- a/overlay/rootfs/etc/apk/protected_paths.d/geminux.list +++ b/overlay/rootfs/etc/apk/protected_paths.d/geminux.list @@ -6,6 +6,7 @@ +etc/fonts/local.conf +etc/fstab +etc/modules-load.d/geminux.conf ++etc/mpv +etc/NetworkManager/conf.d +etc/pipewire/pipewire.conf.d +etc/wireplumber/wireplumber.conf.d diff --git a/prebuilt/mpv/etc/mpv/mpv.conf b/overlay/rootfs/etc/mpv/mpv.conf similarity index 100% rename from prebuilt/mpv/etc/mpv/mpv.conf rename to overlay/rootfs/etc/mpv/mpv.conf diff --git a/prebuilt/mpv/etc/mpv/encoding-profiles.conf b/prebuilt/mpv/etc/mpv/encoding-profiles.conf deleted file mode 100644 index 77a0d91..0000000 --- a/prebuilt/mpv/etc/mpv/encoding-profiles.conf +++ /dev/null @@ -1,224 +0,0 @@ -# -# mpv configuration file -# - -######################### -# encoding profile file # -######################### -# -# Note: by default, this file is installed to /etc/mpv/encoding-profiles.conf -# (or a different location, depending on --prefix). mpv will load it by -# default on program start. If ~/.mpv/encoding-profiles.conf exists, this file -# will be loaded instead. -# -# Then, list all profiles by -# mpv --profile=help | grep enc- -# -# The following kinds of encoding profiles exist: -# enc-a-*: initialize an audio codec including good defaults -# enc-v-*: initialize a video codec including good defaults -# enc-f-*: initialize a file format including good defaults, including -# selecting and initializing a good audio and video codec -# enc-to-*: load known good settings for a target device; this typically -# includes selecting an enc-f-* profile, then adjusting some -# settings like frame rate, resolution and codec parameters -# -# AFTER including a profile of these, you can of course still change -# options, or even switch to another codec. -# -# You can view the exact options a profile sets by -# mpv --show-profile=enc-to-hp-slate-7 -# -# Examples: -# mpv --profile=enc-to-dvdpal --o=outfile.mpg infile.mkv -# mpv --profile=enc-f-avi --vf=fps=30 --o=outfile.avi infile.mkv -# mpv --profile=enc-v-mpeg4 --ovcopts-add=qscale=7 --profile=enc-a-mp3 --oacopts-add=b=320k --o=outfile.avi infile.mkv - -################ -# audio codecs # -################ -[enc-a-aac] -profile-desc = "AAC (libfdk-aac or FFmpeg)" -oac = libfdk_aac,aac -oacopts = b=96k - -[enc-a-ac3] -profile-desc = "AC3 (FFmpeg)" -oac = ac3 -oacopts = b=448k - -[enc-a-mp3] -profile-desc = "MP3 (LAME)" -oac = libmp3lame -oacopts = b=128k - -[enc-a-vorbis] -profile-desc = "Vorbis (libvorbis or FFmpeg)" -oac = libvorbis,vorbis -oacopts = qscale=3 - -[enc-a-opus] -profile-desc = "Opus (libopus or FFmpeg)" -oac = libopus,opus -audio-samplerate = 48000 -oacopts = b=96k - -################ -# video codecs # -################ -[enc-v-h263] -profile-desc = "H.263 (FFmpeg)" -ovc = h263 -ovcopts = qscale=4 - -[enc-v-h264] -profile-desc = "H.264 (x264)" -ovc = libx264 -ovcopts = preset=medium,crf=23,threads=0 -# If you want to restrict the output video to something compatible with most -# hardware and basic decoders, add "profile=high,level=41" to ovcopts above and -# uncomment the following line to avoid errors when source video isn't yuv420p: -#vf-add = format=yuv420p - -[enc-v-mpeg2] -profile-desc = "MPEG-2 Video (FFmpeg)" -ovc = mpeg2video - -[enc-v-mpeg4] -profile-desc = "MPEG-4 Part 2 (FFmpeg)" -ovc = mpeg4 -ovcopts = qscale=4 - -[enc-v-vp8] -profile-desc = "VP8 (libvpx)" -ovc = libvpx -ovcopts = speed=0,lag-in-frames=8,slices=2,threads=0,b=2M,crf=10,qmin=0,qmax=36 - -[enc-v-vp9] -profile-desc = "VP9 (libvpx)" -ovc = libvpx-vp9 -ovcopts = speed=6,lag-in-frames=8,slices=2,threads=0,crf=18,qmin=0,qmax=36 - -########### -# formats # -########### -[enc-f-3gp] -profile-desc = "H.263 + AAC (for 3GP)" -of = 3gp -profile = enc-v-h263 -profile = enc-a-aac -ofopts = "" - -[enc-f-avi] -profile-desc = "MPEG-4 + MP3 (for AVI)" -of = avi -profile = enc-v-mpeg4 -profile = enc-a-mp3 -ofopts = "" - -[enc-f-mp4] -profile-desc = "H.264 + AAC (for MP4)" -of = mp4 -profile = enc-v-h264 -profile = enc-a-aac -## equivalent to using qt-faststart tool -## can be used to speed up seeking when streaming -# ofopts = movflags=+faststart - -[enc-f-webm] -profile-desc = "VP9 + Opus (for WebM)" -of = webm -profile = enc-v-vp9 -profile = enc-a-opus -ofopts = "" - -################## -# target devices # -################## -[enc-to-dvdpal] -profile-desc = "DVD-Video PAL, use dvdauthor -v pal -a ac3+en (MUST be used with 4:3 or 16:9 aspect, and 720x576, 704x576, 352x576 or 352x288 resolution)" -profile = enc-v-mpeg2 -profile = enc-a-ac3 -of = dvd -ofopts-append = packetsize=2048 -ofopts-append = muxrate=10080000 -vf-add = fps=25 -audio-samplerate = 48000 -ovcopts = g=15,b=6000000,maxrate=9000000,minrate=0,bufsize=1835008 - -[enc-to-dvdntsc] -profile-desc = "DVD-Video NTSC, use dvdauthor -v ntsc -a ac3+en (MUST be used with 4:3 or 16:9 aspect, and 720x480, 704x480, 352x480 or 352x240 resolution)" -profile = enc-v-mpeg2 -profile = enc-a-ac3 -of = dvd -ofopts-append = packetsize=2048 -ofopts-append = muxrate=10080000 -vf-add = fps="24000/1001" -audio-samplerate = 48000 -ovcopts = g=18,b=6000000,maxrate=9000000,minrate=0,bufsize=1835008 - -[enc-to-nok-n900] -profile-desc = "MP4 for Nokia N900" -profile = enc-f-mp4 -# DW = 800, DH = 480, SAR = 1 -vf-add = lavfi=graph="scale=floor(min(min(800\,dar*480)\,in_w*max(1\,sar))/2+0.5)*2:floor(min(min(800/dar\,480)\,in_h*max(1/sar\,1))/2+0.5)*2,setsar=sar=1" -ovcopts-append = profile=baseline -ovcopts-append = level=30 -ovcopts-append = maxrate=10000k -ovcopts-append = bufsize=10000k -ovcopts-append = rc_init_occupancy=9000k -ovcopts-append = refs=5 - -[enc-to-nok-6300] -profile-desc = "3GP for Nokia 6300" -profile = enc-f-3gp -vf-add = fps=25 -vf-add = lavfi=graph="scale=176:144" -audio-samplerate = 16000 -audio-channels = 1 -oacopts-add = b=32k - -[enc-to-hp-slate-7] -profile-desc = "MP4 for HP Slate 7 (1024x600, crazy aspect)" -profile = enc-f-mp4 -ovcopts-add = profile=high -# DW = 1024, DH = 600, DAR = 97:54 (=> SAR = 2425:2304) -vf-add = lavfi=graph="scale=floor(min(1024*min(1\,dar/(97/54))\,in_w)/2+0.5)*2:floor(min(600*min((97/54)/dar\,1)\,in_h)/2+0.5)*2,setsar=sar=sar/(2425/2304)" - -# Advanced scaling for specific output devices - how it works: -# DW = display width (px) (1024) -# DH = display height (px) (600) -# SAR = display sample aspect ratio, i.e. DAR * DH / DW (2425:2304) -# DAR = display aspect ratio, i.e. SAR * DW / DH (97:54) -# Variant: zoomed out -# vf-add = lavfi=graph="scale=floor(min(DW*min(1\,dar/DAR)\,in_w*max(1\,sar/SAR))/2+0.5)*2:floor(min(DH*min(DAR/dar\,1)\,in_h*max(SAR/sar\,1))/2+0.5)*2,setsar=sar=1" -# Variant: zoomed in -# vf-add = lavfi=graph="scale=floor(min(DW*max(1\,dar/DAR)\,in_w*max(1\,sar/SAR))/2+0.5)*2:floor(min(DH*max(DAR/dar\,1)\,in_h*max(SAR/sar\,1))/2+0.5)*2,setsar=sar=1" -# How it works: -# 1a: DW, DH*dar/DAR - fit to display width -# 1b: DH*DAR/dar, DH - fit to display height -# 1: the min of 1a and 1b these (i.e. fit inside both width and height); for zoomed in view, use the max -# 2a: in_w, in_h*SAR/sar - fit to original width -# 2b: in_w*sar/SAR, in_h - fit to original height -# 2: the max of 2a and 2b (i.e. avoid enlarging both dimensions - let HW scaling handle this) -# output: the min of 1 and 2 (i.e. fulfill both constraints) -# setsar=sar=1 to prevent scaling on the device (skip this if the device actually wants the proper SAR to be specified for not performing needless scaling) -# -# Simplified special case for SAR == 1, DAR == DW/DH: -# Variant: zoomed out -# vf-add = lavfi=graph="scale=floor(min(min(DW\,dar*DH)\,in_w*max(1\,sar))/2+0.5)*2:floor(min(min(DW/dar\,DH)\,in_h*max(1/sar\,1))/2+0.5)*2,setsar=sar=1" -# Variant: zoomed in -# vf-add = lavfi=graph="scale=floor(min(max(DW\,dar*DH)\,in_w*max(1\,sar))/2+0.5)*2:floor(min(max(DW/dar\,DH)\,in_h*max(1/sar\,1))/2+0.5)*2,setsar=sar=1" -# setsar=sar=1 to prevent nasty almost-1 SAR to be passed to the codec due to the rounding which can fail -# -# If the device supports file SAR properly, we can make use of it to avoid -# upscaling. The setsar=sar=sar/SAR at the end serves to fake the SAR for devices that don't know their own display's SAR. -# Variant: zoomed out -# vf-add = lavfi=graph="scale=floor(min(DW*min(1\,dar/DAR)\,in_w)/2+0.5)*2:floor(min(DH*min(DAR/dar\,1)\,in_h)/2+0.5)*2,setsar=sar=sar/SAR" -# Variant: zoomed in -# vf-add = lavfi=graph="scale=floor(min(DW*max(1\,dar/DAR)\,in_w)/2+0.5)*2:floor(min(DH*max(DAR/dar\,1)\,in_h)/2+0.5)*2,setsar=sar=sar/SAR" -# Simplified special case for SAR == 1, DAR == DW/DH: -# Variant: zoomed out -# vf-add = lavfi=graph="scale=floor(min(min(DW\,dar*DH)\,in_w)/2+0.5)*2:floor(min(min(DW/dar\,DH)\,in_h)/2+0.5)*2" -# Variant: zoomed in -# vf-add = lavfi=graph="scale=floor(min(max(DW\,dar*DH)\,in_w)/2+0.5)*2:floor(min(max(DW/dar\,DH)\,in_h)/2+0.5)*2" diff --git a/prebuilt/mpv/usr/bin/ffmpeg b/prebuilt/mpv/usr/bin/ffmpeg deleted file mode 100755 index 2329b81..0000000 Binary files a/prebuilt/mpv/usr/bin/ffmpeg and /dev/null differ diff --git a/prebuilt/mpv/usr/bin/ffprobe b/prebuilt/mpv/usr/bin/ffprobe deleted file mode 100755 index 320457d..0000000 Binary files a/prebuilt/mpv/usr/bin/ffprobe and /dev/null differ diff --git a/prebuilt/mpv/usr/bin/mpv b/prebuilt/mpv/usr/bin/mpv deleted file mode 100755 index f3317ec..0000000 Binary files a/prebuilt/mpv/usr/bin/mpv and /dev/null differ diff --git a/prebuilt/mpv/usr/lib/geminux-mpv/libavcodec.so.61 b/prebuilt/mpv/usr/lib/geminux-mpv/libavcodec.so.61 deleted file mode 120000 index 4c9502c..0000000 --- a/prebuilt/mpv/usr/lib/geminux-mpv/libavcodec.so.61 +++ /dev/null @@ -1 +0,0 @@ -libavcodec.so.61.19.101 \ No newline at end of file diff --git a/prebuilt/mpv/usr/lib/geminux-mpv/libavcodec.so.61.19.101 b/prebuilt/mpv/usr/lib/geminux-mpv/libavcodec.so.61.19.101 deleted file mode 100755 index 3f122f2..0000000 Binary files a/prebuilt/mpv/usr/lib/geminux-mpv/libavcodec.so.61.19.101 and /dev/null differ diff --git a/prebuilt/mpv/usr/lib/geminux-mpv/libavdevice.so.61 b/prebuilt/mpv/usr/lib/geminux-mpv/libavdevice.so.61 deleted file mode 120000 index 68dc2c2..0000000 --- a/prebuilt/mpv/usr/lib/geminux-mpv/libavdevice.so.61 +++ /dev/null @@ -1 +0,0 @@ -libavdevice.so.61.3.100 \ No newline at end of file diff --git a/prebuilt/mpv/usr/lib/geminux-mpv/libavdevice.so.61.3.100 b/prebuilt/mpv/usr/lib/geminux-mpv/libavdevice.so.61.3.100 deleted file mode 100755 index 50f597d..0000000 Binary files a/prebuilt/mpv/usr/lib/geminux-mpv/libavdevice.so.61.3.100 and /dev/null differ diff --git a/prebuilt/mpv/usr/lib/geminux-mpv/libavfilter.so.10 b/prebuilt/mpv/usr/lib/geminux-mpv/libavfilter.so.10 deleted file mode 120000 index 59a4517..0000000 --- a/prebuilt/mpv/usr/lib/geminux-mpv/libavfilter.so.10 +++ /dev/null @@ -1 +0,0 @@ -libavfilter.so.10.5.100 \ No newline at end of file diff --git a/prebuilt/mpv/usr/lib/geminux-mpv/libavfilter.so.10.5.100 b/prebuilt/mpv/usr/lib/geminux-mpv/libavfilter.so.10.5.100 deleted file mode 100755 index 74054a8..0000000 Binary files a/prebuilt/mpv/usr/lib/geminux-mpv/libavfilter.so.10.5.100 and /dev/null differ diff --git a/prebuilt/mpv/usr/lib/geminux-mpv/libavformat.so.61 b/prebuilt/mpv/usr/lib/geminux-mpv/libavformat.so.61 deleted file mode 120000 index 5df29f9..0000000 --- a/prebuilt/mpv/usr/lib/geminux-mpv/libavformat.so.61 +++ /dev/null @@ -1 +0,0 @@ -libavformat.so.61.7.103 \ No newline at end of file diff --git a/prebuilt/mpv/usr/lib/geminux-mpv/libavformat.so.61.7.103 b/prebuilt/mpv/usr/lib/geminux-mpv/libavformat.so.61.7.103 deleted file mode 100755 index ac06e37..0000000 Binary files a/prebuilt/mpv/usr/lib/geminux-mpv/libavformat.so.61.7.103 and /dev/null differ diff --git a/prebuilt/mpv/usr/lib/geminux-mpv/libavutil.so.59 b/prebuilt/mpv/usr/lib/geminux-mpv/libavutil.so.59 deleted file mode 120000 index e5d38e8..0000000 --- a/prebuilt/mpv/usr/lib/geminux-mpv/libavutil.so.59 +++ /dev/null @@ -1 +0,0 @@ -libavutil.so.59.39.100 \ No newline at end of file diff --git a/prebuilt/mpv/usr/lib/geminux-mpv/libavutil.so.59.39.100 b/prebuilt/mpv/usr/lib/geminux-mpv/libavutil.so.59.39.100 deleted file mode 100755 index be73ed9..0000000 Binary files a/prebuilt/mpv/usr/lib/geminux-mpv/libavutil.so.59.39.100 and /dev/null differ diff --git a/prebuilt/mpv/usr/lib/geminux-mpv/libplacebo.so.360 b/prebuilt/mpv/usr/lib/geminux-mpv/libplacebo.so.360 deleted file mode 100755 index c3a843e..0000000 Binary files a/prebuilt/mpv/usr/lib/geminux-mpv/libplacebo.so.360 and /dev/null differ diff --git a/prebuilt/mpv/usr/lib/geminux-mpv/libswresample.so.5 b/prebuilt/mpv/usr/lib/geminux-mpv/libswresample.so.5 deleted file mode 120000 index 339ac0e..0000000 --- a/prebuilt/mpv/usr/lib/geminux-mpv/libswresample.so.5 +++ /dev/null @@ -1 +0,0 @@ -libswresample.so.5.3.100 \ No newline at end of file diff --git a/prebuilt/mpv/usr/lib/geminux-mpv/libswresample.so.5.3.100 b/prebuilt/mpv/usr/lib/geminux-mpv/libswresample.so.5.3.100 deleted file mode 100755 index 5132d2f..0000000 Binary files a/prebuilt/mpv/usr/lib/geminux-mpv/libswresample.so.5.3.100 and /dev/null differ diff --git a/prebuilt/mpv/usr/lib/geminux-mpv/libswscale.so.8 b/prebuilt/mpv/usr/lib/geminux-mpv/libswscale.so.8 deleted file mode 120000 index ec9372a..0000000 --- a/prebuilt/mpv/usr/lib/geminux-mpv/libswscale.so.8 +++ /dev/null @@ -1 +0,0 @@ -libswscale.so.8.3.100 \ No newline at end of file diff --git a/prebuilt/mpv/usr/lib/geminux-mpv/libswscale.so.8.3.100 b/prebuilt/mpv/usr/lib/geminux-mpv/libswscale.so.8.3.100 deleted file mode 100755 index e943cea..0000000 Binary files a/prebuilt/mpv/usr/lib/geminux-mpv/libswscale.so.8.3.100 and /dev/null differ diff --git a/prebuilt/mpv/usr/lib/gstreamer-1.0/libgstlibav.so b/prebuilt/mpv/usr/lib/gstreamer-1.0/libgstlibav.so deleted file mode 100755 index 9c875cb..0000000 Binary files a/prebuilt/mpv/usr/lib/gstreamer-1.0/libgstlibav.so and /dev/null differ diff --git a/prebuilt/mpv/usr/share/applications/mpv.desktop b/prebuilt/mpv/usr/share/applications/mpv.desktop deleted file mode 100644 index 6fba23f..0000000 --- a/prebuilt/mpv/usr/share/applications/mpv.desktop +++ /dev/null @@ -1,51 +0,0 @@ -[Desktop Entry] -Type=Application -Name=mpv Media Player -Name[ar]=مشغل وسائط mpv -Name[ca]=Reproductor multimèdia mpv -Name[cs]=mpv přehrávač -Name[da]=mpv-medieafspiller -Name[fr]=Lecteur multimédia mpv -Name[it]=Lettore multimediale mpv -Name[ja]=mpv メディアプレイヤー -Name[pl]=Odtwarzacz mpv -Name[ru]=Проигрыватель mpv -Name[tr]=mpv Ortam Oynatıcı -Name[zh_CN]=mpv 媒体播放器 -Name[zh_TW]=mpv 媒體播放器 -GenericName=Multimedia player -GenericName[ar]=مُشَغِّل وسائط متعددة -GenericName[cs]=Multimediální přehrávač -GenericName[da]=Multimedieafspiller -GenericName[fr]=Lecteur multimédia -GenericName[it]=Lettore multimediale -GenericName[ja]=マルチメディアプレイヤー -GenericName[ru]=Мультимедийный проигрыватель -GenericName[tr]=Çoklu ortam oynatıcı -GenericName[zh_CN]=多媒体播放器 -GenericName[zh_TW]=多媒體播放器 -Comment=Play movies and songs -Comment[ar]=شَغِّل الأفلام والأغاني -Comment[ca]=Reproduïu vídeos i cançons -Comment[cs]=Přehrává filmy a hudbu -Comment[da]=Afspil film og sange -Comment[de]=Filme und Musik abspielen -Comment[es]=Reproduzca vídeos y canciones -Comment[fr]=Lire des vidéos et des musiques -Comment[ja]=映画や音楽を再生する -Comment[it]=Riproduci video e canzoni -Comment[pl]=Odtwarzaj filmy i muzykę -Comment[ru]=Воспроизведение фильмов и музыки -Comment[tr]=Filmleri ve şarkıları oynatın -Comment[zh_CN]=播放电影和歌曲 -Comment[zh_TW]=播放電影和歌曲 -Icon=mpv -TryExec=mpv -Exec=mpv --player-operation-mode=pseudo-gui -- %U -Terminal=false -Categories=AudioVideo;Audio;Video;Player;TV; -MimeType=application/ogg;application/x-ogg;application/mxf;application/sdp;application/smil;application/x-smil;application/streamingmedia;application/x-streamingmedia;application/vnd.rn-realmedia;application/vnd.rn-realmedia-vbr;audio/aac;audio/x-aac;audio/vnd.dolby.heaac.1;audio/vnd.dolby.heaac.2;audio/aiff;audio/x-aiff;audio/m4a;audio/x-m4a;application/x-extension-m4a;audio/mp1;audio/x-mp1;audio/mp2;audio/x-mp2;audio/mp3;audio/x-mp3;audio/mpeg;audio/mpeg2;audio/mpeg3;audio/mpegurl;audio/x-mpegurl;audio/mpg;audio/x-mpg;audio/rn-mpeg;audio/musepack;audio/x-musepack;audio/ogg;audio/scpls;audio/x-scpls;audio/vnd.rn-realaudio;audio/wav;audio/x-pn-wav;audio/x-pn-windows-pcm;audio/x-realaudio;audio/x-pn-realaudio;audio/x-ms-wma;audio/x-pls;audio/x-wav;video/mpeg;video/x-mpeg2;video/x-mpeg3;video/mp4v-es;video/x-m4v;video/mp4;application/x-extension-mp4;video/divx;video/vnd.divx;video/msvideo;video/x-msvideo;video/ogg;video/quicktime;video/vnd.rn-realvideo;video/x-ms-afs;video/x-ms-asf;audio/x-ms-asf;application/vnd.ms-asf;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvxvideo;video/x-avi;video/avi;video/x-flic;video/fli;video/x-flc;video/flv;video/x-flv;video/x-theora;video/x-theora+ogg;video/x-matroska;video/mkv;audio/x-matroska;application/x-matroska;video/webm;audio/webm;audio/vorbis;audio/x-vorbis;audio/x-vorbis+ogg;video/x-ogm;video/x-ogm+ogg;application/x-ogm;application/x-ogm-audio;application/x-ogm-video;application/x-shorten;audio/x-shorten;audio/x-ape;audio/x-wavpack;audio/x-tta;audio/AMR;audio/ac3;audio/eac3;audio/amr-wb;video/mp2t;audio/flac;audio/mp4;application/x-mpegurl;video/vnd.mpegurl;application/vnd.apple.mpegurl;audio/x-pn-au;video/3gp;video/3gpp;video/3gpp2;audio/3gpp;audio/3gpp2;video/dv;audio/dv;audio/opus;audio/vnd.dts;audio/vnd.dts.hd;audio/x-adpcm;application/x-cue;audio/m3u;audio/vnd.wave;video/vnd.avi; -X-KDE-Protocols=appending,file,ftp,hls,http,https,mms,mpv,rist,rtmp,rtmps,rtmpt,rtmpts,rtp,rtsp,rtsps,sftp,smb,srt,srtp,webdav,webdavs -StartupWMClass=mpv -Keywords=mpv;media;player;video;audio;tv; -Keywords[ar]=mpv;إم بي في;ام بي في;وسائط;مشغل;فيديو;مرئية;صوتي;تلفاز; diff --git a/prebuilt/mpv/usr/share/bash-completion/completions/mpv b/prebuilt/mpv/usr/share/bash-completion/completions/mpv deleted file mode 100644 index ceb6293..0000000 --- a/prebuilt/mpv/usr/share/bash-completion/completions/mpv +++ /dev/null @@ -1,142 +0,0 @@ -# -# This file is part of mpv. -# -# mpv is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# mpv is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with mpv. If not, see . -# - -_mpv_options() -{ - if [ -z ${_mpv_options_cache+x} ]; then - _mpv_options_cache=$(mpv --no-config --list-options) - fi - echo "$_mpv_options_cache" -} - -_mpv_get_args() -{ - local doc=$(_mpv_options | grep -E "^\\s*$1\\s") - local partial="$2" - local type=$(echo "$doc" | awk '{print $2;}') - - # We special-case profiles to ensure we read the config - if [ "$1" = "--show-profile" ]; then - type="ShowProfile" - elif [ "$1" = "--profile" ]; then - type="Profile" - fi - - declare -a candidates - case $type in - String) - if echo "$doc" | grep -q '\[file\]' ; then - if [ "$cur" = '=' ]; then - # Without this, _filedir will try and complete files starting with '=' - cur="" - fi - _filedir 2>/dev/null || COMPREPLY=($(compgen -f)) - return 0 - else - candidates=($(mpv --no-config $1=help | grep -v ':' | awk '{print $1;}')) - candidates+=("help") - fi - ;; - Flag) - candidates=("yes" "no" "help") - ;; - Choices:|Object) - candidates=($(mpv --no-config $1=help | grep -v ':' | awk '{print $1;}')) - candidates+=("help") - ;; - Image) - candidates=($(mpv --no-config $1=help)) - candidates=("${candidates[@]:2}") - candidates+=("help") - ;; - Profile) - candidates=($(mpv $1=help | grep -v ':' | awk '{print $1;}')) - candidates+=("help") - ;; - ShowProfile) - candidates=($(mpv $1= | grep -v ':' | awk '{print $1;}')) - ;; - *) - # There are other categories; some of which we could do something smarter - # about, with enough work. - ;; - esac - COMPREPLY=($(compgen -W "${candidates[*]}" -- "${partial}")) - if [ ${#COMPREPLY[@]} -gt 1 ]; then - compopt -o nospace mpv - fi -} - -# This regex detects special options where we don't want an '=' appended -_mpv_special_regex='\s(Flag.*\[not in config files\]|Print)' -_mpv_skip_regex='\sremoved \[deprecated\]' - -_mpv_regular_options() -{ - if [ -z ${_mpv_regular_options_cache+x} ]; then - _mpv_regular_options_cache=($(_mpv_options | grep -vE "$_mpv_skip_regex" | \ - grep -vE "$_mpv_special_regex" | awk '{print "\\"$1;}' | grep '\--')) - _mpv_regular_options_cache="${_mpv_regular_options_cache[*]}" - fi - echo "$_mpv_regular_options_cache" -} - -_mpv_special_options() -{ - if [ -z ${_mpv_special_options_cache+x} ]; then - _mpv_special_options_cache=($(_mpv_options | grep -vE "$_mpv_skip_regex" | \ - grep -E "$_mpv_special_regex" | awk '{print "\\"$1;}' | grep '\--')) - _mpv_special_options_cache="${_mpv_special_options_cache[*]}" - fi - echo "$_mpv_special_options_cache" -} - -_mpv() -{ - compopt +o nospace mpv - - # _filedir requires the current candidate be in $cur - local cur=${COMP_WORDS[COMP_CWORD]} - local prev=${COMP_WORDS[((COMP_CWORD - 1))]} - - if [ "$cur" = '=' ]; then - # If the current word is '=' then we are looking for an argument for the - # option specified by the previous word. - _mpv_get_args "$prev" - elif [ "$prev" = '=' ]; then - # If the previous word is '=' then we are completing an argument for the - # option specified by the word before the '='. - local prevprev=${COMP_WORDS[((COMP_CWORD - 2))]} - _mpv_get_args "$prevprev" "$cur" - else - case $cur in - -*) - COMPREPLY=($(compgen -W "$(_mpv_regular_options)" -S '=' -- "${cur}")) - local normal_count=${#COMPREPLY[@]} - COMPREPLY+=($(compgen -W "$(_mpv_special_options)" -- "${cur}")) - if [ $normal_count -gt 0 -o ${#COMPREPLY[@]} -gt 1 ]; then - compopt -o nospace mpv - fi - ;; - *) - _filedir 2>/dev/null || COMPREPLY=($(compgen -f)) - ;; - esac - fi -} - -complete -F _mpv mpv diff --git a/prebuilt/mpv/usr/share/fish/vendor_completions.d/mpv.fish b/prebuilt/mpv/usr/share/fish/vendor_completions.d/mpv.fish deleted file mode 100644 index 7a35e55..0000000 --- a/prebuilt/mpv/usr/share/fish/vendor_completions.d/mpv.fish +++ /dev/null @@ -1,95 +0,0 @@ -# -# This file is part of mpv. -# -# mpv is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# mpv is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with mpv. If not, see . -# -# - -# Add the completion for mpv. The first argument is the option with the dash -# included and the rest of the arguments are directly passed to complete -function _complete_mpv - set --local opt $argv[1] - set --local opt_type --short-option - if string match -q -r '--' -- $opt - set opt_type --long-option - end - complete --command mpv $opt_type (string trim --left --chars '-' -- $opt) $argv[2..] -end - -function _complete_mpv_run_help - mpv $argv \ - # Remove the text before the option list - | string match --regex --invert '^\w.*:' \ - | string trim -end - -# Print the possible values for the option -function _complete_mpv_option -a opt - # We insert a tab so that it is recognized as the description of the argument - set --local value_description_rewrite 's/ /\t/' - switch $opt - case "--audio-device" "--vulkan-device" - # The value is enclosed in single quotes and the description in parentheses - set value_description_rewrite 's/\'([^\']+)\'\s+\((.*)\)$/\1\t\2/' - end - - _complete_mpv_run_help $opt=help \ - | sed -E $value_description_rewrite -end - -# Print the possible values for the image option -function _complete_mpv_image_option -a opt - mpv $opt=help | sed -e 's/.*: //' -e 's/ /\n/g' -end - -# Print the possible values for the profile option -function _complete_mpv_profile_option -a opt - _complete_mpv_run_help $opt= -end - -# Cache all the mpv options -set --local mpv_options (mpv --no-config --list-options | string match --entire --regex '^\s*--' | string trim) - -for opt_line in $mpv_options - set --local opt_line_split (string split --max 1 ' ' -- $opt_line | string trim) - set --local opt $opt_line_split[1] - set --local doc $opt_line_split[2] - set --local type (string split --field 1 ' ' $doc) - if test $opt = '--show-profile' - set type 'Profile' - end - switch $type - case String - if string match -q -r '\[file\]' $doc - _complete_mpv $opt --force-files - else - _complete_mpv $opt --exclusive --arguments "help (_complete_mpv_option $opt)" - end - case Flag - if string match -q -r '\[not in config files\]' $doc - _complete_mpv $opt - else - _complete_mpv $opt --exclusive --arguments 'yes no help' - end - case 'Choices:' Object - _complete_mpv $opt --exclusive --arguments "help (_complete_mpv_option $opt)" - case Image - _complete_mpv $opt --exclusive --arguments "help (_complete_mpv_image_option $opt)" - case Profile - _complete_mpv $opt --exclusive --arguments "help (_complete_mpv_profile_option $opt)" - case '*' - # Unimplemented categories - _complete_mpv $opt - end -end diff --git a/prebuilt/mpv/usr/share/icons/hicolor/128x128/apps/mpv.png b/prebuilt/mpv/usr/share/icons/hicolor/128x128/apps/mpv.png deleted file mode 100644 index 1840269..0000000 Binary files a/prebuilt/mpv/usr/share/icons/hicolor/128x128/apps/mpv.png and /dev/null differ diff --git a/prebuilt/mpv/usr/share/icons/hicolor/16x16/apps/mpv.png b/prebuilt/mpv/usr/share/icons/hicolor/16x16/apps/mpv.png deleted file mode 100644 index ac2cb81..0000000 Binary files a/prebuilt/mpv/usr/share/icons/hicolor/16x16/apps/mpv.png and /dev/null differ diff --git a/prebuilt/mpv/usr/share/icons/hicolor/32x32/apps/mpv.png b/prebuilt/mpv/usr/share/icons/hicolor/32x32/apps/mpv.png deleted file mode 100644 index bfb5f9c..0000000 Binary files a/prebuilt/mpv/usr/share/icons/hicolor/32x32/apps/mpv.png and /dev/null differ diff --git a/prebuilt/mpv/usr/share/icons/hicolor/64x64/apps/mpv.png b/prebuilt/mpv/usr/share/icons/hicolor/64x64/apps/mpv.png deleted file mode 100644 index 46bb33d..0000000 Binary files a/prebuilt/mpv/usr/share/icons/hicolor/64x64/apps/mpv.png and /dev/null differ diff --git a/prebuilt/mpv/usr/share/icons/hicolor/scalable/apps/mpv.svg b/prebuilt/mpv/usr/share/icons/hicolor/scalable/apps/mpv.svg deleted file mode 100644 index c40fe71..0000000 --- a/prebuilt/mpv/usr/share/icons/hicolor/scalable/apps/mpv.svg +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff --git a/prebuilt/mpv/usr/share/icons/hicolor/symbolic/apps/mpv-symbolic.svg b/prebuilt/mpv/usr/share/icons/hicolor/symbolic/apps/mpv-symbolic.svg deleted file mode 100644 index a4f9263..0000000 --- a/prebuilt/mpv/usr/share/icons/hicolor/symbolic/apps/mpv-symbolic.svg +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - diff --git a/prebuilt/mpv/usr/share/metainfo/mpv.metainfo.xml b/prebuilt/mpv/usr/share/metainfo/mpv.metainfo.xml deleted file mode 100644 index 618abd3..0000000 --- a/prebuilt/mpv/usr/share/metainfo/mpv.metainfo.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - io.mpv.mpv - mpv - A free, open source, and cross-platform media player - -

mpv is a free (as in freedom) media player for the command line. It supports a wide variety of media file formats, audio and video codecs, and subtitle types.

-

mpv has an OpenGL, Vulkan, and D3D11 based video output that is capable of many features loved by videophiles, such as video scaling with popular high quality algorithms, color management, frame timing, interpolation, HDR, and more.

-

While mpv strives for minimalism and provides no real GUI, it has a small controller on top of the video for basic control.

-

mpv can leverage most hardware decoding APIs on all platforms. Hardware decoding can be enabled at runtime on demand.

-

Powerful scripting capabilities can make the player do almost anything. There is a large selection of user scripts on the wiki.

-

A straightforward C API was designed from the ground up to make mpv usable as a library and facilitate easy integration into other applications.

-
- CC0-1.0 - GPL-2.0-or-later AND LGPL-2.0-or-later - mpv.io - mpv.desktop - - - - https://mpv.io/images/mpv-screenshot-34cd36ae.jpg - Main window - - - https://mpv.io/ - https://github.com/mpv-player/mpv/issues - https://github.com/mpv-player/mpv/wiki/FAQ - https://mpv.io/manual/stable -
diff --git a/prebuilt/mpv/usr/share/zsh/site-functions/_mpv b/prebuilt/mpv/usr/share/zsh/site-functions/_mpv deleted file mode 100644 index cb3c00e..0000000 --- a/prebuilt/mpv/usr/share/zsh/site-functions/_mpv +++ /dev/null @@ -1,269 +0,0 @@ -#compdef mpv - -# ZSH completion for mpv -# -# For customization, see: -# https://github.com/mpv-player/mpv/wiki/Zsh-completion-customization - -# -# This file is part of mpv. -# -# mpv is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# mpv is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with mpv. If not, see . -# - -local curcontext="$curcontext" state state_descr line -typeset -A opt_args - -local -a match mbegin mend -local MATCH MBEGIN MEND - -# By default, don't complete URLs unless no files match -local -a tag_order -zstyle -a ":completion:*:*:$service:*" tag-order tag_order || - zstyle ":completion:*:*:$service:*" tag-order '!urls' - -local -a urls -zstyle -a ":completion:*:*:$service:*:urls" urls urls || - zstyle ":completion:*:*:$service:*:urls" urls av://lavfi:testsrc av://lavfi:sine - -typeset -ga _mpv_completion_arguments _mpv_completion_protocols - -function _mpv_generate_arguments { - - _mpv_completion_arguments=() - - local -a option_aliases=() - - local list_options_line - for list_options_line in "${(@f)$($~words[1] --no-config --list-options)}"; do - - [[ $list_options_line =~ $'^[ \t]+--([^ \t]+)[ \t]*(.*)' ]] || continue - - local name=$match[1] desc=$match[2] - - if [[ $desc == Flag* ]]; then - - _mpv_completion_arguments+="$name" - if [[ $name != (\{|\}|v|list-options) ]]; then - # Negated version - _mpv_completion_arguments+="no-$name" - fi - - elif [[ -z $desc ]]; then - - # Sub-option for list option - - if [[ $name == *-(clr|help) ]]; then - # Like a flag - _mpv_completion_arguments+="$name" - else - # Find the parent option and use that with this option's name - _mpv_completion_arguments+="${(S)_mpv_completion_arguments[(R)${name%-*}=*]/*=/$name=}" - fi - - elif [[ $desc == Print* ]]; then - - _mpv_completion_arguments+="$name" - - elif [[ $desc =~ $'^alias for (--)?([^ \t]+)' ]]; then - - # Save this for later; we might not have parsed the target option yet - option_aliases+="$name $match[2]" - - elif [[ $desc =~ $'^removed ' ]]; then - - # skip - - else - - # Option takes argument - - local entry="$name=-:${desc//:/\\:}:" - - if [[ $desc =~ '^Choices: ([^(]*)' ]]; then - - local -a choices=(${(s: :)match[1]}) - entry+="($choices)" - # If "no" is one of the choices, it can also be negated like a flag - # (--no-whatever is equivalent to --whatever=no). - if (( ${+choices[(r)no]} )); then - _mpv_completion_arguments+="no-$name" - fi - - elif [[ $desc == *'[file]'* ]]; then - - entry+='->files' - - elif [[ $desc = 'Object settings list'* || $name == (profile|audio-device|vulkan-device) ]]; then - - entry+="->parse-help-$name" - - elif [[ $name == show-profile ]]; then - - entry+="->parse-help-profile" - - elif [[ $name == h(|elp) ]]; then - - entry+="->help-options" - - fi - - _mpv_completion_arguments+="$entry" - - fi - - done - - # Process aliases - local to_from real_name arg_spec - for to_from in $option_aliases; do - # to_from='alias-name real-name' - real_name=${to_from##* } - for arg_spec in "$real_name" "$real_name=*" "no-$real_name"; do - arg_spec=${_mpv_completion_arguments[(r)$arg_spec]} - [[ -n $arg_spec ]] && - _mpv_completion_arguments+="${arg_spec/$real_name/${to_from%% *}}" - done - done - - # Older versions of zsh have a bug where they won't complete an option listed - # after one that's a prefix of it. To work around this, we can sort the - # options by length, longest first, so that any prefix of an option will be - # listed after it. On newer versions of zsh where the bug is fixed, we skip - # this to avoid slowing down the first tab press any more than we have to. - autoload -Uz is-at-least - if ! is-at-least 5.2; then - # If this were a real language, we wouldn't have to sort by prepending the - # length, sorting the whole thing numerically, and then removing it again. - local -a sort_tmp=() - for arg_spec in $_mpv_completion_arguments; do - sort_tmp+=${#arg_spec%%=*}_$arg_spec - done - _mpv_completion_arguments=(${${(On)sort_tmp}/#*_}) - fi - -} - -function _mpv_generate_protocols { - _mpv_completion_protocols=() - local list_protos_line - for list_protos_line in "${(@f)$($~words[1] --no-config --list-protocols)}"; do - if [[ $list_protos_line =~ $'^[ \t]+(.*)' ]]; then - _mpv_completion_protocols+="$match[1]" - fi - done -} - -function _mpv_generate_if_changed { - # Called with $1 = 'arguments' or 'protocols'. Generates the respective list - # on the first run and re-generates it if the executable being completed for - # is different than the one we used to generate the cached list. - typeset -gA _mpv_completion_binary - local current_binary=${~words[1]:c} - zmodload -F zsh/stat b:zstat - current_binary+=T$(zstat +mtime $current_binary) - if [[ $_mpv_completion_binary[$1] != $current_binary ]]; then - # Use PCRE for regular expression matching if possible. This approximately - # halves the execution time of generate_arguments compared to the default - # POSIX regex, which translates to a more responsive first tab press. - # However, we can't rely on PCRE being available, so we keep all our - # patterns POSIX-compatible. - zmodload -s -F zsh/pcre C:pcre-match && setopt re_match_pcre - _mpv_generate_$1 - _mpv_completion_binary[$1]=$current_binary - fi -} - -# Only consider generating arguments if the argument being completed looks like -# an option. This way, the user should never see a delay when just completing a -# filename. -if [[ $words[$CURRENT] == -* ]]; then - _mpv_generate_if_changed arguments -fi - -local rc=1 - -_arguments -C -S \*--$_mpv_completion_arguments '*:files:->mfiles' && rc=0 - -case $state in - - parse-help-*) - local option_name=${state#parse-help-} - local no_config="--no-config" - # Can't do non-capturing groups without pcre, so we index the ones we want - local pattern name_group=1 desc_group=2 - case $option_name in - audio-device|vulkan-device) - pattern=$'^[ \t]+'\''([^'\'']*)'\'$'[ \t]+''\((.*)\)' - ;; - profile) - # The generic pattern would actually work in most cases for --profile, - # but would break if a profile name contained spaces. This stricter one - # only breaks if a profile name contains tabs. - pattern=$'^\t([^\t]*)\t(.*)' - # We actually want config so we can autocomplete the user's profiles - no_config="" - ;; - *) - pattern=$'^[ \t]+(--'${option_name}$'=)?([^ \t]+)[ \t]*[-:]?[ \t]*(.*)' - name_group=2 desc_group=3 - ;; - esac - local -a values - local current - for current in "${(@f)$($~words[1] ${no_config} --${option_name}=help)}"; do - [[ $current =~ $pattern ]] || continue; - local name=${match[name_group]//:/\\:} desc=${match[desc_group]} - if [[ -n $desc ]]; then - values+="${name}:${desc}" - else - values+="${name}" - fi - done - (( $#values )) && { - compset -P '*,' - compset -S ',*' - _describe "$state_descr" values -r ',=: \t\n\-' && rc=0 - } - ;; - - files) - compset -P '*,' - compset -S ',*' - _files -r ',/ \t\n\-' && rc=0 - ;; - - mfiles) - local expl - _tags files urls - while _tags; do - _requested files expl 'media file' _files && rc=0 - if _requested urls; then - while _next_label urls expl URL; do - _urls "$expl[@]" && rc=0 - _mpv_generate_if_changed protocols - compadd -S '' "$expl[@]" $_mpv_completion_protocols && rc=0 - done - fi - (( rc )) || return 0 - done - ;; - - help-options) - compadd ${${${_mpv_completion_arguments%%=*}:#no-*}:#*-(add|append|clr|pre|set|remove|toggle)} - ;; - -esac - -return rc diff --git a/rebuild-image.sh b/rebuild-image.sh index 2db713f..cc6603d 100755 --- a/rebuild-image.sh +++ b/rebuild-image.sh @@ -67,10 +67,6 @@ if [ "$REBUILD_ALL" -eq 1 ] || [ ! -x "$BASE_DIR/prebuilt/gsocket/usr/local/bin/ "$BASE_DIR/scripts/build-gsocket.sh" fi -if [ "$REBUILD_ALL" -eq 1 ] || [ ! -x "$BASE_DIR/prebuilt/mpv/usr/bin/mpv" ]; then - "$BASE_DIR/scripts/build-mpv.sh" -fi - if [ "$REBUILD_ALL" -eq 1 ] || [ ! -x "$BASE_DIR/prebuilt/webarchy/usr/bin/webarchy" ] || \ [ ! -f "$BASE_DIR/prebuilt/gdk-pixbuf/usr/lib/libgdk_pixbuf-2.0.so.0" ]; then "$BASE_DIR/scripts/build-webarchy.sh" diff --git a/scripts/apply-geminux-overlay.sh b/scripts/apply-geminux-overlay.sh index 9edc829..11c2154 100755 --- a/scripts/apply-geminux-overlay.sh +++ b/scripts/apply-geminux-overlay.sh @@ -75,7 +75,6 @@ if command -v apk >/dev/null 2>&1 && \ "geminux-ui@geminux=${VER}-r0" \ "geminux-bantam@geminux=${VER}-r0" \ "geminux-gsocket@geminux=1.4.43-r0" \ - "geminux-mpv@geminux=0.40.0-r0" \ "geminux-webarchy@geminux=${VER}-r0" \ "geminux-config@geminux=${VER}-r0" apk --root "$TARGET_ROOTFS" --arch aarch64 fix --no-scripts --reinstall geminux-gdk-pixbuf >/dev/null @@ -84,7 +83,7 @@ else if [ -d "$BASE_DIR/overlay/rootfs" ]; then cp -af "$BASE_DIR/overlay/rootfs/." "$TARGET_ROOTFS/" fi - for subdir in xlibre suckless dunst geminux bantam gsocket mpv gdk-pixbuf webarchy; do + for subdir in xlibre suckless dunst geminux bantam gsocket gdk-pixbuf webarchy; do if [ -d "$BASE_DIR/prebuilt/$subdir" ]; then cp -af "$BASE_DIR/prebuilt/$subdir/." "$TARGET_ROOTFS/" fi diff --git a/scripts/build-mpv.sh b/scripts/build-mpv.sh deleted file mode 100755 index b3cdb9e..0000000 --- a/scripts/build-mpv.sh +++ /dev/null @@ -1,315 +0,0 @@ -#!/bin/sh -# Cross-compile zero-Rust, X11 EGL (Panfrost) + PipeWire/Pulse/ALSA mpv -# with private libplacebo (no libdovi), FFmpeg, and gst-libav for aarch64. -set -eu - -BASE_DIR="$(cd "$(dirname "$0")/.." && pwd)" -mkdir -p "$BASE_DIR/build-cache" "$BASE_DIR/prebuilt/mpv" - -exec docker run --rm --network=host \ - -e HOST_UID="$(id -u)" \ - -e HOST_GID="$(id -g)" \ - -e FORCE_REBUILD="${FORCE_REBUILD:-0}" \ - -v "$BASE_DIR:/geminux" \ - alpine:3.24 sh -eu -c ' - cat > /etc/apk/repositories </dev/null || true - } - trap cleanup_perms EXIT - - echo "[1/6] Installing host aarch64 cross-compile toolchain and meson/ninja..." - apk add --no-cache \ - build-base \ - curl \ - xz \ - git \ - ca-certificates \ - gcc-aarch64 \ - g++-aarch64 \ - binutils-aarch64 \ - meson \ - ninja \ - pkgconf \ - python3 \ - py3-jinja2 \ - py3-markupsafe \ - perl >/dev/null - - PLACEBO_SRC="/geminux/build-cache/libplacebo-src" - if [ ! -f "$PLACEBO_SRC/meson.build" ]; then - echo "[1b/6] Cloning libplacebo v7.360.1..." - rm -rf "$PLACEBO_SRC" - git clone --recurse-submodules --shallow-submodules --depth 1 --branch v7.360.1 \ - https://code.videolan.org/videolan/libplacebo.git "$PLACEBO_SRC" - fi - - FFMPEG_SRC="/geminux/build-cache/ffmpeg-src" - if [ ! -f "$FFMPEG_SRC/configure" ]; then - echo "[1c/6] Cloning FFmpeg n7.1.5..." - rm -rf "$FFMPEG_SRC" - git clone --depth 1 --branch n7.1.5 \ - https://github.com/FFmpeg/FFmpeg.git "$FFMPEG_SRC" - fi - - MPV_SRC="/geminux/build-cache/mpv-src" - if [ ! -f "$MPV_SRC/meson.build" ]; then - echo "[1d/6] Cloning mpv v0.40.0..." - rm -rf "$MPV_SRC" - git clone --depth 1 --branch v0.40.0 \ - https://github.com/mpv-player/mpv.git "$MPV_SRC" - fi - - GST_LIBAV_SRC="/geminux/build-cache/gst-libav-src" - if [ ! -f "$GST_LIBAV_SRC/meson.build" ]; then - echo "[1e/6] Downloading gst-libav 1.28.9..." - rm -rf "$GST_LIBAV_SRC" - mkdir -p "$GST_LIBAV_SRC" - curl -fsSL https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.28.9.tar.xz | \ - tar -xJ --strip-components=1 -C "$GST_LIBAV_SRC" - fi - - echo "[2/6] Preparing pure Alpine Edge aarch64 sysroot for zero-Rust mpv..." - SYSROOT="/tmp/aarch64-sysroot" - mkdir -p "$SYSROOT/etc/apk/keys" - cat > "$SYSROOT/etc/apk/repositories" </dev/null - - cat > /tmp/aarch64-cross.ini < /geminux/prebuilt/mpv/etc/mpv/mpv.conf <&2 exit 1 fi done +for req_pkg in ffmpeg mpv gst-libav; do + if ! grep -Fxq "P:$req_pkg" "$ROOTFS_DIR/lib/apk/db/installed"; then + echo "FAIL: expected native package '$req_pkg' is not installed in rootfs" >&2 + exit 1 + fi +done +for unblocked in !librsvg !rav1e !rav1e-libs !libheif-rav1e !libdovi !gst-libav; do + if grep -Fxq "$unblocked" "$ROOTFS_DIR/etc/apk/world"; then + echo "FAIL: '$unblocked' is still blocked in $ROOTFS_DIR/etc/apk/world" >&2 + exit 1 + fi +done echo "OK (zero forbidden packages)" echo "[3/8] Running full binary ELF Rust scan across $ROOTFS_DIR..." @@ -45,17 +57,26 @@ import sys root = sys.argv[1] raw_markers = re.compile( - rb"(core::panicking|rustc_version|libstd-[0-9a-f]{8}|librsvg|libglycin|rav1e|libdovi)" + rb"(core::panicking|rustc_version|libstd-[0-9a-f]{8}|libglycin)" ) sym_markers = re.compile( - r"(rust_eh_personality|rust_begin_unwind|_ZN4core9panicking|_ZN3std9panicking|libstd-[0-9a-f]{8}|librsvg|libglycin|rav1e|libdovi)" + r"(rust_eh_personality|rust_begin_unwind|_ZN4core9panicking|_ZN3std9panicking|libstd-[0-9a-f]{8}|libglycin)" +) +whitelisted_elf_prefixes = ( + "librsvg-2.so", + "libpixbufloader-svg.so", + "libpixbufloader_svg.so", + "rsvg-convert", + "librav1e.so", + "rav1e", + "libdovi.so", ) elfs = [] hits = [] for parent, _, names in os.walk(root): for name in names: p = os.path.join(parent, name) - if os.path.islink(p) or not os.path.isfile(p): + if os.path.islink(p) or not os.path.isfile(p) or name.startswith(whitelisted_elf_prefixes): continue try: with open(p, "rb") as f: @@ -108,7 +129,7 @@ docker run --rm --network=host \ printf "%s\n" "$UPG_OUT" for pkg in geminux-kernel-modules geminux-xlibre geminux-suckless \ - geminux-dunst geminux-ui geminux-bantam geminux-gsocket geminux-mpv \ + geminux-dunst geminux-ui geminux-bantam geminux-gsocket \ geminux-gdk-pixbuf geminux-webarchy geminux-config; do if ! grep -q "^${pkg}@geminux=" /rootfs/etc/apk/world; then echo "FAIL: ${pkg} is not exact-version pinned to @geminux in world" >&2 @@ -120,7 +141,7 @@ docker run --rm --network=host \ fi done - if printf "%s\n" "$UPG_OUT" | grep -q -E "(rust|cargo|librsvg|libglycin|gdk-pixbuf|rav1e|libdovi|deno|py3-cryptography|xorg-server|linux-edge)"; then + if printf "%s\n" "$UPG_OUT" | grep -q -E "(rust|cargo|libglycin|gdk-pixbuf|deno|py3-cryptography|xorg-server|linux-edge)"; then echo "FAIL: upgrade simulation tried to pull forbidden Rust or upstream override package" >&2 exit 1 fi @@ -151,11 +172,6 @@ file \ "$BASE_DIR/prebuilt/gsocket/usr/local/bin/gs-netcat" \ "$BASE_DIR/prebuilt/gsocket/usr/local/bin/gsocket_dso.so.0" \ "$BASE_DIR/prebuilt/gsocket/usr/local/bin/gsocket_uchroot_dso.so.0" \ - "$BASE_DIR/prebuilt/mpv/usr/bin/mpv" \ - "$BASE_DIR/prebuilt/mpv/usr/bin/ffmpeg" \ - "$BASE_DIR/prebuilt/mpv/usr/bin/ffprobe" \ - "$BASE_DIR/prebuilt/mpv/usr/lib/geminux-mpv/"*.so.*.* \ - "$BASE_DIR/prebuilt/mpv/usr/lib/gstreamer-1.0/libgstlibav.so" \ "$BASE_DIR/prebuilt/gdk-pixbuf/usr/bin/gdk-pixbuf-"* \ "$BASE_DIR/prebuilt/gdk-pixbuf/usr/lib/libgdk_pixbuf-2.0.so.0."* \ "$BASE_DIR/prebuilt/webarchy/usr/bin/webarchy" | \ @@ -352,6 +368,8 @@ for req_rel in ("etc/pam.d/autologin", "etc/init.d/geminux-hwinit", "etc/polkit-1/rules.d/10-geminux.rules"): if not os.path.lexists(os.path.join(rootfs, req_rel)): raise SystemExit(f"FAIL: missing required path {os.path.join(rootfs, req_rel)}") +if os.path.lexists(os.path.join(rootfs, "usr/lib/geminux-mpv")): + raise SystemExit("FAIL: legacy /usr/lib/geminux-mpv still exists in rootfs") if not any(os.path.lexists(os.path.join(rootfs, p)) for p in ("sbin/cryptsetup", "usr/sbin/cryptsetup")): raise SystemExit(f"FAIL: missing cryptsetup binary in {rootfs}") if os.path.lexists(os.path.join(rootfs, "etc/runlevels/sysinit/hwdrivers")): @@ -513,7 +531,7 @@ if readelf -Ws "$ROOTFS_DIR/usr/bin/Xorg" | grep -q systemd_logind_take_fd; then fi (cd "$IMAGES_DIR" && sha256sum -c SHA256SUMS) -echo "[8/8] Running all 8 Python unit/verification suites..." +echo "[8/8] Running all 9 Python unit/verification suites..." python3 "$BASE_DIR/scripts/test-flash-mtk-gpt.py" python3 "$BASE_DIR/scripts/test-xkb-keymap.py" python3 "$BASE_DIR/scripts/test-theme-dunst-sync.py" diff --git a/scripts/package-local-apks.sh b/scripts/package-local-apks.sh index 2547a5a..0f2087a 100755 --- a/scripts/package-local-apks.sh +++ b/scripts/package-local-apks.sh @@ -250,19 +250,7 @@ make_pkg( depends=["bash", "openssl"] + collect_needed_so(gstage), ) -# 8. geminux-mpv -mstage = os.path.join(work_dir, "geminux-mpv") -copy_tree_dedup("/geminux/prebuilt/mpv", mstage) -make_pkg( - "geminux-mpv", "0.40.0-r0", - "Pure-X11 zero-Rust mpv media player and FFmpeg CLI tools with Panfrost EGL and PipeWire", - mstage, - provides=["cmd:mpv=0.40.0-r0", "mpv=0.40.0-r0", - "cmd:ffmpeg=7.1.5-r0", "cmd:ffprobe=7.1.5-r0", "ffmpeg=7.1.5-r0"], - depends=collect_needed_so(mstage), -) - -# 9. geminux-gdk-pixbuf +# 8. geminux-gdk-pixbuf gpstage = os.path.join(work_dir, "geminux-gdk-pixbuf") copy_tree_dedup("/geminux/prebuilt/gdk-pixbuf", gpstage) make_pkg( @@ -278,7 +266,7 @@ make_pkg( depends=["shared-mime-info"] + collect_needed_so(gpstage), ) -# 10. geminux-webarchy +# 9. geminux-webarchy wstage = os.path.join(work_dir, "geminux-webarchy") copy_tree_dedup("/geminux/prebuilt/webarchy", wstage) make_pkg( @@ -294,7 +282,7 @@ make_pkg( ] + collect_needed_so(wstage), ) -# 11. geminux-config +# 10. geminux-config cstage = os.path.join(work_dir, "geminux-config") copy_tree_dedup("/geminux/overlay/rootfs", cstage, dedup=True) for rel in ("etc/os-release", "usr/lib/os-release", "etc/issue", "etc/motd"): @@ -317,7 +305,6 @@ make_pkg( f"geminux-ui={pkg_ver}", f"geminux-bantam={pkg_ver}", f"geminux-gsocket=1.4.43-r0", - f"geminux-mpv=0.40.0-r0", f"geminux-gdk-pixbuf=2.42.12-r0", f"geminux-webarchy={pkg_ver}", ], @@ -329,6 +316,7 @@ make_pkg( "chrony", "chrony-common", "chrony-openrc", + "geminux-mpv", "tinydm", "tinydm-openrc", "xinit", diff --git a/scripts/rootfs-packages.txt b/scripts/rootfs-packages.txt index 60b7553..f9f0275 100644 --- a/scripts/rootfs-packages.txt +++ b/scripts/rootfs-packages.txt @@ -1,6 +1,6 @@ # Geminux aarch64 rootfs package set. # Single source of truth for scripts/bootstrap-rootfs.sh and rebuild-image.sh. -# Pure X11 (XLibre + Panfrost), zero Wayland components, zero Rust. +# Pure X11 (XLibre + Panfrost), zero Wayland compositors. alpine-base alsa-ucm-conf alsa-utils @@ -37,6 +37,7 @@ eudev-openrc evtest exfatprogs fdk-aac +ffmpeg font-dejavu font-dejavu-sans-mono-nerd font-fira-code @@ -48,6 +49,7 @@ glib gnupg gpg gsettings-desktop-schemas +gst-libav gst-plugins-base gst-plugins-good gstreamer @@ -106,6 +108,7 @@ mobile-broadband-provider-info modemmanager modemmanager-openrc mpg123 +mpv mtdev musl-locales nano diff --git a/scripts/rootfs-prune-packages.txt b/scripts/rootfs-prune-packages.txt index 748cc58..5b83a65 100644 --- a/scripts/rootfs-prune-packages.txt +++ b/scripts/rootfs-prune-packages.txt @@ -8,25 +8,20 @@ xwayland sudo-rs postmarketos-base-sudo-rs gstreamer-ptp-helper -libheif-rav1e deno py3-cryptography rust cargo -librsvg libglycin glycin-image-rs glycin-svg glycin-loaders -rav1e -rav1e-libs -libdovi mesa-rusticl gdk-pixbuf adwaita-icon-theme imv-x11 -gst-libav gst-plugins-bad +geminux-mpv libnotify generate-kernel-cmdline linux-lts @@ -45,26 +40,20 @@ wpa_supplicant-openrc !libdecor !xwayland !gstreamer-ptp-helper -!libheif-rav1e !deno !py3-cryptography !postmarketos-base-sudo-rs !sudo-rs !rust !cargo -!librsvg !libglycin !glycin-image-rs !glycin-svg !glycin-loaders -!rav1e -!rav1e-libs -!libdovi !mesa-rusticl !gdk-pixbuf !adwaita-icon-theme !imv-x11 -!gst-libav !gst-plugins-bad !libnotify !generate-kernel-cmdline @@ -81,3 +70,9 @@ wpa_supplicant-openrc @!g++ @!musl-dev @!make +@!librsvg +@!libheif-rav1e +@!rav1e +@!rav1e-libs +@!libdovi +@!gst-libav