Finalize verified 2720 Flip release source and untrack image outputs
This commit is contained in:
1 parent
2a3078e42c
commit
1c011b360a
121 files changed
+8444
-663
No files matched your search
@@ -11,6 +11,7 @@
|
|||||||
/build
|
/build
|
||||||
/dist
|
/dist
|
||||||
/tmp
|
/tmp
|
||||||
|
/.lk2nd-build
|
||||||
|
|
||||||
# Disk images, raw partitions, and archives
|
# Disk images, raw partitions, and archives
|
||||||
*.img
|
*.img
|
||||||
|
|||||||
@@ -26,11 +26,19 @@ It uses a pure **X11 (`Xlibre` + `sxmo-de-dwm`)** stack (no Wayland) with **Adre
|
|||||||
- `overlay/rootfs/`: system configuration overlay applied over the target rootfs (kept in sync with `prebuilt/`).
|
- `overlay/rootfs/`: system configuration overlay applied over the target rootfs (kept in sync with `prebuilt/`).
|
||||||
- `prebuilt/`: cross-compiled `armv7` binaries and kernel modules (`sxmo-x11`, `fcitx5-t9`, `xlibre`, `kernel-6.12.1-msm8916`, `bantam`, `games`, `gsocket`).
|
- `prebuilt/`: cross-compiled `armv7` binaries and kernel modules (`sxmo-x11`, `fcitx5-t9`, `xlibre`, `kernel-6.12.1-msm8916`, `bantam`, `games`, `gsocket`).
|
||||||
- `devices/` & `patches/`: device trees (`.dts`/`.dtb`), MIPI-DBI panel init sequences, and upstream patch sets.
|
- `devices/` & `patches/`: device trees (`.dts`/`.dtb`), MIPI-DBI panel init sequences, and upstream patch sets.
|
||||||
|
- The stock `system` superblock is wiped by default for every flash method; `--no-wipe-system` is the opt-out and `--wipe-system` a redundant alias. In `recovery` mode the wiped `system` means a normal power-on hangs on the KaiOS logo and Volume Up is mandatory to boot Bananarchy.
|
||||||
|
- `nokia-beatles` boot chain: `images/boot-lk2nd-nokia-beatles.img` is built from upstream `msm8916-mainline/lk2nd` at pinned commit `cf45aefd22d744b2bf9b39455afae697ce430063` plus `bootloader/lk2nd/nokia-beatles.patch` (see `bootloader/lk2nd/README.md`; rebuild with `scripts/build-lk2nd-beatles.sh`). It keeps the upstream QCDT layout (both `0x14b` entries `0xb/0x100` and `0x1000b/0x100` sharing one `msm8905-qrd-skub` DTB, stock `qcom,board-id` order) with a compact `/lk2nd/nokia-beatles` node injected, and **adds `/cpus` with `cpu@0`..`cpu@3` and 4-byte `device_type` to the common `lk2nd.dtsi` so every QCDT DTB has it**. The 2720's MSM8905 is a partial-goods 2-core part and its aboot `ASSERT`s at `platform/msm_shared/partial_goods.c:80` when `/cpus`, `cpu@2` or `cpu@3` is missing — that was the actual "black screen / no fastboot" crash (Sahara MEMORY_DEBUG RLOG log, see `bootloader/lk2nd/README.md` and `backup/nokia-beatles-2720/crash-20261109/aboot-log.txt`). cmdline `lk2nd lk2nd.compatible=nokia,beatles`, `lk2nd,match-panel` for all three GC9305 panel names the aboot reports, and the single `qcom,mdss_spi_gc9305_v2_qvga_cmd` (the panel the live aboot reports) `lk2nd,panel-init` stream replayed on BLSP1 QUP5 (DC GPIO 110) only when aboot did not leave continuous splash enabled (or when `lk2nd.force-panel-init` is in the cmdline), so the 240x320 RGB565 main panel is initialized even without cont-splash. `spi-display.c` also paints the branded RGB565 boot splash into the framebuffer (without flushing during init): `DISABLE_SPLASH_PARTITION=1` plus `menu.c`'s bottom-only text means upstream lk2nd otherwise pushes a nearly black frame, which is what the "KaiOS logo then blank screen" is. `lk2nd/include/lk2nd/spi-panel-init.h` is shared with the host unit test; the repo copy is `bootloader/lk2nd/spi-panel-init.h` and `check-lk2nd-beatles.py` keeps them in sync and enforces that QCDT shape. Both the normal and diagnostic images carry `lk2nd.no-display` (RAM-only framebuffer, no QUP SPI before USB) because unbounded QUP/clock register polls used to wedge lk2nd with the boot vibrator stuck on. The port now bounds those polls (`QUP_FIFO_TIMEOUT`, `CLK_POLL_TIMEOUT`) and adds `oem display-init` / `oem display-test` / `oem scan-dtb` fastboot probes that run after USB is up, plus `oem screenshot` to verify the framebuffer. Live `oem display-init` confirmed the GC9305 v2 stream and the 240x320 RGB565 frame; a chain-loaded diagnostic falls back to the QCDT panel stream when aboot tags are absent, `oem scan-dtb` stages the final DTB after lk2nd DT updates, `oem ramoops console` validates and bounds pstore data, and the QUP per-word `SPEW` log is removed. The r3 port also makes `oem read-partition` block-safe: it rounds MMC reads up to the eMMC block size, rejects unaligned offsets and stages only the requested byte count. `images/boot-lk2nd-nokia-beatles-display.img` uses `lk2nd.display=on` for boot-time panel init via the downstream GC9305 v2 `lk2nd,panel-init` stream; flash it with `--lk2nd-image`. The diagnostic image additionally has `DEBUG=2 LK2ND_FORCE_FASTBOOT=1`. `check-lk2nd-beatles.py --expect-display` guards the display variant; `scripts/test-lk2nd-beatles-port.py` runs all three. lk2nd is confirmed working over live fastboot (`lk2nd:compatible=nokia,beatles`, `model=Nokia 2720 Flip`, panel `qcom,mdss_spi_gc9305_v2_qvga_cmd`, `unlocked=yes`). `flash-edl.py` defaults to `--method lk2nd` for every target; stock aboot accepts the port and lk2nd boots Bananarchy from `userdata` via `extlinux.conf` (`fdt /qcom-msm8905-nokia-beatles.dtb`). On `nokia-beatles` the default is now the Argon shape: lk2nd in `boot`, the standalone mainline `boot.img` in `recovery` (Volume Up fallback). `--method both` remains as a fallback that writes the standalone mainline `boot.img` to both slots. `--verify` reads back every slot and `--dump-diagnostics` saves small bootloader/config partitions for secure-boot analysis. `scripts/check-lk2nd-beatles.py` validates the boot header, both 2720 QCDT entries, `/cpus` in every QCDT DTB, the device node and the GC9305 v2 panel init stream; `scripts/test-lk2nd-beatles-port.py` adds the host C parser test. The stock 2720 aboot is locked (`devinfo.is_unlocked=0`) and verifies boot images against `Nokia_beatles ROOT CA0`; `flash-edl.py` therefore defaults to setting `devinfo.is_unlocked=1` on `nokia-beatles` via `unlock_devinfo()` before writing any boot image, saves `backup/devinfo-locked-<device>.img`, and supports `--no-unlock-bootloader` to skip. `scripts/make-unlocked-devinfo.py` produces the same patched image offline. Correction: the GPT has `keystore` but no `keymaster`, so `target_get_vb_version()` returns `VB_L=1` while `VB_M=2`; aboot therefore reads `devinfo` from eMMC, not RPMB. The 21:25 dump confirms eMMC `is_unlocked=1`, so the unlock is effective and no stock fastboot / `oem unlock-go` step is required. `--only-unlock`, `enable_oem_unlock()` and `scripts/make-oem-unlock-config.Line truncated
|
||||||
|
- `bootloader/loaders/`: device-specific signed Firehose programmers; `DEVICE_LOADERS` in `flash-edl.py` maps each target codename to one (`8k.mbn` serves both `nokia-sparkler` and `nokia-leo`), and `DEVICE_LOADER_VARIANTS` maps `--variant us` on `nokia-beatles` to `2720v.mbn` (`Nokia_bts_us`). Never flash a different device's programmer: Sahara rejects the signature and `--list-loaders` shows the embedded attestation identity.
|
||||||
- `vendor/edl/`: vendored, patched EDL client library (MIT) used by `flash-edl.py`; a local `edl/` checkout or `BANANARCHY_EDL_DIR` overrides it.
|
- `vendor/edl/`: vendored, patched EDL client library (MIT) used by `flash-edl.py`; a local `edl/` checkout or `BANANARCHY_EDL_DIR` overrides it.
|
||||||
- `scripts/rootfs-packages.txt`: single source of truth for the `armv7` rootfs package set, read by both `bootstrap-rootfs.sh` and `rebuild-image.sh`. It intentionally contains no `device-*` package; `scripts/apply-bananarchy-overlay.sh` installs the per-device `devices/<device>/modules-initfs` list as `/usr/share/mkinitfs/modules/00-device-<device>.modules` (plus its `initramfs.load` mapping) so a clean-clone bootstrap still builds the correct initramfs. `scripts/check-rebuild.sh` guards this.
|
- `scripts/rootfs-packages.txt`: single source of truth for the `armv7` rootfs package set, read by both `bootstrap-rootfs.sh` and `rebuild-image.sh`. It intentionally contains no `device-*` package; `scripts/apply-bananarchy-overlay.sh` installs the per-device `devices/<device>/modules-initfs` list as `/usr/share/mkinitfs/modules/00-device-<device>.modules` (plus its `initramfs.load` mapping) so a clean-clone bootstrap still builds the correct initramfs. `scripts/check-rebuild.sh` guards this.
|
||||||
- `scripts/rootfs-prune-packages.txt`: denylist of Wayland-only, Rust-based, and retired packages purged from existing rootfs trees by `bootstrap-rootfs-container.sh` and `rebuild-image.sh`.
|
- `scripts/rootfs-prune-packages.txt`: denylist of Wayland-only, Rust-based, and retired packages purged from existing rootfs trees by `bootstrap-rootfs-container.sh` and `rebuild-image.sh`.
|
||||||
- `scripts/prune-rootfs-packages.sh`: two-phase rootfs pruner (`world` before `apk add`, `purge` after) that reads the denylist and pins `install_if` packages with negative `!pkg` world constraints plus `apk fix`; the `world` phase is required so apk can atomically replace Rust `sudo-rs` with C `sudo`.
|
- `scripts/prune-rootfs-packages.sh`: two-phase rootfs pruner (`world` before `apk add`, `purge` after) that reads the denylist and pins `install_if` packages with negative `!pkg` world constraints plus `apk fix`; the `world` phase is required so apk can atomically replace Rust `sudo-rs` with C `sudo`.
|
||||||
|
|
||||||
|
- **Flip lid and cover daemon**: the compiled C `bananarchy-lid` (service `bananarchy-lid`) reads the current `EV_SW` switch mask from `/dev/input/event2`, follows hall edge events with an 80 ms stability window and only polls raw gpio36/gpio92 debugfs levels when no switch evdev is available. It publishes `/run/bananarchy/lid-state` so a boot-open flip starts X unlocked, directly blanks/restores the main backlight and `white:kbd_backlight`, clears the lock flag and sends a trusted `CLOSE` to `locker.so` on open, and broadcasts `LID CLOSED|OPEN` to the cover IPC. The compiled C `bananarchy-cover-idle` replaces the CPU-spinning native `bananarchy-coverd` in the default runlevel: it is a 0%-CPU Unix SOCK_DGRAM server implementing the `bananarchy-coverctl` protocol and renders a 240x240 XRGB8888 clock or `TEST bars` to the 32-bpp `/dev/fb1` with `write()`/`fsync()`. The shipping beatles DTS keeps the known-good single internal panel and `spidev@1`; `cover-panel.dtsi` is again compile-checked but hardware-gated after live testing broke the main panel/keypad path.
|
||||||
|
- **Camera, volume keys and cover spi-mux**: `etc/modules-load.d/bananarchy-hardware.conf` plus `etc/local.d/10-bananarchy-hardware.start` load `msm8905-cam` (registers `/dev/video0`) and `spidev`. `scripts/busybox-sbin-applets.txt` restores the missing `/sbin` applets including `reboot`/`poweroff`. The compiled C `bananarchy-volume-keys` (OpenRC service `bananarchy-volume-keys`) handles `KEY_VOLUMEUP`/`KEY_VOLUMEDOWN` straight from evdev because the dwm passive X grab is unreliable; `sxmo_audio.sh` mirrors the logical volume into the first live PipeWire sink via `bananarchy_set_sink_volume()` and debounces double steps with `bananarchy_vol_debounce()`. The shipping beatles DTS keeps `spidev@1` and does not apply `cover-panel.dtsi`; the external panel remains hardware-gated. `dc_gpio = -1` remains in `/etc/bananarchy/cover-display.conf` for the retained native spidev fallback.
|
||||||
|
- **BusyBox applet completeness**: `scripts/busybox-applets.txt` is the canonical `/bin` applet list and `apply-bananarchy-overlay.sh` recreates any missing symlinks. A rootfs snapshot without `/bin/ash` (the `user` login shell) or `/bin/grep` (used by `openrc-run.sh`) breaks sshd logins and prevents the sysinit `udev` service from starting; without udev, input nodes stay root-owned and untagged, elogind gives Xorg no devices and the keypad is dead. `overlay/rootfs/etc/udev/rules.d/99-bananarchy-input-seat.rules` forces `TAG+="seat"`, `GROUP="input"`, `MODE="0660"`; restart `tinydm` after starting udev. The lk2nd `paint_boot_banner()` in `bootloader/lk2nd/nokia-beatles.patch` draws the branded RGB565 boot splash, not the old striped test pattern.
|
||||||
|
- **First-boot access (2720 Flip)**: `overlay/rootfs/etc/pam.d/sshd` supplies an explicit `pam_unix` stack and `overlay/rootfs/etc/ssh/sshd_config.d/90-bananarchy-access.conf` enables password/keyboard-interactive auth, because `50-postmarketos-ui-policy.conf` sets `UsePAM yes` while the plain `/usr/sbin/sshd` rejects that directive; `overlay/rootfs/etc/conf.d/sshd` pins `/usr/sbin/sshd.pam`. `overlay/rootfs/etc/ssh/sshd_config_debug` plus `etc/local.d/20-bananarchy-sshd-debug.start` keep a USB-only (172.16.42.1:2222) PAM-free fallback login; `keys/phone_id_ed25519.pub` is pre-authorized for `user` and `root`. The shipping `extlinux.conf` must contain `quiet splash` (the pmOS initramfs defaults to `nosplash=y`); `scripts/sync-beatles-bootfs.py` restores it and `scripts/check-beatles-bootimg.py` rejects debug cmdlines. `overlay/rootfs/usr/lib/udev/rules.d/99-bananarchy-keypad.rules` and `usr/share/X11/xorg.conf.d/60-bananarchy-keypad.conf` force X to attach the GPIO matrix keypad; `usr/bin/bananarchy-keypad-diagnose.sh` collects live input state. The external 240x240 panel firmware lives in `devices/nokia-beatles/nokia,beatles-gc9305-ext-panel.bin/.txt`; `devices/nokia-beatles/cover-panel.dtsi` is a compile-checked but unapplied reference; `devices/nokia-beatles/qcom-msm8905-nokia-beatles.dts` keeps the shipping single-panel layout, and `scripts/check-rebuild.sh` verifies DTB/DTS sync and rejects an accidentally applied cover overlay. The `mux-core`, `mux-gpio` and `spi-mux` modules are built and loaded. The recovered native `usr/bin/bananarchy-coverd` is retained only for diagnostics; `dc_gpio = -1` and the external node's missing `dc-gpios` property keep it from fighting `panel-mipi-dbi-spi` for gpio110. gpio13 selection and external reset polarity still require a physical cover-panel sign-off.
|
||||||
|
|
||||||
## 3. Build and image generation commands
|
## 3. Build and image generation commands
|
||||||
All cross-compilation scripts run inside rootless Docker (`alpine:3.24` `armv7` sysroot) and write to `prebuilt/`; `build-sxmo-x11.sh`, `sync-prebuilt-overlay.sh`, and `rebuild-image.sh` mirror those artifacts into `overlay/rootfs/` (and `build-sxmo-x11.sh` also refreshes `rootfs/` when present):
|
All cross-compilation scripts run inside rootless Docker (`alpine:3.24` `armv7` sysroot) and write to `prebuilt/`; `build-sxmo-x11.sh`, `sync-prebuilt-overlay.sh`, and `rebuild-image.sh` mirror those artifacts into `overlay/rootfs/` (and `build-sxmo-x11.sh` also refreshes `rootfs/` when present):
|
||||||
- `./scripts/build-sxmo-x11.sh` — builds `libneoui.so`, `st`, `dmenu.so`, `dwm`, `dwm-plugin`, `bananarchy-verify-passcode`, `bananarchy-melody`, `sxmo_vibrate`, and all C++ `.so` plugins (`locker`, `passcode`, `xdrawer`, `dialer`, `calllog`, `callscreen`, `contacts`, `sms`, `files`, `camera`, `themes`, `modem`, `networks`, `ringtones`, `wallpapers`, `music`, `sip`, `email`, `irc`, `tox`, `smallweb`, `webarchy`, `gps`, `privacy`, `engmenu`).
|
- `./scripts/build-sxmo-x11.sh` — builds `libneoui.so`, `st`, `dmenu.so`, `dwm`, `dwm-plugin`, `bananarchy-verify-passcode`, `bananarchy-melody`, `sxmo_vibrate`, and all C++ `.so` plugins (`locker`, `passcode`, `xdrawer`, `dialer`, `calllog`, `callscreen`, `contacts`, `sms`, `files`, `camera`, `themes`, `modem`, `networks`, `ringtones`, `wallpapers`, `music`, `sip`, `email`, `irc`, `tox`, `smallweb`, `webarchy`, `gps`, `privacy`, `engmenu`).
|
||||||
@@ -38,7 +46,7 @@ All cross-compilation scripts run inside rootless Docker (`alpine:3.24` `armv7`
|
|||||||
- `./scripts/build-dmenu.sh` — rebuilds only `dmenu.so`, `stest`, `dmenu_path`, and `dmenu_run`.
|
- `./scripts/build-dmenu.sh` — rebuilds only `dmenu.so`, `stest`, `dmenu_path`, and `dmenu_run`.
|
||||||
- `./scripts/build-games.sh` — builds standalone X11 games and emulators in `src/games/` (`snake`, `tetris`, `scoundrel`, `gambatte` / `gbemu`, `remedy` / `j2me`).
|
- `./scripts/build-games.sh` — builds standalone X11 games and emulators in `src/games/` (`snake`, `tetris`, `scoundrel`, `gambatte` / `gbemu`, `remedy` / `j2me`).
|
||||||
- `./scripts/build-fcitx5-t9.sh` — builds `src/fcitx5-t9` (`libt9.so` / `t9.so`).
|
- `./scripts/build-fcitx5-t9.sh` — builds `src/fcitx5-t9` (`libt9.so` / `t9.so`).
|
||||||
- `./scripts/build-kernel-audio.sh` — builds `6.12.1-msm8916` Adreno 304 `drm/msm`, QDSP6 audio, torch LED, camera `.ko` modules, device `.dtb` files, and the `zImage` kernel image from `patches/kernel/config-bananarchy-msm8909.armv7` (exported as `overlay/rootfs/boot/vmlinuz`, `config`, `System.map`). The resolved `.config` is written back to the config file so the module build and the shipped kernel never drift. **Never change `CONFIG_PREEMPT*`, `CONFIG_PM_SLEEP`/`CONFIG_SUSPEND`, `CONFIG_SMP`, `CONFIG_MODVERSIONS`, `CONFIG_MODULE_UNLOAD`, `CONFIG_ENERGY_MODEL`, `CONFIG_PERF_EVENTS`, `CONFIG_FUNCTION_GRAPH_TRACER` or `CONFIG_HZ` in that config without also rebuilding every module from the pmaports kernel package**: vermagic, `struct dev_pm_info` / `struct device` / `struct task_struct` layouts, and the `HZ` macro compiled into module inlines must match the untouched package modules. `CONFIG_SCHED_HRTICK` and `CONFIG_CPU_IDLE_GOV_TEO` are ABI-safe but effectively no-ops on this 2-core, 2-idle-state target. See `BATTERY-OPTIMIZATION-ANALYSIS.md` §14 for the full cost/benefit analysis.
|
- `./scripts/build-kernel-audio.sh` — builds `6.12.1-msm8916` Adreno 304 `drm/msm`, QDSP6 audio, torch LED, camera, gpio-mux and spi-mux `.ko` modules, device `.dtb` files, and the `zImage` kernel image from `patches/kernel/config-bananarchy-msm8909.armv7` (exported as `overlay/rootfs/boot/vmlinuz`, `config`, `System.map`). The resolved `.config` is written back to the config file so the module build and the shipped kernel never drift. **Never change `CONFIG_PREEMPT*`, `CONFIG_PM_SLEEP`/`CONFIG_SUSPEND`, `CONFIG_SMP`, `CONFIG_MODVERSIONS`, `CONFIG_MODULE_UNLOAD`, `CONFIG_ENERGY_MODEL`, `CONFIG_PERF_EVENTS`, `CONFIG_FUNCTION_GRAPH_TRACER` or `CONFIG_HZ` in that config without also rebuilding every module from the pmaports kernel package**: vermagic, `struct dev_pm_info` / `struct device` / `struct task_struct` layouts, and the `HZ` macro compiled into module inlines must match the untouched package modules. `CONFIG_SCHED_HRTICK` and `CONFIG_CPU_IDLE_GOV_TEO` are ABI-safe but effectively no-ops on this 2-core, 2-idle-state target. See `BATTERY-OPTIMIZATION-ANALYSIS.md` §14 for the full cost/benefit analysis.
|
||||||
- `./scripts/build-xlibre.sh` — builds Xlibre `Xorg`, `libglamoregl.so`, `libglx.so`, and `modesetting`/`libinput`/`fbdev` DDX drivers.
|
- `./scripts/build-xlibre.sh` — builds Xlibre `Xorg`, `libglamoregl.so`, `libglx.so`, and `modesetting`/`libinput`/`fbdev` DDX drivers.
|
||||||
- `./scripts/build-bantam.sh` — fetches and cross-compiles the `bantam` AI agent.
|
- `./scripts/build-bantam.sh` — fetches and cross-compiles the `bantam` AI agent.
|
||||||
- `./scripts/generate-artwork.py` — regenerates wallpapers, splashes, and icons from `artwork/icon-large.png`.
|
- `./scripts/generate-artwork.py` — regenerates wallpapers, splashes, and icons from `artwork/icon-large.png`.
|
||||||
@@ -47,6 +55,8 @@ All cross-compilation scripts run inside rootless Docker (`alpine:3.24` `armv7`
|
|||||||
- `./rebuild-image.sh <device> [--mkinitfs]` — verifies the clone, syncs `prebuilt/` into `overlay/rootfs/`, bootstraps `rootfs/` from scratch when missing, applies the overlay, and produces flashable images in `images/`.
|
- `./rebuild-image.sh <device> [--mkinitfs]` — verifies the clone, syncs `prebuilt/` into `overlay/rootfs/`, bootstraps `rootfs/` from scratch when missing, applies the overlay, and produces flashable images in `images/`.
|
||||||
- `./scripts/bootstrap-rootfs.sh [rootfs-dir] [device] [--force|--check]` — creates a complete `armv7` rootfs from `scripts/rootfs-packages.txt` inside rootless Docker; idempotent via `etc/bananarchy/rootfs-bootstrap.done`.
|
- `./scripts/bootstrap-rootfs.sh [rootfs-dir] [device] [--force|--check]` — creates a complete `armv7` rootfs from `scripts/rootfs-packages.txt` inside rootless Docker; idempotent via `etc/bananarchy/rootfs-bootstrap.done`.
|
||||||
- `./scripts/prune-rootfs-packages.sh <rootfs-dir> world|purge` — removes Wayland-only, Rust-based, and retired packages from a target rootfs inside the build container.
|
- `./scripts/prune-rootfs-packages.sh <rootfs-dir> world|purge` — removes Wayland-only, Rust-based, and retired packages from a target rootfs inside the build container.
|
||||||
|
- `./scripts/build-bananarchy-daemons.sh` — cross-builds the three compiled ARM idle daemons (`bananarchy-lid`, `bananarchy-cover-idle`, `bananarchy-volume-keys`) from `src/bananarchy-daemons/`; `--check` validates the ARM ELF artifacts and overlay sync. No Python-based daemon runs in the idle system.
|
||||||
|
- `./scripts/build-lk2nd-beatles.sh` — cross-builds all three beatles lk2nd images (normal, diagnostic and display; the display image is the flasher default) from the pinned upstream lk2nd commit plus `bootloader/lk2nd/nokia-beatles.patch` in rootless Docker (`--check` validates all three shipped images, `--only normal|diagnostic|display` builds one, `--force-panel-init` forces the panel replay, `--with-display` enables SPI display during boot). Offline validators: `scripts/check-lk2nd-beatles.py` and `scripts/test-lk2nd-beatles-port.py`.
|
||||||
- `./scripts/check-rebuild.sh` — offline preflight for a clean clone (syntax, package list, plugin artifacts, overlay sync, SMS long-message rendering guard, ignored local agent config, Docker, version helper).
|
- `./scripts/check-rebuild.sh` — offline preflight for a clean clone (syntax, package list, plugin artifacts, overlay sync, SMS long-message rendering guard, ignored local agent config, Docker, version helper).
|
||||||
- `./scripts/sync-prebuilt-overlay.sh [--check]` — mirrors `prebuilt/` artifacts into `overlay/rootfs/`; `--check` only reports drift.
|
- `./scripts/sync-prebuilt-overlay.sh [--check]` — mirrors `prebuilt/` artifacts into `overlay/rootfs/`; `--check` only reports drift.
|
||||||
- `./scripts/bootstrap-flash-deps.sh` — installs `pyusb` and `pyserial` into the gitignored `.flash-deps/` directory for `flash-edl.py`.
|
- `./scripts/bootstrap-flash-deps.sh` — installs `pyusb` and `pyserial` into the gitignored `.flash-deps/` directory for `flash-edl.py`.
|
||||||
@@ -82,3 +92,12 @@ network-up events, and keep `var/lib/chrony` owned by the `chrony` user. Network
|
|||||||
- **Core tools**: `curl`, `bc`, `ed`, `rlwrap`, `mandoc`, `nano`, `less`, and `frotz` are pinned core tools asserted by `scripts/check-rebuild.sh`. Perl, Lua, optional Tcl extensions, and the `sqlite` CLI are excluded, while `tcl`, `python3`, `bash`, `luajit`, `gawk`, `jq`, `gojq`, and `quickjs` remain as hard runtime dependencies.
|
- **Core tools**: `curl`, `bc`, `ed`, `rlwrap`, `mandoc`, `nano`, `less`, and `frotz` are pinned core tools asserted by `scripts/check-rebuild.sh`. Perl, Lua, optional Tcl extensions, and the `sqlite` CLI are excluded, while `tcl`, `python3`, `bash`, `luajit`, `gawk`, `jq`, `gojq`, and `quickjs` remain as hard runtime dependencies.
|
||||||
- **Local agent config**: `.bantam.cfg` is a local, gitignored credential file. Never read, edit, commit, or unignore it; `scripts/check-rebuild.sh` verifies that its ignore rule stays in place.
|
- **Local agent config**: `.bantam.cfg` is a local, gitignored credential file. Never read, edit, commit, or unignore it; `scripts/check-rebuild.sh` verifies that its ignore rule stays in place.
|
||||||
- **Sentence case**: always use sentence case in subheadings and list items across all documentation files (`README.md`, `MANUAL.md`, `SDK.md`, `CHANGELOG.md`, `AGENTS.md`).
|
- **Sentence case**: always use sentence case in subheadings and list items across all documentation files (`README.md`, `MANUAL.md`, `SDK.md`, `CHANGELOG.md`, `AGENTS.md`).
|
||||||
|
|
||||||
|
## 5. Final 2720 Flip image method
|
||||||
|
|
||||||
|
- `images/bananarchy-nokia-beatles.img`, `images/boot-bananarchy-nokia-beatles.img`, and `images/boot-lk2nd-nokia-beatles-display.img` are the physically verified known-good release artifacts. Their hashes are pinned by `scripts/check-rebuild.sh`, and `images/bananarchy-nokia-argon.img` is pinned as the matching 8110 4G release image.
|
||||||
|
- The known-good display lk2nd binary predates the low-bit reboot cookie. `scripts/check-lk2nd-beatles.py` accepts that one image with `--allow-missing-cookie`; `scripts/build-lk2nd-beatles.sh`, `scripts/test-lk2nd-beatles-port.py`, and `scripts/check-rebuild.sh` pass the flag only for the display variant. The source patch still contains the cookie for future source-built images.
|
||||||
|
- `src/sxmo-dwm/dwm.c` uses the known-good 350 ms wake guard. Do not reintroduce the 120 ms `WAKE_KEY_DEBOUNCE_MS` experiment: it allowed a cold-boot key to open a resident `dmenu` window that held the keyboard grab.
|
||||||
|
- `overlay/rootfs/usr/bin/bananarchy-x11-session.sh` performs one startup `dwm-plugin dmenu close`, trusted locker `CLOSE`, and `Escape` key to release stale startup keyboard grabs. It does not leave a background poller running.
|
||||||
|
- `prepare-release.sh` packages the verified images by default and copies `bootloader/lk2nd-msm8909.img` for non-beatles targets. Set `BA_REBUILD=1` only when intentionally regenerating images from source.
|
||||||
|
- Release cleanup removes `backup/`, `.lk2nd-build/`, `__pycache__/`, stale debug boot images, and scratch logs. All `images/` files are local build outputs and are not tracked in git; `prepare-release.sh` rebuilds missing artifacts from source, and `check-rebuild.sh` pins the physically verified hashes only when those local artifacts exist.
|
||||||
+359
@@ -9,6 +9,365 @@ Release versions follow the `<year-letter><MM><DD>` format (where `2026` is `a`,
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Unreleased — decisive known-good 2720 Flip recovery
|
||||||
|
|
||||||
|
- **Live regression**: after the final `a1108` image set, X started and SSH worked, but the user saw a garbled main panel and reported that input was unresponsive. X inspection found a viewable `dmenu` window holding the keyboard path; `xdotool key Escape` unmapped it. The fullscreen `Phone Lock` window was already unmapped.
|
||||||
|
- **One decisive recovery**: entered EDL directly from Linux with `next_reboot_mode=edl`, then performed one verified `--method lk2nd` flash from the last physically working `images-before-release` set. No fastboot/menu reboot loop was used.
|
||||||
|
- **Recovery image hashes**:
|
||||||
|
- raw `bananarchy-nokia-beatles.img`: `e2267187c58920b5c5b822d940b81e0df8f59e7788fed00e3d31dfbdb290c7fc`
|
||||||
|
- standalone `boot-bananarchy-nokia-beatles.img`: `6715abd414fd02fd21ca8c2cd621a8a21e78f46d079b2d185b38a1f7a4a3e659`
|
||||||
|
- display `boot-lk2nd-nokia-beatles-display.img`: `e1fdd8551b6393184a465638881b63ca58c04e1e8f655f092260a18379e1cbe6`
|
||||||
|
- shipping DTB remains `8a14f7bc0499c254da9fb524fba1ef3ce0a3e721afb8ee43d37d72a75b615b3b`.
|
||||||
|
- **Flash result**: `boot` and `recovery` read-back matched, `userdata` wrote successfully, the stock `system` superblock was cleared, and reset returned `18d1:d001` Linux USB with root SSH, user network, Xorg and dwm running.
|
||||||
|
- **Post-boot state**: `state=unlock`, no lock flag, backlight 14, `xset` OK, `keypad`, `gpio-keys` and `pm8941_pwrkey` enumerated by X, `fb0=240,320` at 32 bpp, `/dev/fb1` absent, no `spi_mux`/`mux_gpio`/`mux_core` loaded, and both `dmenu` and `Phone Lock` windows unmapped. The X screenshot is a normal 240x320 desktop with 12118 colors rather than a garbled or blank frame.
|
||||||
|
- **Release note**: the verified `images/` artifacts are local build outputs and are not tracked in git. `scripts/check-rebuild.sh` pins their hashes when present; `prepare-release.sh` rebuilds missing artifacts from source and copies `bootloader/lk2nd-msm8909.img` for non-beatles targets. `BA_REBUILD=1` remains the explicit forced-rebuild path.
|
||||||
|
- **Final source guard**: `dwm` is back on the known-good 350 ms wake guard, and the X session performs one startup `dmenu` close plus `Escape` to release stale keyboard grabs. The known-good display lk2nd binary predates the low-bit reboot cookie, so `scripts/check-lk2nd-beatles.py` accepts that one image with `--allow-missing-cookie` while the source patch retains the cookie.
|
||||||
|
- **Cleanup**: EDL backup dumps, local lk2nd build caches, Python bytecode, stale diagnostic boot images and scratch logs were removed from the release tree. Image blobs were removed from git tracking while the local verified copies remain available for immediate packaging and flashing. Both `nokia-argon` and `nokia-beatles` images were rebuilt into scratch output directories and validated for flashability without overwriting the verified release images.
|
||||||
|
|
||||||
|
## Unreleased — cover overlay rollback after live regression
|
||||||
|
|
||||||
|
- **Live failure**: with the `spi-mux` cover overlay applied, X reported viewable dmenu windows and the keypad watcher logged both raw evdev and X key events, but the user still saw no dmenu and reported the keypad and main panel as unresponsive. Plymouth also disappeared from the visible boot chain. The external overlay is therefore not safe to ship on this unit.
|
||||||
|
- **Rollback**: restored the known-good single-panel beatles DTB (`8a14f7bc...`), removed the folded `spi-mux`/`gpio-mux`/external-panel nodes from `qcom-msm8905-nokia-beatles.dts`, restored `spidev@1` and kept `cover-panel.dtsi` as a compile-checked but unapplied hardware-gated reference. `check-rebuild.sh` now rejects a shipping DTB that contains the cover overlay.
|
||||||
|
- **Live state after rollback**: forced sysrq reboot with the base DTB, `/dev/fb0` is again 240x320 internal, `/dev/fb1` is absent, `bananarchy-coverctl STATUS` reports `backend=none`, `state=unlock`, backlight 14, no lock flag, and no kernel oops or RCU stall.
|
||||||
|
- **Kept fixes**: OpenRC parallel startup with the patched `local` service, bounded `udevadm settle`, independent USB fallback sshd, event-driven 80 ms lid debounce, boot-open unlock guard, compiled C daemons and 32-bpp cover renderer code remain; the 120 ms keypad wake experiment was reverted to the physically verified 350 ms guard, and the X session now releases stale `dmenu`/xlocker keyboard grabs once at startup. The cover renderer is idle until hardware exposes `/dev/fb1`.
|
||||||
|
- **Finalized release method**: the physically verified known-good raw image, standalone boot image and display lk2nd image hashes are pinned by `scripts/check-rebuild.sh`. The display lk2nd binary predates the low-bit reboot cookie, so `scripts/check-lk2nd-beatles.py` accepts that one image with `--allow-missing-cookie` while the source patch retains the cookie for future builds. `prepare-release.sh` packages the verified images by default; set `BA_REBUILD=1` to regenerate them from source.
|
||||||
|
- **Cleanup**: removed EDL backup dumps, local lk2nd build caches and Python bytecode from the release tree. Temporary diagnostic images and scratch logs are no longer part of the shipped release set.
|
||||||
|
- **Release state**: the raw image, standalone boot image and validators are rebuilt against the rolled-back DTB. Physical main-panel/keypad verification after this rollback is required before any further cover-panel work.
|
||||||
|
|
||||||
|
## Unreleased — startup, keypad and cover-panel regression fixes
|
||||||
|
|
||||||
|
- **X startup**: measured `Xorg` starting 48.92 s after kernel boot, with an approximately 27 s gap between the early sysinit services and the default runlevel. The unbounded sysinit `udev-settle` service was the gate: missing modem firmware keeps udev events pending. `overlay/rootfs/etc/conf.d/udev-settle` pins `udev_settle_timeout=2` and `bananarchy-lid` starts before `tinydm` so the X session does not wait for the modem/network chain. A live test with `rc_parallel="YES"` moved Xorg from 48.92 s to 27.96 s, but the stock OpenRC `local` service deadlocked on its `after *` dependency. `etc/init.d/local` is now patched to `after modules udev-settle`, parallel startup is enabled, and `bananarchy-sshd-debug` is an independent default-runlevel service.
|
||||||
|
- **Boot keypad**: `bananarchy-x11-session.sh` previously always wrote `/tmp/bananarchy_screen_locked` and `state=lock`, mapping a fullscreen `Phone Lock` window that consumed keys. The flip X session now waits up to 2 s for `/run/bananarchy/lid-state`; an open lid removes the lock flag and starts `state=unlock`, while a closed lid starts `screenoff` with both backlights off. `locker.so` now accepts a trusted `CLOSE` after the root lid daemon clears the lock flag, releasing any stale keyboard grab and unmapping the lock window.
|
||||||
|
- **Lid reaction**: the 600 ms debugfs-polling debounce was replaced with an event-driven `EV_SW` switch-mask reader on `/dev/input/event2` (`SW_LID` and `SW_KEYPAD_SLIDE`), an 80 ms stability window and debugfs gpio36/gpio92 only as fallback. The daemon writes the boot state file, directly writes `brightness`/`bl_power`/keypad LED before spawning the measured 2.4 s `sxmo_state.sh set screenoff` hook, and clears the lock flag before `sxmo_state.sh set unlock`.
|
||||||
|
- **Cover display**: The cover-panel nodes are folded directly into `devices/nokia-beatles/qcom-msm8905-nokia-beatles.dts`; `cover-panel.dtsi` remains a compile-checked reference. The shipping DTB disables the conflicting `spidev@1`, adds `gpio-mux` on gpio13 and `spi-mux` with internal `display@0` registered before external `display@1`, and omits `dc-gpios` on the external panel so `mipi_dbi_spi_init()` uses 9-bit MIPI DBI Type C Option 1 SPI instead of fighting the internal panel for gpio110. `bananarchy-cover-idle` renders `TEST bars`, `TEST solid`, `TEST off` and the clock to `/dev/fb1`; `check-rebuild.sh` verifies the final DTB contains the overlay and stock qcom IDs. Physical gpio13 selection and external reset polarity still require user sign-off.
|
||||||
|
- **Cover renderer bus error**: the shipping `/dev/fb1` is a 32-bpp DRM fbdev (`bits_per_pixel=32`, `stride=960`, `smem_len=230400`). The old 16-bpp `mmap()`/`msync()` renderer received `SIGBUS` on the first pixel write. `bananarchy-cover-idle` now reads the fbdev geometry from sysfs, renders XRGB8888 into a shadow buffer and commits it with `write()` plus `fsync()`. Live `bananarchy-coverctl STATUS` reports `backend=fb`, `TEST bars` writes a nonblank framebuffer, and the service stays started.
|
||||||
|
- **Validation state**: the connected phone was force-rebooted after the earlier `reboot -f` did not fire. OpenRC parallel startup with the patched `local` service puts Xorg at 27.38 s and `dwm` at 30.74 s, with root SSH on port 2222, `local`, `bananarchy-lid`, `bananarchy-sshd-debug` and `bananarchy-cover-display` all started. `/dev/fb0` is 240x320 internal, `/dev/fb1` is 240x240 external, and there is no kernel oops or RCU stall. A transient boot xlocker mapping was fixed with a 10 s open-lid unlock guard; after an X restart the phone is `state=unlock`, the lock window is unmapped and backlight/keypad are on. No Python daemon or network poller is present. The final raw image, standalone boot image, lk2nd images, all offline validators and `e2fsck -fn` pass. Physical keypad, flip close/open and cover-panel appearance still require user sign-off; the cover overlay was subsequently rolled back after a live regression.
|
||||||
|
|
||||||
|
## Unreleased — lid hall-sensor debounce
|
||||||
|
|
||||||
|
- Stopping the compiled lid daemon held the phone at `state=unlock`, `lock=no`, backlight 14 with both hall lines high, proving the repeated `screenoff` was caused by a momentary hall/GPIO transition rather than missing keypad events. Added `LID_STABLE_MS 600` to `bananarchy-lid`: a candidate open/closed state must remain stable for 600 ms before `sxmo_state.sh set screenoff`/`unlock` and backlight/cover IPC actions run. `check-rebuild.sh` guards against the old immediate-transition logic.
|
||||||
|
- Deployed the debounced ARM `bananarchy-lid` to the live phone and restarted the service. With both hall lines high, the phone stayed `state=unlock`, `lock=no`, backlight 14 for the full observation window, with no Python process and no network poller. The final image set was rebuilt with the debounced daemon and all offline validators pass.
|
||||||
|
|
||||||
|
## Unreleased — keypad wake and lock-screen diagnosis
|
||||||
|
|
||||||
|
- The keypad watcher showed 27 raw kernel key presses and 29 X key presses with matching releases: the matrix, udev, Xorg and XKB path is not dropping keys. The phone was on the fullscreen `Phone Lock` passcode screen, so xlocker intentionally consumed those events. Unlocking via the locker IPC restored `state=unlock`, removed `/tmp/bananarchy_screen_locked`, unmapped the lock window and restored the backlight.
|
||||||
|
- Reduced the post-wake input suppression in `dwm` from 350 ms key / 500 ms softkey to a 120 ms `WAKE_KEY_DEBOUNCE_MS`, and reduced locker unlock/locking suppression from 350/400/80 ms to 120/120/40 ms. This removes the "press again" feel immediately after wake or unlock while retaining a short guard against accidental wake keys.
|
||||||
|
- Rebuilt `dwm` and `locker.so`, restarted the X session and re-unlocked the live phone. State is `unlock`, the lock window is unmapped, backlight is restored, no Python process remains in the idle system, no `nmcli device monitor` poller is running and the shell-only keypad watcher was restarted. The final image set was rebuilt with the new X11 binaries and debounce guards; `check-rebuild.sh`, boot/DTB/lk2nd validators and `e2fsck -fn` pass. A fresh physical key test is still required after the unlock.
|
||||||
|
|
||||||
|
## Unreleased — compiled idle daemons and keypad latency
|
||||||
|
|
||||||
|
- **No Python-based idle daemons**: rewrote `bananarchy-lid`, `bananarchy-cover-idle` and `bananarchy-volume-keys` as dependency-free C ARM binaries under `src/bananarchy-daemons/`, added `scripts/build-bananarchy-daemons.sh`, removed the three `.py` daemons from the shipping overlay and switched all OpenRC services to the compiled commands. A `SIGCHLD` reaper prevents the zombie `sxmo_state.sh`/`sxmo_audio.sh` children left by the Python daemons; `poll()` loops, stale-fd pruning and `flock` singletons keep the idle CPU near zero. `check-rebuild.sh` now fails if any retired Python daemon script or service reference returns.
|
||||||
|
- **Keypad latency**: the X session now sets `xset r rate 180 30` instead of the 660 ms default auto-repeat delay, and the session hooks stop the leftover `nmcli device monitor` poller. The temporary Python physical-verification watcher was removed; a shell-only keypad watcher is used when capturing physical key events.
|
||||||
|
- **Live verification**: no `python3` process remains in the idle system, the three compiled services are started, `bananarchy-coverctl STATUS` round-trips, X reports `auto repeat delay: 180 / repeat rate: 30`, the `nmcli device monitor` poller is gone, there are zero zombie children, and a 2 s `/proc/stat` sample reports 96% idle. The final raw image was rebuilt with the compiled binaries, no retired `.py` daemon scripts and service commands pointing at the compiled ARM ELF files; `check-rebuild.sh`, boot/DTB/lk2nd validators, `sync-beatles-bootfs.py --check` and `e2fsck -fn` pass. A shell-only keypad watcher logs raw evdev and X events to `/run/bananarchy-keypad-verify.log`; the user still needs to press keys and report whether the keypad feels responsive.
|
||||||
|
|
||||||
|
## Unreleased — lk2nd menu and release hygiene
|
||||||
|
|
||||||
|
- **lk2nd Fastboot menu restored**: the Power menu's `sxmo_power.sh loader` writes `FASTBOOT_MODE` into `PON_SOFT_RB_SPARE[1:0]`, but the stock boot chain scrubs bits `[7:2]` before chain-loading lk2nd while upstream lk2nd only reads those high bits. `platform/msm_shared/reboot.c` now prefers the low-bit cookie and writes low-bit cookies for all small reboot reasons, while still accepting the high-bit `fastboot reboot-bootloader` cookie. The display-enabled image is the default for `flash-edl.py`, `check-rebuild.sh` validates it, and `prepare-release.sh` packages it. Live verification: the Power-menu cookie reaches lk2nd fastboot in 6 s, `fastboot oem screenshot` stages a 240x320 frame with the menu text, `fastboot getvar lk2nd:version` reports `bananarchy-beatles-a1109-display-r3`, and `fastboot reboot-bootloader` returns to the same lk2nd menu. Use `fastboot reboot` to return to Linux.
|
||||||
|
- **Abandoned pstore_blk diagnostics removed**: `CONFIG_PSTORE_BLK`, `CONFIG_PSTORE_ZONE` and the scratch `cache` PARTUUID settings are gone from the kernel config copies; `vmlinuz`, `System.map`, config, modules and DTBs were rebuilt from the clean config. `pstore_blk_get_config` no longer appears in either shipped `System.map`, and the stale `-debug`/`-ramoops` standalone boot images were removed.
|
||||||
|
- **Cover kernel modules built**: `scripts/build-kernel-audio.sh` now builds and exports `mux-core.ko.zst`, `mux-gpio.ko.zst` and `spi-mux.ko.zst`; `modules-load.d/bananarchy-hardware.conf` and `local.d/10-bananarchy-hardware.start` load them, and `check-rebuild.sh` guards the modules, config and release hygiene. `devices/nokia-beatles/cover-panel.dtsi` remains opt-in: gpio13 polarity and external reset/DC routing still require physical validation before it is applied to the shipping DTB.
|
||||||
|
- **Full clean rebuild**: `./rebuild-image.sh nokia-beatles --mkinitfs` was rerun against an empty scratch rootfs with the pinned `a1108` / `dejavu` release. It regenerated `images/bananarchy-nokia-beatles.img` and `images/boot-bananarchy-nokia-beatles.img`; `check-rebuild.sh`, `check-beatles-bootimg.py`, `sync-beatles-bootfs.py --check`, `build-lk2nd-beatles.sh --check`, `test-lk2nd-beatles-port.py`, Python/shell syntax checks and `e2fsck -fn` all pass. A dangling `/bin/linux32` BusyBox symlink from the fresh package set initially aborted the overlay; `apply-bananarchy-overlay.sh` now removes dangling symlinks before recreating them and `check-rebuild.sh` guards that path.
|
||||||
|
- **Final EDL flash**: the EDL menu path entered `05c6:9008`, the clean image set was flashed with `--verify`, the live `boot` partition read back as the display lk2nd image, and the post-reset `lk2nd:version` matched before `fastboot reboot` returned to Linux. Main and fallback SSH, `a1108` / `dejavu`, release `quiet splash` cmdline, loaded `mux-core`/`mux-gpio`/`spi-mux`, camera/spidev nodes, X keypad devices and idle lid/cover/volume services were verified. The abandoned `--debug-boot` flasher path was removed with its stale diagnostic images. A temporary hardware watcher now logs lid transitions to `/run/bananarchy-physical-verify.log`; the user still needs to close/open the flip and visually inspect the cover display.
|
||||||
|
- **Physical verification**: the lid daemon's close/open transitions are unit-tested and live services are idle, but final physical lid close/open and cover-panel appearance must be confirmed on the final flashed image by the user.
|
||||||
|
|
||||||
|
## Unreleased — flip lid handling, idle cover daemon
|
||||||
|
|
||||||
|
- **Closing the lid did not blank/lock**: `dwm` only reacts to `SW_LID` and then re-checks `EVIOCGSW` 60 ms later, but the 2720 hall sensors are effectively momentary and `EVIOCGSW` reads back 0 while the native cover daemon still reports `lid=closed`. Added `bananarchy-lid.py` (OpenRC service `bananarchy-lid`) with a singleton lock, stale-fd pruning and 0.2 s polling. It reads the raw hall levels from debugfs gpio (gpio36/gpio92 are `in high` with the flip open and go `low` on close) as the authoritative signal, with EV_SW events as a fallback; it handles both `SW_LID` and `SW_KEYPAD_SLIDE`. On close it runs `sxmo_state.sh set screenoff` (which already blanks the backlight, turns the keypad LED off and writes the lock file), forces both backlight sysfs nodes to 0 and tells the cover daemon `LID CLOSED`; on open it runs `sxmo_state.sh set unlock` and restores them. Verified live: close -> `state=screenoff`, backlight 0, keypad LED 0, lock file present; open -> `state=lock`, backlight 10, keypad LED 1.
|
||||||
|
- **Cover daemon CPU spin**: the recovered native `bananarchy-coverd` busy-loops at ~100% CPU on every backend (`none`, `sim`, `spidev` all measured ~100 ticks/s) and paints nothing because gpio110 (DC) is owned exclusively by `panel-mipi-dbi-spi`. Replaced it in the default runlevel with `bananarchy-cover-idle.py`: a 0%-CPU Unix datagram server that keeps the full `bananarchy-coverctl` protocol (PING/STATUS/LID/NOTIFY/CALL/SMS/BATTERY/TEST/REFRESH/QUIT), tracks lid state and renders a 240x240 RGB565 clock to `/dev/fb1` as soon as the kernel exposes it. Verified `STATUS`/`LID CLOSED` round-trips and all three daemons at 0% CPU.
|
||||||
|
- **Cover panel still blank**: there is no `/dev/fb1` (or usable `/dev/spidev0.1` DC line). The remaining work is kernel-side: build `mux-core`/`mux-gpio`/`spi-mux` (`CONFIG_MULTIPLEXER`/`CONFIG_MUX_GPIO`/`CONFIG_SPI_MUX` are already `=m`), wire the compile-tested `cover-panel.dtsi` into the DTB so a second `panel-mipi-dbi-spi` exposes `/dev/fb1`, and confirm how the gpio13/gpio36 switch routes DC/CS. The userspace renderer is ready and waiting.
|
||||||
|
- `check-rebuild.sh` guards the lid daemon, its debugfs fallback, the idle cover daemon and the service wiring.
|
||||||
|
|
||||||
|
## Unreleased — volume daemon CPU-spin regression (camera app appeared hung)
|
||||||
|
|
||||||
|
- The camera plugin was not hung: it was sleeping normally in `poll()` but starved of CPU. Two `bananarchy-volume-keys.py` instances (one from OpenRC, one left over from a debug run) were each burning ~44% CPU because destroyed uinput test devices left `(deleted)` evdev fds that `select()` reports readable forever, and the read-error path just looped. On the 2-core MSM8905 that left 0% idle and froze the whole UI.
|
||||||
|
- The daemon now: takes an exclusive `flock` singleton, prunes stale fds on every rescan, closes/forgets any fd that raises `ENODEV`/`EIO`, never passes evdev fds as `exceptfds` (real key events can be reported exceptional, which dropped the fd before reading), and sleeps briefly on errors. Verified after the fix: one daemon at 0% CPU, 95% idle.
|
||||||
|
- `apply()` used `/usr/bin/su`, which does not exist (BusyBox `su` is `/bin/su`), so injected volume events were seen but no volume change happened. It now spawns `sxmo_audio.sh` directly with `user=10000, group=10000` and an explicit session environment, falling back to `/bin/su`.
|
||||||
|
- The `bananarchy_vol_debounce()` used a lock directory released by a background subshell; replaced with a `/proc/uptime` timestamp so a stale lock can never block future volume steps.
|
||||||
|
- Verified live after the fix: injected `KEY_VOLUMEUP` moves logical 90 -> 95 and the PipeWire sink 0.90 -> 0.95; `xcamera` returns immediately and `bananarchy-photo` produces a valid 600x800 JPEG in both repeated runs.
|
||||||
|
|
||||||
|
## Unreleased — camera, side volume keys, cover-panel spidev device
|
||||||
|
|
||||||
|
- **Camera persistence**: `msm8905-cam.ko` is in the image but the boot-runlevel `modules` service silently skipped most of `/etc/modules` (it needs `/bin/sed`, one of the missing BusyBox applets). `modprobe msm8905-cam` registers `/dev/video0` and `v4l2-ctl --stream-mmap` captures a real 800x600 RGB3 frame. Added `etc/modules-load.d/bananarchy-hardware.conf` and a `etc/local.d/10-bananarchy-hardware.start` retry loop so `msm8905-cam` and `spidev` are always loaded; verified `/dev/video0` exists after a full reboot. Also restored the 33 missing `/sbin` BusyBox applets (`reboot`, `poweroff`, `halt`, `syslogd`, `klogd`, `mdev`, `ip-*` ...) via `scripts/busybox-sbin-applets.txt`; `/sbin/reboot` was missing, which is why the Sxmo power menu and earlier reboot attempts did nothing.
|
||||||
|
- **Volume keys actually change volume**: the side rocker (`gpio-keys` KEY_VOLUMEUP / `pm8941_resin` KEY_VOLUMEDOWN) now reaches X with the correct `XF86AudioRaiseVolume`/`XF86AudioLowerVolume` XKB symbols, but `apply_vol_out()` pinned the PipeWire sink to a fixed 100% through `pactl set-sink-volume @DEFAULT_SINK@`, which does not resolve when wireplumber has no default configured node. Added `bananarchy_set_sink_volume()` to `sxmo_audio.sh`: it finds the first live sink id from `wpctl status` and sets it to the sxmo logical percentage (falling back to `pactl`). Verified `sxmo_audio.sh vol up 5` moves the sink 0.60 -> 0.65. Because synthetic XTest/uinput keys did not always trigger dwm's passive X grab, added `bananarchy-volume-keys.py` (a dependency-free evdev reader for KEY_VOLUMEUP/KEY_VOLUMEDOWN) with an OpenRC service, plus a 300 ms `bananarchy_vol_debounce()` in `sxmo_audio.sh` so the X and evdev paths cannot double-step. Verified with injected uinput key events: logical 80 -> 85 and PipeWire sink 0.80 -> 0.85.
|
||||||
|
- **Cover display kernel path**: added `spidev@1` (`rohm,dh2228fv`, reg 1, 50 MHz) under `spi@78b9000` to the shipping DTS/DTB, the kernel patch notes, the standalone boot.img appended DTB, `prebuilt/.../dtbs/` and the raw image's bootfs. `spi-qup` has 4 native chip selects and `spi_qup_set_cs()` always toggles the single physical CS line, so `display@0` keeps driving the internal panel while the daemon gets a second logical device. After reboot `/dev/spidev0.1` exists and `bananarchy-coverd` reports `backend=spidev` (it previously reported `backend=none`). GPIO 110 (the shared DC line) is claimed exclusively by `panel-mipi-dbi-spi`, so `dc_gpio = -1` in `/etc/bananarchy/cover-display.conf` lets the spidev backend open without fighting the kernel driver; gpio13 (mux) and gpio23 (reset) are free and used by the daemon. Fully driving the cover panel's DC still requires the `spi-mux` kernel modules plus hardware confirmation of how the switch routes DC/CS; `CONFIG_MULTIPLEXER`/`CONFIG_MUX_GPIO`/`CONFIG_SPI_MUX` and the compile-tested `cover-panel.dtsi` overlay are staged for that next step.
|
||||||
|
- `check-rebuild.sh` now guards the camera auto-load, `/sbin` applet list, PipeWire sink mirroring, the evdev volume daemon and debounce, and the `spidev@1` DT node.
|
||||||
|
|
||||||
|
## Unreleased — live boot verification: BusyBox applets, keypad, lk2nd splash
|
||||||
|
|
||||||
|
|
||||||
|
- Reflashed the fixed image over EDL and booted successfully. Plymouth now shows its boot splash between lk2nd and X; after that `ssh user@172.16.42.1` with `147147` and `keys/phone_id_ed25519` both work on port 22, and the USB-only fallback works on port 2222.
|
||||||
|
- **Actual SSH root cause**: the flashed rootfs was missing 35 BusyBox applet symlinks, including `/bin/ash` (the `user` login shell) and `/bin/grep`. sshd refuses an account whose shell does not exist, so `user` was rejected even though the shadow hash and PAM stack were correct; `root` (shell `/bin/sh`) always worked. Restored the full canonical applet list via `scripts/busybox-applets.txt`, made `apply-bananarchy-overlay.sh` fill in missing symlinks on any rootfs, and added an offline `debugfs` guard that fails `check-rebuild.sh` if the shipped image lacks `/bin/ash`.
|
||||||
|
- **Actual keypad root cause**: without `/bin/grep`, OpenRC's `openrc-run.sh` cannot start the `udev` service in the sysinit runlevel (`CONFIG_DEVTMPFS=y is required...` was a misleading downstream error). With no udev, `/dev/input/event*` stayed `0600 root:root` and had no `ID_INPUT_KEYBOARD`/`seat` tags, so elogind never handed them to the non-root X server and `xinput list` showed only the virtual core devices. Starting udev after restoring the applets produced `crw-rw---- root:input` nodes, added all four keyboards to seat0, and after `rc-service tinydm restart` Xorg enumerates `keypad`, `gpio-keys`, `pm8941_pwrkey` and `pm8941_resin`. Added `99-bananarchy-input-seat.rules` so the seat tag is guaranteed.
|
||||||
|
- **lk2nd boot screen**: replaced the striped RGB565 test pattern in `paint_boot_banner()` with a compact branded splash (dark background, banana crescent, `BANANARCHY` / `LINUX` wordmark from a built-in 5x7 font, and a progress bar). It uses only integer RGB565 writes, needs no image decoder or new library, and is still safe before the SPI bus is proven. All three lk2nd images were rebuilt and revalidated; the display variant was written to the phone's `boot` partition and read back byte-for-byte.
|
||||||
|
- **Cover display**: the shipped image already contained a native `bananarchy-coverd`/`bananarchy-coverctl` daemon, config, lid profile, udev rule and service that were absent from the source tree. A first attempt replaced it with a Python renderer; that has been reverted and the original ARM binaries recovered into `prebuilt/bananarchy-coverd/` and mirrored into the overlay, so clean rebuilds reproduce them. The daemon now starts (`backend=none`) and its IPC socket answers `STATUS`; it will switch to `fb` or `spidev` automatically as soon as the kernel exposes `/dev/fb1` or `/dev/spidev0.1`. That still requires the `spi-mux` kernel modules from `CONFIG_MULTIPLEXER`/`CONFIG_MUX_GPIO`/`CONFIG_SPI_MUX` plus the hardware-validated `cover-panel.dtsi` overlay; it is the one remaining hardware-gated item.
|
||||||
|
- Verified after a full power cycle: `user/147147` and key login on port 22, `/bin/{ash,grep,sed,ps}`, `udev` started, all four keyboards attached to X, `quiet splash plymouth.*` in `extlinux.conf`, and the new lk2nd image hash in `boot`.
|
||||||
|
|
||||||
|
## Unreleased — first boot fixes: USB SSH, boot splash, keypad input, cover display
|
||||||
|
|
||||||
|
|
||||||
|
- **USB SSH login**: the shipped image rejected `user / 147147`. The postmarketOS drop-in sets `UsePAM yes`, which makes `/etc/init.d/sshd` select `/usr/sbin/sshd.pam`; the plain `/usr/sbin/sshd` rejects that very directive as an unsupported option, and the image's `/etc/shadow` had been hand-edited with empty aging fields (`sp_lstchg == 0`). Added an explicit `/etc/pam.d/sshd` PAM stack, `PasswordAuthentication yes` / `KbdInteractiveAuthentication yes`, `SSHD_BINARY="/usr/sbin/sshd.pam"`, proper shadow aging fields, `sshd` in the `shadow` group, and `authorized_keys` for `user` and `root` (mode 0700/0600, correct uids). A second USB-only listener (`/etc/ssh/sshd_config_debug`, port 2222 bound to 172.16.42.1) uses the non-PAM binary with no `UsePAM` directive, so a broken PAM stack can never lock the developer out. Both sshd variants were verified under ARM emulation: password `147147` and the injected key both log in.
|
||||||
|
- **Boot splash**: `scripts/sync-beatles-bootfs.py --debug-cmdline` had replaced `quiet splash` with `loglevel=8 ignore_loglevel initcall_debug panic=10` in the shipped `extlinux.conf`. The pmOS initramfs defaults to `nosplash=y` and only starts `plymouthd` when the literal `splash` parameter is present, so the screen stayed on lk2nd's blue stripes until X started. The shipping cmdline is restored to `quiet splash plymouth.ignore-serial-consoles plymouth.prefer-fbcon`; the sync tool can now restore it, and both boot-image and bootfs validators reject debug cmdlines and require `splash`.
|
||||||
|
- **Keypad input**: the DT matrix is correct (the mainline `matrix_keypad` driver cancels `gpio-activelow` against `GPIO_ACTIVE_LOW` exactly as needed), so the failure is in userspace device classification. Added `99-bananarchy-keypad.rules` (forces `ID_INPUT_KEYBOARD`, `input` group, mode 0660), an explicit Xorg `InputClass` matching `MatchProduct "keypad"` without relying on that udev tag, and `bananarchy-keypad-diagnose.sh` to dump devices, switch states, dmesg and X input state for live `evtest` diagnosis.
|
||||||
|
- **Cover display**: committed the external GC9305 firmware and init notes (`nokia,beatles-gc9305-ext-panel.bin/.txt`) that existed only inside the flashed image, enabled `CONFIG_MULTIPLEXER`, `CONFIG_MUX_GPIO` and `CONFIG_SPI_MUX` in the kernel config, added the compile-tested `devices/nokia-beatles/cover-panel.dtsi` spi-mux overlay, and recovered the native `bananarchy-coverd`/`bananarchy-coverctl` daemon, its config, lid profile, udev rule and OpenRC service from the shipped image into `prebuilt/bananarchy-coverd/` and the overlay (they were missing from the source tree, so a clean rebuild would have shipped a broken cover display). `bananarchy-cover-msg` now wraps `bananarchy-coverctl NOTIFY`. The DT overlay is deliberately **not** applied to the shipping DTB: gpio13 direction/polarity and the external reset/DC wiring still require hardware validation, and enabling it blindly would risk the working internal panel. The daemon waits for `/dev/fb1` and is inert until then.
|
||||||
|
- `check-rebuild.sh` now guards all of the above (PAM stack, auth drop-in, key files, splash cmdline, keypad rules, cover daemon syntax, DT overlay compilation and mux kernel config).
|
||||||
|
|
||||||
|
## Unreleased — mainline kernel console crash and switch-root fixes
|
||||||
|
|
||||||
|
|
||||||
|
- A PM8916 hardware watchdog was armed from lk2nd for a 20-second warm reset. This preserved DRAM pstore and produced a clean kernel console plus three compressed kmsg dumps. The watchdog was pre-armed through `oem debug writepmic` and the kernel watchdog driver was blacklisted for the diagnostic boot so it could not reconfigure the PMIC reset type.
|
||||||
|
- The kernel was not hanging at `n_null_init`: it returned normally, then crashed while printing the initcall result. `__msm_console_write` faulted at the earlycon fixmap address `0xffeff008` (`console_flush_all` -> `vprintk_emit` -> `trace_initcall_finish_cb`), followed by `Attempted to kill init`. Removing `earlycon` from the cmdline eliminates this crash; `console=ttyMSM0,115200` remains safe once the real serial driver has initialized.
|
||||||
|
- With `earlycon` removed, the kernel reaches initramfs stage 2, brings up configfs USB gadget/NCM, finds and mounts `pmOS_root`, then fails at `switch_root` with exit code 127 because `/sbin/init` is missing from the ext4 root image. The rootfs has BusyBox and an OpenRC `/etc/inittab`, but no `openrc-init`; `/sbin/init` must point at `/bin/busybox`.
|
||||||
|
- Removed `earlycon` from every `devices/*/kernel-cmdline.conf`, every overlay `50-device-*.conf`, all shipped standalone 2720 boot images and the raw image's `extlinux.conf`. Added `overlay/rootfs/sbin/init -> /bin/busybox`, made `apply-bananarchy-overlay.sh` and `rebuild-image.sh` recreate it, patched the current ext4 image, and added validators to reject stale `earlycon` cmdlines or a missing init symlink.
|
||||||
|
- `check-rebuild.sh`, boot-img validation, bootfs validation, Python/shell syntax and pstore decoders all pass. The fixed image is ready for the next flash/boot test.
|
||||||
|
|
||||||
|
## Unreleased — block-safe fastboot read-back and r3 rebuild
|
||||||
|
|
||||||
|
- Found why boot-slot read-back dropped USB: upstream `oem read-partition` passes the requested byte count directly to `mmc_read()`, whose wrapper asserts on sizes that are not eMMC block multiples. The lk2nd boot images end with a 16-byte `SEANDROIDENFORCE` tail, so their 376848/360464-byte lengths are 16 bytes past a 512-byte boundary.
|
||||||
|
- `lk2nd/fastboot/fetch.c` now rounds the MMC read up to the device block size, rejects unaligned offsets and reads beyond the partition, and stages only the original requested byte count. The source patch has 15 sections; validators and host port tests guard the fix.
|
||||||
|
- Rebuilt normal, diagnostic and display images as `-r3`: `c6092800`, `76936751`, `26b74570`. A clean upstream worktree rebuild reproduced all three byte-for-byte.
|
||||||
|
- Prepared a one-shot scratch mainline boot image with `lk2nd.pass-ramoops=zap maxcpus=1` to clear pstore and test whether SMP secondary-CPU bringup is the remaining kernel hang.
|
||||||
|
- `fastboot reboot-bootloader` writes the `FASTBOOT_MODE` cookie and does not exercise a newly flashed boot slot; use `fastboot reboot` for that test. The separate 512 KiB `lk2nd` partition contains an older lk2nd image, so the r3 persistence probe backs it up and writes r3 to both `boot` and `lk2nd` before a normal reboot.
|
||||||
|
- Live hardware: r3 diagnostic chain-loaded from the older `a1109` normal image, the full 512 KiB `lk2nd` partition was backed up, r3 was written and read back on both `boot` and `lk2nd`, and a normal `fastboot reboot` came back as `bananarchy-beatles-a1109-diag-r3`. This confirms persistence and that `reboot-bootloader` was the earlier trap.
|
||||||
|
- The one-shot `lk2nd.pass-ramoops=zap maxcpus=1` kernel downloaded and booted OKAY but produced no USB within 50 s. SMP secondary-CPU bringup is therefore not the sole cause of the remaining hang. A warm reset with Vol Down + Power is required to read the pstore console. No successful Bananarchy userspace boot has been observed yet.
|
||||||
|
- A follow-up forced-panic one-shot (`panic=3`, `panic_on_warn=1`, `panic_print=31`, `nosmp`, shortened RCU stall timeout, `lk2nd.pass-ramoops=zap`) also produced no USB within 55 s and did not self-reboot. RAM pstore remains inconclusive until a warm reset; if it is all `0xff` again, a block-pstore kernel rebuild is needed.
|
||||||
|
- A warm reset preserved a valid `DBGC` pstore console record (`size=0x10ff6`, cumulative `start=0x110fb6`). lk2nd's `oem ramoops console` rejected the cumulative start value, but `oem ramoops raw` staged the region; host-side rotation decoded kernel logs to about 6.25 s. The last readable initcall is `calling n_null_init`; the ordered table continues with `pty_init`, `sysrq_init`, `msm_serial_init`, `ttynull_init`, IOMMU and DRM initcalls. Three compressed kmsg dumps are present but too DRAM-corrupted to inflate cleanly.
|
||||||
|
- RAM pstore proved too unreliable: a warm reset preserved a valid but bit-rotted `DBGC` console record, while the next warm reset decayed the whole region to `0xff`. The console parser also needs to accept pstore's cumulative `start` pointer.
|
||||||
|
- Rebuilt the 6.12.1-msm8916 kernel with `CONFIG_PSTORE_BLK=y`, `CONFIG_PSTORE_BLK_BLKDEV` set to the GPT `cache` PARTUUID `2c6a1773-df50-2023-26e9-2d678c0ff68d`, a 256 KiB console zone and 64 KiB kmsg zones. The resolved config, `vmlinuz`, modules and boot config were regenerated. The scratch test boot.img forces `pstore.backend=pstore_blk`, `pstore_blk.best_effort=1` and the same `PARTUUID`; it uses the new zImage with the original appended DTB and initramfs.
|
||||||
|
- The pstore_blk one-shot kernel downloaded and booted OKAY but produced no USB within 55 s. A warm reset is required to stage the `cache` partition and decode its on-eMMC console/kmsg zones.
|
||||||
|
|
||||||
|
## Unreleased — hardware-verified lk2nd panel and final kernel DTB
|
||||||
|
|
||||||
|
- Chain-loaded the rebuilt `-diag-r2` image without any cmdline patch. The QCDT fallback published `lk2nd:panel=qcom,mdss_spi_gc9305_v2_qvga_cmd`; `oem display-init` returned OKAY in 1.066 s, `oem display-test` in 0.264 s, and `oem screenshot` staged a 230424-byte 240x320 P6 framebuffer with exactly the three intended RGB stripe colors. The panel stream and full SPI frame flush are confirmed on the phone.
|
||||||
|
- Removed the upstream per-word QUP `SPEW` FIFO log. Earlier `DEBUG=2` builds spent about 40 s per frame and filled the 32 KiB log; the rebuilt diagnostic log has zero FIFO-status lines. `oem ramoops console` now validates the pstore signature/size/offset and reports `No valid pstore console` for decayed DRAM instead of trying to stage `0xffffffff` bytes.
|
||||||
|
- `oem scan-boot` now lets `boot_linux()` apply the final cmdline and DT updates, then returns before the kernel jump. `oem scan-dtb` staged a 41440-byte final DTB with `cpu@2`/`cpu@3` set to `status = "fail"`, `ramoops@9fa80000` with a 256 KiB console, final bootargs, and initrd addresses. The dual-core partial-goods DT fix is confirmed; the remaining Bananarchy boot stall is in the mainline kernel/userspace stage.
|
||||||
|
- Rebuilt normal, diagnostic and display images from the pinned upstream commit plus the 14-section source patch: `ba97912c`, `5f263470`, `6b7b8fff`. A clean upstream worktree rebuild reproduced all three byte-for-byte. Validators now require the final-DTB hook, chain-load panel fallback, bounded pstore console and QUP log fix.
|
||||||
|
- `fastboot flash boot` of the forced-fastboot diagnostic returned OKAY, then USB dropped and did not re-enumerate after 30 s. Power-cycle into fastboot (Vol Down + Power) or EDL, read back `boot`, then boot the ramoops-enabled mainline image and warm-reset to capture `oem ramoops console`. No successful Bananarchy userspace boot has been observed yet.
|
||||||
|
|
||||||
|
## Unreleased — safe, probeable lk2nd display and corrected diagnostics
|
||||||
|
|
||||||
|
- Corrections: the pmOS initramfs jumps straight to stage 2 when `/init_2nd.sh` is present (it is), so a missing `/boot/initramfs-extra` was never the cause of a boot halt. An all-`0xff` ramoops region after a hard power-off is decayed DRAM, not proof the kernel hung before pstore. A live `oem debug readl 0x70000` hit an unmapped register and dropped USB; that was a host-side probe error, not a phone fault.
|
||||||
|
- Root cause of the display wedge: `spi_qup.c` and `clock_lib2.c` spin forever in QUP FIFO / clock register polls when the QUP clock never comes up. Added `QUP_FIFO_TIMEOUT` and `CLK_POLL_TIMEOUT` bounds so a dead SPI bus cannot hang lk2nd before USB init.
|
||||||
|
- `spi-display.c` rewritten: RAM-only 240x320 RGB565 framebuffer by default (`lk2nd.no-display`), plus fastboot commands `oem display-init` (mdss_spi_init + downstream GC9305 v2 `lk2nd,panel-init` stream + striped banner + one frame flush), `oem display-test`, and `oem display-off`. `lk2nd.display=on` enables the same path at boot. All run after USB on the diagnostic image, so failures are reported/logged instead of wedging.
|
||||||
|
- Added `oem scan-dtb` to stage the exact DTB handed to the kernel (after DT updates) for offline inspection; `oem scan-boot`, `oem log`, `oem screenshot` and `oem ramoops console` complete the probe set.
|
||||||
|
- New `images/boot-lk2nd-nokia-beatles-display.img` (`lk2nd.display=on`). Normal/diagnostic/display images rebuilt (sha `aadcb85b`, `bdde06b0`, `6b2b9b5c`), reproducible byte-for-byte from a pristine clone; validator gained `--expect-display`, build script gained the display variant and `--with-display`. Docs and host tests updated.
|
||||||
|
- Confirmed offline: `qcom,msm8909-smp` is valid in mainline 6.12 `platsmp.c`; the 2720 fuse `0x58000` reads `0x30100094` (dual core). `lk2nd_partial_goods_dt_update()` sets `status = "fail"` on `cpu@2`/`cpu@3` for non-downstream boots; `oem scan-dtb` can now prove whether that reached the kernel DTB. extlinux was already proven good by `oem scan-boot`; the remaining hang is in the mainline kernel.
|
||||||
|
|
||||||
|
## Unreleased — extlinux confirmed good; kernel console capture via ramoops
|
||||||
|
|
||||||
|
- `oem scan-boot` run on the live device proved the boot chain: `wrp0p32p0` (pmOS_boot, 256 MiB) enumerated and mounted, `/extlinux/extlinux.conf` parsed, `vmlinuz` / `qcom-msm8905-nokia-beatles.dtb` / `initramfs` all resolved and `lk2nd_boot_label()` reached `boot_linux()` without errors. Log saved to `backup/nokia-beatles-2720/crash-20261109/scan-boot-log.txt`. **The remaining hang is the mainline kernel, not lk2nd or the boot filesystem.**
|
||||||
|
- `oem read-partition` also verified the live `userdata` MBR (`55aa`, two `0x83` partitions) and its ext2 superblock (`53ef` at 1 MiB). `fastboot boot` of the debug boot.img downloaded OKAY then produced no USB, consistent with a kernel that hangs before the initramfs brings up `usb0` RNDIS.
|
||||||
|
- `oem ramoops regions` showed `0x9fa80000` still `0xff`. Patched `lk2nd/ramoops/ramoops.c` to always inject the ramoops reserved-memory node on Linux boots (`lk2nd.pass-ramoops=zap` still clears it), so `CONFIG_PSTORE_RAM`/`CONFIG_PSTORE_CONSOLE` kernel logs survive a warm reset. Added `images/boot-bananarchy-nokia-beatles-ramoops.img` (debug boot.img + `lk2nd.pass-ramoops`).
|
||||||
|
- Rebuilt both images (normal `dab81af0…46`, diagnostic `1825a1a4…bc`), reproducible byte for byte; validator and port tests check `oem scan-boot` and the ramoops patch. `check-rebuild.sh`, bootfs/bootimg checks and syntax checks pass.
|
||||||
|
- Next hardware step: the ramoops-enabled diagnostic lk2nd was chain-loaded with `fastboot boot` and `fastboot continue` ran the real extlinux chain; the kernel hung again. Power-cycle back into fastboot (Vol Down + Power), then `fastboot oem ramoops console && fastboot get_staged console.log` to read the kernel console.
|
||||||
|
|
||||||
|
## Unreleased — extlinux/kernel hang diagnostics from live fastboot
|
||||||
|
|
||||||
|
- Live fastboot confirmed the port works (`lk2nd:compatible=nokia,beatles`, `model=Nokia 2720 Flip`, panel `qcom,mdss_spi_gc9305_v2_qvga_cmd`, `unlocked=yes`). Read back the live `userdata` MBR (valid 0x55aa, two 0x83 partitions at LBA 2048 / 526336) and the ext2 superblock at 1 MiB (`53ef`, dynamic rev, compatible features) with `fastboot oem read-partition`; boot filesystem is intact on-device.
|
||||||
|
- `fastboot boot images/boot-bananarchy-nokia-beatles-debug.img` downloaded and reported OKAY, then no USB appeared. The initramfs brings up `usb0` RNDIS via `setup_usb_network`, so this means the mainline kernel hangs before userspace, or lk2nd never found extlinux and fell into `boot_linux_from_mmc()`.
|
||||||
|
- Added an `oem scan-boot` fastboot command (new `lk2nd/device/2nd/scan-boot.c`): runs `lk2nd_boot()` with `lk2nd_scan_only = true`; `lk2nd_boot_label()` logs the resolved kernel/dtb/initramfs/cmdline and returns before `boot_linux()`, so lk2nd stays in fastboot and `oem log` reveals the whole extlinux scan. Both images rebuilt (normal `902bf422…77`, diagnostic `d3eacccd…82`), reproducible byte for byte; validator and port tests check the command.
|
||||||
|
- Added `images/boot-bananarchy-nokia-beatles-ramoops.img` (debug boot.img plus `lk2nd.pass-ramoops` in the cmdline) so lk2nd injects a ramoops reserved-memory node and the kernel console can be read with `fastboot oem ramoops console` after a warm reset.
|
||||||
|
- Next hardware step: re-enter EDL with a fresh Sahara HELLO, flash the diagnostic image, then `fastboot oem scan-boot` + `fastboot oem log`. If the scan succeeds, boot the ramoops kernel and read its console after rebooting into fastboot.
|
||||||
|
|
||||||
|
## Unreleased — lk2nd confirmed over live fastboot; default image boots extlinux headless
|
||||||
|
|
||||||
|
- Confirmed over live fastboot (`18d1:d00d`, serial `34b39986`): `lk2nd:compatible=nokia,beatles`, `lk2nd:model=Nokia 2720 Flip`, `lk2nd:panel=qcom,mdss_spi_gc9305_v2_qvga_cmd`, `unlocked=yes`. The full lk2nd RLOG log shows `Found valid DTB with 2718 bytes total`, `Detected device: Nokia 2720 Flip` and a clean `fastboot_init()`; saved to `backup/nokia-beatles-2720/crash-20261109/lk2nd-fastboot-log.txt` and `lk2nd-parsed-cmdline.txt`.
|
||||||
|
- The "still hanging on the KaiOS logo" was lk2nd sitting in the forced-fastboot diagnostic menu with a RAM-only framebuffer, not a hang. Two vibrations were aboot's and lk2nd's normal 250 ms boot pulses.
|
||||||
|
- A/B proof: display enabled hangs before USB with the boot vibrator stuck on; `lk2nd.no-display` reaches fastboot. Both shipped images now carry `lk2nd.no-display`; the normal image no longer forces fastboot, so a normal power-on runs `lk2nd_boot()` -> extlinux -> the mainline kernel. `WITH_DISPLAY=1` / `--with-display` re-enables the SPI display.
|
||||||
|
- Rebuilt both (normal `eaa50754…15`, diagnostic `43bb63cb…05`), reproducible byte for byte; all tests pass.
|
||||||
|
- `fastboot continue` was sent to exercise the real extlinux chain; USB then disappeared and the KaiOS logo stayed. Bananarchy has no default USB gadget, so this is ambiguous. Next decisive probe: re-enter EDL (Sahara HELLO is one-shot — do not consume it with a passive read), enter Firehose and `peek` lk2nd's RLOG at `0x8f655430`, or hold Volume Down at power-on to reach fastboot and pull `fastboot oem log`.
|
||||||
|
|
||||||
|
## Unreleased — lk2nd confirmed working; default image now boots extlinux headless
|
||||||
|
|
||||||
|
- Live fastboot (`18d1:d00d`, serial `34b39986`) confirmed the port: `lk2nd:compatible=nokia,beatles`, `lk2nd:model=Nokia 2720 Flip`, `lk2nd:panel=qcom,mdss_spi_gc9305_v2_qvga_cmd`, `unlocked=yes`. The full lk2nd RLOG log shows `Found valid DTB with 2718 bytes total`, `Detected device: Nokia 2720 Flip` and a clean `fastboot_init()`. Saved to `backup/nokia-beatles-2720/crash-20261109/lk2nd-fastboot-log.txt` and `lk2nd-parsed-cmdline.txt`.
|
||||||
|
- A/B proof: with the SPI display enabled lk2nd hangs before USB with the boot vibrator stuck on; with `lk2nd.no-display` it vibrates twice normally (aboot + lk2nd boot pulses) and reaches fastboot. The "still hangs on the KaiOS logo" was lk2nd sitting in the forced-fastboot menu with a RAM-only framebuffer, not a hang.
|
||||||
|
- Both shipped images now carry `lk2nd.no-display`. The normal image no longer forces fastboot, so a normal power-on runs `lk2nd_boot()` -> extlinux -> mainline kernel, which re-initializes the panel itself. `WITH_DISPLAY=1` / `--with-display` re-enables the early SPI display for experimentation.
|
||||||
|
- Rebuilt both (normal `eaa50754…15`, diagnostic `43bb63cb…05`), reproducible byte for byte. Validator requires `lk2nd.no-display` on the diagnostic image; build script gained `--with-display`; `check-rebuild.sh`, port tests, bootfs/bootimg checks and syntax checks all pass.
|
||||||
|
- `fastboot continue` was used to exercise the extlinux chain; USB then disappeared and did not return within two minutes. This is not proof of a hang because Bananarchy has no default USB gadget. Next decisive probe: force EDL and read lk2nd's own RLOG ring buffer at `0x8f655430` (cookie `0x474f4c52`) to see whether `extlinux.conf` was found and `boot_linux()` reached.
|
||||||
|
|
||||||
|
## Unreleased — aboot fixed; lk2nd hangs early with the boot vibrator stuck on
|
||||||
|
|
||||||
|
- With `/cpus` present aboot no longer ASSERTs and lk2nd starts. The phone now hangs on the aboot/KaiOS splash with **permanent vibration and no USB device**. LK turns the vibrator on in `target_init()` (`vib_timed_turn_on(250)`) and off only in `target_uninit()` (`wait_vib_timeout()`), so a hang before USB/fastboot init leaves it buzzing forever.
|
||||||
|
- Prime suspect is the SPI display init, which now executes for the first time: `mdss_spi_init()` re-clocks BLSP1 QUP5 and `paint_boot_banner()` triggers three full 240x320 RGB565 frame writes during `LK2ND_INIT`, before USB comes up.
|
||||||
|
- Added `lk2nd.no-display` to `spi-display.c`: keeps a RAM-only framebuffer (so cont-splash does not read MDP registers) with `update_start = NULL`, and skips `mdss_spi_init()` entirely. The diagnostic image now uses it together with `LK2ND_FORCE_FASTBOOT=1` and `DEBUG=2`, so the only things before USB are DTB parsing, key publishing and partition setup.
|
||||||
|
- Rebuilt both images (normal `9c13e1ba…14`, diagnostic `43bb63cb…05`), still reproducible byte for byte from a pristine clone. Validator accepts and requires `lk2nd.no-display` on the diagnostic variant; `check-rebuild.sh` and the port tests still pass.
|
||||||
|
- Next hardware step: force EDL (hold power ~10-15 s, then Vol Up + Vol Down while plugging USB), flash the diagnostic image with `--lk2nd-image --verify`, then `lsusb`. `18d1:d00d` means the SPI display init was the hang; `fastboot oem log && fastboot get_staged lk2nd.log` gives the rest. If it still hangs with vibration, re-read aboot's RLOG buffer (and lk2nd's own RLOG cookie near its BSS) for the earlier hang.
|
||||||
|
|
||||||
|
## Unreleased — real root cause: aboot partial-goods ASSERT on missing /cpus
|
||||||
|
|
||||||
|
- Pulled aboot's `WITH_DEBUG_LOG_BUF` ring buffer (cookie `0x474f4c52` "RLOG") from the live Sahara memory-debug dump. It contains the exact crash:
|
||||||
|
```
|
||||||
|
[580] target_display_init ret=0
|
||||||
|
[590] Failed to get parent node: /cpus errno:-1
|
||||||
|
[600] panic (caller 0x8f61aa00): ASSERT FAILED at (platform/msm_shared/partial_goods.c:80): 0
|
||||||
|
[610] HALT: reboot into dload mode...
|
||||||
|
```
|
||||||
|
- The 2720's MSM8905 is a **partial-goods (2-core) part**. Its stock aboot calls `update_partial_goods_dtb_nodes()` on the QCDT-selected DTB and `ASSERT(0)`s when `/cpus`, `/cpus/cpu@2` or `/cpus/cpu@3` (with a 4-byte `device_type`) is missing; it then rewrites `device_type` from `"cpu\0"` to `"nak\0"`. Upstream lk2nd QCDT DTBs have no `/cpus` at all, so **every** lk2nd image — including the untouched `bootloader/lk2nd-msm8909.img` — crashed before lk2nd ran. This, not the QCDT table shape or the panel init, was the "black screen / no fastboot" cause.
|
||||||
|
- Fixed by adding a `/cpus` node with `cpu@0`..`cpu@3` and `device_type = "cpu"` to the common `lk2nd/device/dts/lk2nd.dtsi`, so all eight QCDT DTBs carry it. The mainline `qcom-msm8905-nokia-beatles.dtb` already has `/cpus`, so the Volume Up recovery path is unaffected.
|
||||||
|
- Rebuilt both images (normal `e747ec0d…95`, diagnostic `8ded62f0…4a`); both reproducible byte for byte from a pristine clone. `dt_size` is `22528` and the 2720 DTB is 4096 bytes — aboot demonstrably handled a larger QCDT in earlier dumps, so size was never the problem.
|
||||||
|
- `check-lk2nd-beatles.py` now checks every QCDT DTB for `/cpus/cpu@2` and `cpu@3` with a 4-byte `device_type`, and enforces both `0x14b` entries sharing one DTB; `test-lk2nd-beatles-port.py` checks the `/cpus` patch. Crash log saved as `backup/nokia-beatles-2720/crash-20261109/aboot-log.txt`.
|
||||||
|
- Next hardware step: power-cycle into plain EDL (memory-debug state refuses the Firehose programmer), reflash the diagnostic image with `--verify --dump-diagnostics`, then `lsusb`. `18d1:d00d` means lk2nd runs; `05c6:900e` again means re-read the RLOG buffer for the next ASSERT.
|
||||||
|
|
||||||
|
## (Superseded) aboot crashes on the changed QCDT; restore upstream shape
|
||||||
|
|
||||||
|
- Live diagnosis: after "black screen, no fastboot" the phone was in `05c6:900e` **Sahara MEMORY_DEBUG mode**, i.e. aboot crashed before lk2nd ever ran. A Sahara memory-debug dump showed aboot's BSS held the diagnostic boot.img header (`ANDROID!`, kernel 345048, `dt_size=24576`) and the cached cmdline `lk2nd lk2nd.compatible=nokia,beatles`; aboot had also built `mdss_mdp3.panel=1:spi:0:qcom,mdss_spi_gc9305_v2_qvga_cmd:1:none`. The kernel payload at `0x80008000` was byte-identical to the diagnostic image, while lk2nd's BSS at `0x80080000` was all zeros.
|
||||||
|
- Root cause: the only aboot-parsed thing changed was the **QCDT table**. The dedicated `msm8905-nokia-beatles` DTB made `dt_size` 20480 -> 24576, split the two `0x14b` entries across two different DTBs and put `0x1000b` first in `qcom,board-id`. aboot re-validates the selected DTB's root properties and crashed. Removed that DTB, restored `msm8905-qrd-skub.dts` to the exact upstream `qcom,board-id = <0x0b 0x100>, <0x1000b 0x100>` and injected only a compact `/lk2nd/nokia-beatles` node (DTB 1504 -> 1984 bytes, still one 2048-byte slot). Both `0x14b` QCDT entries again point at the same DTB and `dt_size` is back to `20480`.
|
||||||
|
- Trimmed the port to fit that slot: only the `qcom,mdss_spi_gc9305_v2_qvga_cmd` panel — the one the live aboot reports — carries `lk2nd,panel-init`; the other two are match-only nodes. Dropped the DTB `gpio-keys` and `menu-key-strings` entries. Kept model, compatible, `lk2nd,match-panel` and `lk2nd,dtb-files`.
|
||||||
|
- Rebuilt both images (normal `968ef23c…8d`, diagnostic `5eb75ca8…5ff`), still reproducible byte for byte from a pristine clone. `check-lk2nd-beatles.py` now enforces the upstream QCDT shape and rejects any separate QCDT DTB; the host C test covers the single v2 stream.
|
||||||
|
- Crash evidence saved to `backup/nokia-beatles-2720/crash-20261109/`. `devinfo` from the last dump still has `is_unlocked=1`. Next hardware step: reflash the diagnostic image with `--verify --dump-diagnostics`, then check `lsusb`; if it returns to `900e`, re-read aboot's RLOG buffer; the untouched `bootloader/lk2nd-msm8909.img` lacks `/cpus` too and is only a negative control.
|
||||||
|
|
||||||
|
## Unreleased — diagnose the logo-then-blank screen on nokia-beatles
|
||||||
|
|
||||||
|
- Traced the dark screen: `DISABLE_SPLASH_PARTITION=1` in lk2nd builds means `display_image_on_screen()` never loads the stock splash, and lk2nd's `menu.c` override of `display_default_image_on_screen()` only draws two version lines before `fbcon_flush()` pushes the whole 240x320 RGB565 framebuffer at `MIPI_FB_ADDR`. Upstream's fallback is a tiny 113x124 logo on black; there is no guarantee aboot left its splash at that address. `spi-display.c` now paints a striped `Bananarchy lk2nd / nokia-beatles / 240x320 RGB565` banner before that flush, so the handoff can no longer be mistaken for a hang.
|
||||||
|
- Made the panel-init replay conditional: `lk2nd,panel-init` is only replayed when aboot did not report continuous splash (`mdss_mdp3.panel=0:...`) or when `lk2nd.force-panel-init` is present in the cmdline. Re-initializing a panel aboot already owns risks disturbing the 2720's shared main/cover SPI bus. `scripts/build-lk2nd-beatles.sh --force-panel-init` builds that variant.
|
||||||
|
- Added `images/boot-lk2nd-nokia-beatles-diagnostic.img`: the same port built with `DEBUG=2 DEBUG_FBCON=1 LK2ND_FORCE_FASTBOOT=1`, so it always shows the fastboot menu, draws boot logs on the display and enumerates as USB fastboot. `flash-edl.py` gained `--lk2nd-image` to flash it without changing the default. Pull the decisive log with `fastboot oem log && fastboot get_staged lk2nd.log`.
|
||||||
|
- `scripts/build-lk2nd-beatles.sh` now builds and validates both images (`--only normal|diagnostic`, `--check`), `check-lk2nd-beatles.py` gained `--expect-fastboot` and checks the banner/conditional-replay markers, and `test-lk2nd-beatles-port.py` validates both images plus the flasher override. Both images remain reproducible byte for byte.
|
||||||
|
- No successful Bananarchy boot has been observed yet; the forced-fastboot log or UART (`ttyMSM0,115200`) is required to locate whether the failure is extlinux/`pmOS_boot` or the mainline kernel.
|
||||||
|
|
||||||
|
## (Superseded) source-built nokia-beatles lk2nd port
|
||||||
|
|
||||||
|
- Replaced the binary-patched, headless lk2nd workaround with a real upstream source port. `bootloader/lk2nd/nokia-beatles.patch` applies to `msm8916-mainline/lk2nd` commit `cf45aefd22d744b2bf9b39455afae697ce430063`; `scripts/build-lk2nd-beatles.sh` clones that commit, applies the patch and cross-builds `lk2nd-msm8909` in the rootless Docker toolchain image (`bootloader/lk2nd/Dockerfile`). The result is reproducible byte for byte.
|
||||||
|
- New dedicated QCDT DTB `msm8905-nokia-beatles.dts` with the exact stock 2720 IDs (`qcom,msm-id = <0x14b 0>`, `qcom,board-id = <0x1000b 0x100>`). It contains only `/lk2nd/nokia-beatles`, so aboot's best-match selection is unambiguous. The shared `msm8905-qrd-skub.dtb` keeps the `0xb/0x100` fallback entry and also carries the beatles node.
|
||||||
|
- `nokia-beatles.dtsi` adds a real device node: model `Nokia 2720 Flip`, `compatible = "nokia,beatles"`, `lk2nd,match-panel`, `lk2nd,dtb-files = "msm8905-nokia-beatles"`, menu key labels and `gpio-keys` for volume up (GPIO 90) and power/end (GPIO 98), both active low.
|
||||||
|
- Correct panel initialization: three panel subnodes match every GC9305 name the 2720 aboot can report (`gc9305_qvga_cmd`, `gc9305_v2_qvga_cmd`, `gc9305_3rd_qvga_cmd`), each with the downstream KaiOS 3.10 `qcom,mdss-spi-on-command` byte stream as `lk2nd,panel-init`. `lk2nd/include/lk2nd/spi-panel-init.h` walks the `[wait dlen payload...]` stream; `platform/msm_shared/mdss_spi.c` and `lk2nd/device/2nd/spi-display.c` replay it on BLSP1 QUP5 (DC GPIO 110), setting RGB565, the 240x320 address window, sleep-out, display-on and RAMWR. lk2nd can now bring the panel up even when aboot left no continuous splash.
|
||||||
|
- `images/boot-lk2nd-nokia-beatles.img` is the source-built image (sha256 `1b6386a2e532d52003b6c2b65f00f6860c28d50cd94d9c3b874dd93fa161baa9`), cmdline `lk2nd lk2nd.compatible=nokia,beatles`. Removed the obsolete `scripts/make-beatles-lk2nd-bootimg.py`.
|
||||||
|
- `scripts/check-lk2nd-beatles.py` now validates the boot header, both 2720 QCDT entries, both DTBs, the device node, gpio-keys and every panel init stream with a pure-Python FDT parser. `scripts/test-lk2nd-beatles-port.py` additionally compiles the shared C parser against the streams extracted from the shipped image. `check-rebuild.sh` guards the port files.
|
||||||
|
|
||||||
|
## (Superseded) fix lk2nd headless device node and repair pmOS_boot
|
||||||
|
|
||||||
|
- Root cause of the blank screen: `repack-beatles-bootimg.py` had written an Android `boot.img` at raw offset 1 MiB, which is the **ext2 `pmOS_boot` filesystem** inside the `userdata` MBR image. Its superblock was destroyed, so lk2nd could not mount the boot subpartition, could not find `extlinux.conf`, and reported "Bootable file system not found. Reverting to android boot." The tool no longer accepts `--raw-image`; `scripts/sync-beatles-bootfs.py` updates `/boot.img`, `/qcom-msm8905-nokia-beatles.dtb` and `/extlinux/extlinux.conf` inside the ext2 filesystem instead, with `--check` wired into `check-rebuild.sh`.
|
||||||
|
- Repaired `images/bananarchy-nokia-beatles.img` in both repos: ext2 superblock restored, DTB and boot.img refreshed, `extlinux.conf` now uses `loglevel=8 ignore_loglevel initcall_debug panic=10` instead of `quiet splash`.
|
||||||
|
- Root cause of lk2nd running the wrong hardware: the QCDT DTB only had `cat-b35` / `nokia-argon` device nodes with `lk2nd,match-panel`. `scripts/make-beatles-lk2nd-bootimg.py` now injects `/lk2nd/nokia-beatles` (`model = "Nokia 2720 Flip"`, `compatible = "nokia,beatles"`, `lk2nd,dtb-files = "qcom-msm8905-nokia-beatles"`), removes every `lk2nd,match-panel` property, and sets cmdline `lk2nd lk2nd.compatible=nokia,beatles`. lk2nd identifies the board and skips the 8110 4G panel/keypad init entirely.
|
||||||
|
- `images/boot-lk2nd-nokia-beatles.img` rebuilt in both repos; `check-lk2nd-beatles.py` now validates that only the cmdline field and the exact-2720 QCDT DTB slot differ, that the new node exists, and that no node carries `lk2nd,match-panel`.
|
||||||
|
|
||||||
|
## Unreleased — Argon-shaped hybrid and RPMB correction
|
||||||
|
|
||||||
|
- Correction to the previous entry: `target_get_vb_version()` returns `VB_L=1` when the GPT has no `keymaster` partition (this 2720 has `keystore` only), while `VB_M=2`. The `USE_RPMB_FOR_DEVINFO` branch is therefore not taken; `read_device_info()` uses eMMC `devinfo`. The 21:25 dump shows `is_unlocked=1`, so the eMMC unlock is effective and `fastboot oem unlock-go` is unnecessary. Stock fastboot is not required.
|
||||||
|
- The 900e crash is not a signature rejection. To match the 8110/Argon process exactly, the default `nokia-beatles` path is now a hybrid: `bootloader/lk2nd-msm8909.img` -> `boot`, `images/boot-bananarchy-nokia-beatles.img` -> `recovery`. Normal power-on is `aboot -> lk2nd -> extlinux`; Volume Up is `aboot -> recovery -> mainline boot.img`.
|
||||||
|
- `source_for(name)` gives each target partition its own source; `--verify` compares each slot against the image actually written there. The behavioural test asserts `boot=lk2nd`, `recovery=boot.img`.
|
||||||
|
|
||||||
|
## (Superseded) RPMB devinfo is the authoritative unlock
|
||||||
|
|
||||||
|
- After the dual-slot fix the phone still entered `05c6:900e` (Sahara memory debug). The 21:25 dumps show eMMC `devinfo` is now `is_unlocked=1`, but `diag-aboot.img` contains VERIFIED_BOOT / `USE_RPMB_FOR_DEVINFO` code: `read_device_info()` uses `read_device_info_rpmb()` when secure boot is enabled, so the eMMC patch is ignored. `boot_verifier_init()` therefore still verifies the unsigned lk2nd image and aboot crashes.
|
||||||
|
- `flash-edl.py` now patches the `config` (fallback `frp`) partition allow-unlock byte (LSB of last byte) by default on `nokia-beatles` via `enable_oem_unlock()`, with read-back verification and `backup/config-locked-<device>.img`.
|
||||||
|
- New `--only-unlock` mode patches eMMC devinfo + config/frp, prints the exact `fastboot oem unlock-go` instructions, and exits without flashing. `--enable-oem-unlock` / `--no-enable-oem-unlock` control the config patch.
|
||||||
|
- Added `scripts/make-oem-unlock-config.py`, generated `backup/nokia-beatles-2720/config-oem-unlock.img` (only byte 524287 changes), `check-rebuild.sh` guards and a host test.
|
||||||
|
|
||||||
|
## Unreleased — fix lk2nd dual-slot write
|
||||||
|
|
||||||
|
- `--verify` correctly reported `read-back of 'recovery' differs`: the 2720 dual-slot `target_names = ("boot", "recovery")` was built, but the old `method == "lk2nd"` branch still wrote only `target_parts[0][1]`. `recovery` therefore kept the previous mainline boot.img while `--verify` compared it against lk2nd.
|
||||||
|
- Step 1 now loops over every `target_parts` entry with a single `source` (`bootloader_img` for lk2nd, `boot_img` otherwise), and the verify loop uses the same source. `check-rebuild.sh` guards against the single-slot regression and a host test asserts the multi-target write path.
|
||||||
|
|
||||||
|
## Unreleased — unlock locked 2720 aboot via devinfo
|
||||||
|
|
||||||
|
- `--dump-diagnostics` dumps from the connected 2720 show `diag-devinfo.img` with `ANDROID-BOOT!` magic and `is_unlocked=0`, `is_tampered=0`; `diag-aboot.img` contains `Nokia_beatles ROOT CA0`, secure-boot checks, `ERROR: Image Invalid! signature check failed!` and `Device is unlocked! Skipping verification...`. This is the root cause of the empty screen: aboot signature-checks every custom `boot.img` (lk2nd or mainline) and rejects it.
|
||||||
|
- `flash-edl.py` now defaults to `unlock_devinfo()` on `nokia-beatles`: it backs up the locked `devinfo` to `backup/devinfo-locked-<device>.img`, sets byte 13 (`is_unlocked`) to 1 and clears `is_tampered`, then writes it back before flashing. `--unlock-bootloader` forces it on any target; `--no-unlock-bootloader` skips it.
|
||||||
|
- Added `scripts/make-unlocked-devinfo.py` and generated `backup/nokia-beatles-2720/devinfo-unlocked.img` from the captured dump (only byte 13 changes). `check-rebuild.sh` guards the unlock helper and defaults.
|
||||||
|
- Earlier DTB/QCDT/lk2nd fixes remain valid but were all downstream of this signature check.
|
||||||
|
|
||||||
|
## Unreleased — lk2nd boots first on the 2720 Flip
|
||||||
|
|
||||||
|
- `bootloader/lk2nd-msm8909.img` was re-examined: it is an Android `boot.img` with cmdline `lk2nd`, `dt_size=20480` and a QCDT v2 table after the ramdisk. Entry 13 already has the exact stock 2720 IDs (`platform_id=0x14b`, `variant_id=0x1000b`, `board_hw_subtype=0x100`, `soc_rev=0`) and points at a DTB with `/memory`, `/chosen` and `/lk2nd`. aboot therefore accepts the lk2nd boot.img on this device; the earlier "lk2nd unsupported" conclusion was wrong.
|
||||||
|
- `--method lk2nd` is again the default for every target. On `nokia-beatles` it writes lk2nd to both `boot` and `recovery`; `--verify` reads back both. lk2nd then boots Bananarchy from `userdata` via `extlinux.conf`, which names `qcom-msm8905-nokia-beatles.dtb` explicitly, so lk2nd identifying the board as an 8110 in its own menu does not affect the kernel DTB.
|
||||||
|
- `--method both` remains as a fallback that writes the standalone mainline `boot.img` to both slots, and `--method recovery` for the pmOS Volume Up route.
|
||||||
|
- Added `scripts/check-lk2nd-beatles.py`; `check-rebuild.sh` now enforces the QCDT entry and the dual-slot lk2nd write.
|
||||||
|
|
||||||
|
## Unreleased — dual boot/recovery write and EDL diagnostics
|
||||||
|
|
||||||
|
- (Superseded by the lk2nd-first path above.) `--method both` was the default for `nokia-beatles`: the corrected boot.img is written to both `boot` and `recovery`, because the stock locked fastboot chain may refuse an unsigned `boot` image while the pmOS-tested Volume Up recovery path still works.
|
||||||
|
- `--verify` now reads back every target partition, and `--dump-diagnostics` copies small `devinfo`, `aboot`, `tz`, `config`, `misc` and related partitions into `backup/diag-*.img` for offline secure-boot analysis.
|
||||||
|
- Completion output now tells the user to hold Volume Up if the KaiOS splash persists on a normal power-on.
|
||||||
|
|
||||||
|
## Unreleased — 2720 Flip aboot DTB fixes
|
||||||
|
|
||||||
|
- Replaced the mixed `qcom,board-id = <0xb 0x100 0x1000b 0x100>` with the exact stock MSM8905 QRD SKUB pair `<0x1000b 0x100>`. Older Qualcomm aboot revisions read only the first board-id pair, so the lk2nd 8110 variant prevented DTB selection and left the phone on the KaiOS splash.
|
||||||
|
- Added a 512 MiB `/memory` fallback (`reg = <0x80000000 0x20000000>`) to the beatles DTB. Stock aboot normally rewrites this from SMEM; the fallback avoids a zero-sized memory bank when it does not.
|
||||||
|
- Added `scripts/repack-beatles-bootimg.py` and `scripts/check-beatles-bootimg.py`. `check-rebuild.sh` now enforces the exact qcom IDs, memory fallback, appended-DTB pointer and boot partition size.
|
||||||
|
- Regenerated `qcom-msm8905-nokia-beatles.dtb`, the derivation patch, `images/boot-bananarchy-nokia-beatles.img` and the boot slot in `images/bananarchy-nokia-beatles.img`.
|
||||||
|
|
||||||
|
## Unreleased — opt-in read-back verification
|
||||||
|
|
||||||
|
- `--verify` reads back the `boot`/`recovery` partition after step 1 and
|
||||||
|
compares its leading bytes with the source image. A mismatch aborts the
|
||||||
|
flash before `userdata` is written, so a Sahara/Firehose session that never
|
||||||
|
committed cannot silently leave the phone booting stock KaiOS.
|
||||||
|
|
||||||
|
## Unreleased — restore system superblock wipe by default
|
||||||
|
|
||||||
|
- `resolve_wipe_system()` again zeroes the stock `system` superblock for
|
||||||
|
every flash method, as in the original Bananarchy behavior.
|
||||||
|
`--no-wipe-system` is now the opt-out; `--wipe-system` remains an explicit
|
||||||
|
(redundant) alias. The banner and step 3 report the effective choice.
|
||||||
|
- Recovery-mode completion message now warns that a normal power-on hangs on
|
||||||
|
the KaiOS logo after the wipe and that Volume Up is mandatory.
|
||||||
|
- `check-rebuild.sh` continues to guard the wipe helper.
|
||||||
|
|
||||||
|
## Unreleased — do not wipe KaiOS system for boot/recovery methods
|
||||||
|
|
||||||
|
- The "Powered by KaiOS" hang was the stock KaiOS kernel in `boot` trying to
|
||||||
|
mount a `system` partition whose first 64 sectors we had zeroed. With
|
||||||
|
`--method recovery`, `boot` is intentionally left alone, so a normal
|
||||||
|
power-on boots KaiOS; only Volume Up selects the flashed recovery image.
|
||||||
|
- `system` is now wiped only for the `lk2nd` method. `--wipe-system` forces
|
||||||
|
it and `--no-wipe-system` forbids it; the banner reports the choice.
|
||||||
|
- The target partition is always backed up as `<partition>-<device>.img`
|
||||||
|
instead of reusing an existing `<partition>.img` from a different device.
|
||||||
|
- Recovery-mode completion message now states that normal power-on boots
|
||||||
|
KaiOS and Volume Up boots Bananarchy.
|
||||||
|
|
||||||
|
## Unreleased — 2720 Flip boots from `boot` with a matched DTB
|
||||||
|
|
||||||
|
- Root cause of the persistent boot failure: the appended device tree had no
|
||||||
|
`qcom,msm-id`, `qcom,board-id` or `qcom,pmic-id`. Qualcomm aboot selects an
|
||||||
|
appended DTB by those IDs, so it found none and fell back to Sahara
|
||||||
|
(`05c6:900e`). The IDs (`0x14b`, `0x0b/0x100 0x1000b/0x100`, `0x1000d`)
|
||||||
|
were read from the `MSM8905 QRD SKUB` DTB inside the stock 2720 recovery
|
||||||
|
image, confirmed against lk2nd's `msm8905-qrd-skub` DTB, and added to the
|
||||||
|
beatles DTS/DTB. The rebuilt `boot.img` now carries them.
|
||||||
|
- (Superseded by the lk2nd-first path above.) `--method boot` was the default
|
||||||
|
for `nokia-beatles`: the standalone `boot.img` was written to `boot`.
|
||||||
|
- (Superseded.) `--method recovery` remains available; `--method lk2nd` is now
|
||||||
|
the default for the 2720 as well.
|
||||||
|
- `check-rebuild.sh` guards the device list and method-to-partition map.
|
||||||
|
|
||||||
|
## Unreleased — 2720 Flip recovery boot path
|
||||||
|
|
||||||
|
- (Superseded by the lk2nd-first path above.) `lk2nd-msm8909.img` contains no
|
||||||
|
`nokia-beatles` device node; the shared `msm8905-qrd-skub` board plus the
|
||||||
|
colliding `qcom,mdss_spi_gc9305_v2_qvga_cmd` panel node make lk2nd identify
|
||||||
|
the 2720 as an 8110 4G in its own menu. The stock aboot does accept the
|
||||||
|
lk2nd boot.img via its QCDT entry.
|
||||||
|
- (Superseded.) `flash-edl.py` auto-selected `--method recovery` for
|
||||||
|
`nokia-beatles`: it flashed the standalone `boot.img` into `recovery`, left
|
||||||
|
`boot` alone,
|
||||||
|
writes the raw image to `userdata` (the pmOS initramfs
|
||||||
|
`mount_subpartitions()` exposes the nested MBR), and tells the user to
|
||||||
|
hold Volume Up at power-on. `--method lk2nd` and `--boot-image` override.
|
||||||
|
- `rebuild-image.sh` exports `images/boot-bananarchy-<device>.img` instead of
|
||||||
|
deleting it. The exported image has the corrected beatles DTB appended and
|
||||||
|
the pmOS 2720 load addresses (`ramdisk 0x81000000`, `tags 0x80000100`).
|
||||||
|
- Flashing backs up `recovery` instead of `boot` in recovery mode.
|
||||||
|
- `check-rebuild.sh` guards the recovery device list and the boot.img export.
|
||||||
|
|
||||||
|
## Unreleased — per-device EDL Firehose programmers
|
||||||
|
|
||||||
|
- `flash-edl.py` now selects the Sahara/Firehose programmer from the target
|
||||||
|
device instead of always using `8110.mbn`: `8110.mbn` (`nokia-argon`),
|
||||||
|
`2720.mbn` (`nokia-beatles`), `800t.mbn` (`nokia-tough`), and `8k.mbn`
|
||||||
|
for **both** `nokia-sparkler` and `nokia-leo`. `--variant us` selects
|
||||||
|
`2720v.mbn` (`Nokia_bts_us`) for the 2720 Flip US variant.
|
||||||
|
- Added `--list-loaders`, which prints every `.mbn` with its size, embedded
|
||||||
|
attestation identity (`Nokia_beatles`, `Nokia_coconut`, `Nokia_bts_us`,
|
||||||
|
`Nokia_leo`) and device mapping. `flash-edl.sh` runs it without `sudo`.
|
||||||
|
- Selection warns when a programmer's embedded identity does not match the
|
||||||
|
expected device identity and fails with an actionable message when the
|
||||||
|
expected file is absent; `--loader PATH` still overrides everything.
|
||||||
|
- `wait_for_edl_usb()` auto-detects `05c6:9008`, `05c6:900e` and
|
||||||
|
`05c6:9006` instead of waiting only for 9008, and prints the PID it found;
|
||||||
|
`--pid` still forces a specific one. `check-rebuild.sh` guards the list.
|
||||||
|
- `check-rebuild.sh` guards the mapping and the presence of all five loaders.
|
||||||
|
- `8k.mbn` is signed `Nokia_leo` but is valid for both MSM8909 targets
|
||||||
|
(`nokia-sparkler`, `nokia-leo`); `2720v.mbn` is signed `Nokia_bts_us`
|
||||||
|
(2720 Flip US). Confirm identities with `--list-loaders` before flashing.
|
||||||
|
|
||||||
## Build `a1108` — codename `dejavu` (2026-11-08)
|
## Build `a1108` — codename `dejavu` (2026-11-08)
|
||||||
|
|
||||||
This build contains all previously unreleased changes below. The image and
|
This build contains all previously unreleased changes below. The image and
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ This manual covers flashing, operating, and customizing **Bananarchy Linux** (`2
|
|||||||
- Additional device images (`bananarchy-nokia-beatles.img`, `bananarchy-nokia-tough.img`, `bananarchy-nokia-sparkler.img`) can be generated at any time via `./rebuild-image.sh <device> --mkinitfs`.
|
- Additional device images (`bananarchy-nokia-beatles.img`, `bananarchy-nokia-tough.img`, `bananarchy-nokia-sparkler.img`) can be generated at any time via `./rebuild-image.sh <device> --mkinitfs`.
|
||||||
|
|
||||||
### 1.2 Bootloader and EDL programmer (`bootloader/`)
|
### 1.2 Bootloader and EDL programmer (`bootloader/`)
|
||||||
- `bootloader/lk2nd-msm8909.img`: secondary bootloader (`lk2nd`) providing Fastboot and `extlinux` boot discovery for MSM8905 and MSM8909 devices.
|
- `bootloader/lk2nd-msm8909.img`: secondary bootloader (`lk2nd`) providing Fastboot and `extlinux` boot discovery for MSM8905 and MSM8909 devices. `images/boot-lk2nd-nokia-beatles-display.img` is the source-built 2720 Flip port (see `bootloader/lk2nd/README.md`).
|
||||||
- `bootloader/loaders/8110.mbn`: signed Qualcomm Sahara/Firehose programmer (`05c6:9008`).
|
- `bootloader/loaders/`: signed Qualcomm Sahara/Firehose programmers (`05c6:9008`), one per target. The flasher picks the right one from `--device` / the positional target; run `./flash-edl.sh --list-loaders` to see each file's embedded attestation identity and mapping. Pass `--variant us` for a 2720 Flip US variant or `--loader PATH` to override the programmer entirely.
|
||||||
|
|
||||||
### 1.3 Core architecture highlights
|
### 1.3 Core architecture highlights
|
||||||
1. **Pure X11 (`Xlibre` + `sxmo-de-dwm`) for `240x320` QVGA displays**:
|
1. **Pure X11 (`Xlibre` + `sxmo-de-dwm`) for `240x320` QVGA displays**:
|
||||||
@@ -46,18 +46,24 @@ Run the automated EDL flasher from the repository root on your host machine:
|
|||||||
```bash
|
```bash
|
||||||
sudo ./flash-edl.sh
|
sudo ./flash-edl.sh
|
||||||
```
|
```
|
||||||
*(To flash another target device image, pass its codename, e.g. `sudo ./flash-edl.sh nokia-sparkler`.)*
|
*(To flash another target device image, pass its codename, e.g. `sudo ./flash-edl.sh nokia-sparkler`.)* The programmer is selected automatically: `8110.mbn` (8110 4G), `2720.mbn` (2720 Flip), `800t.mbn` (800 Tough), and `8k.mbn` for **both** 8000 4G and 6300 4G. The 2720 Flip US variant (`Nokia_bts_us`) uses `2720v.mbn`: pass `--variant us` (or `--loader ./bootloader/loaders/2720v.mbn`). Verify with `./flash-edl.sh --list-loaders`.
|
||||||
|
|
||||||
The script performs the following steps automatically:
|
The script performs the following steps automatically:
|
||||||
1. Temporarily pauses host `ModemManager` so it does not interfere with `05c6:9008`.
|
1. Temporarily pauses host `ModemManager` so it does not interfere with `05c6:9008`.
|
||||||
2. Waits for the phone to appear in Qualcomm EDL mode (`05c6:9008`):
|
2. Waits for the phone in Qualcomm EDL/Sahara mode. The flasher auto-detects
|
||||||
- **From Bananarchy Linux**: open the **Power** menu (`End / Power` key or `System menu -> Power`), select **Reboot to loader** (`sxmo_power.sh loader`) to enter the `lk2nd` Fastboot menu, and select **EDL** (or let `flash-edl.sh` automatically send `fastboot oem reboot-edl`).
|
`05c6:9008` (QDLoader), `05c6:900e` (QHSUSB_BULK, common after a failed
|
||||||
|
boot) and `05c6:9006` (DLOAD); pass `--pid` to force one:
|
||||||
|
- **From Bananarchy Linux**: open the **Power** menu (`End / Power` key or `System menu -> Power`), select **Reboot to loader** (`sxmo_power.sh loader`) to enter the visible `lk2nd` Fastboot menu, then select **EDL** (or let `flash-edl.sh` automatically send `fastboot oem reboot-edl`). The low-bit reboot cookie now survives the stock boot chain and keeps the menu available.
|
||||||
- **Button combo**: power off the phone, hold **D-Pad up + D-Pad down**, and plug in the USB cable.
|
- **Button combo**: power off the phone, hold **D-Pad up + D-Pad down**, and plug in the USB cable.
|
||||||
- **EDL cable**: hold the EDL cable button while plugging in USB.
|
- **EDL cable**: hold the EDL cable button while plugging in USB.
|
||||||
- **From ADB or Fastboot**: the script automatically sends `adb reboot edl` or `fastboot oem reboot-edl` if detected.
|
- **From ADB or Fastboot**: the script automatically sends `adb reboot edl` or `fastboot oem reboot-edl` if detected.
|
||||||
3. Uploads `bootloader/loaders/8110.mbn` via Sahara and connects to eMMC via Firehose.
|
- If the phone is stuck in Sahara with no fresh HELLO packet (e.g. a host
|
||||||
|
tool already consumed it), power-cycle it: hold **End/Power** for 15-20 s
|
||||||
|
(or disconnect/reconnect the battery), then retry. The flasher cannot
|
||||||
|
resume a half-open Sahara handshake.
|
||||||
|
3. Uploads the device-specific Firehose programmer from `bootloader/loaders/` via Sahara and connects to eMMC via Firehose.
|
||||||
4. Backs up `gpt.bin`, `fsc`, `fsg`, `modemst1`, `modemst2`, `persist`, and `boot` into `./backup/` if not already backed up.
|
4. Backs up `gpt.bin`, `fsc`, `fsg`, `modemst1`, `modemst2`, `persist`, and `boot` into `./backup/` if not already backed up.
|
||||||
5. Flashes `lk2nd-msm8909.img` to `boot`, flashes `images/bananarchy-<device>.img` to `userdata`, clears the stock `system` superblock, and reboots into Bananarchy Linux.
|
5. Flashes `images/bananarchy-<device>.img` to `userdata`, clears the stock `system` superblock (first 64 sectors / 32 KiB), and reboots. This wipe is the default for every method; pass `--no-wipe-system` only if you deliberately want a dual-boot phone with KaiOS intact. **The default `--method lk2nd` writes the source-built `images/boot-lk2nd-nokia-beatles-display.img` into `boot`, and the standalone `images/boot-bananarchy-nokia-beatles.img` into `recovery` on the 2720 Flip (Argon-shaped hybrid).** That lk2nd image is built from upstream lk2nd plus `bootloader/lk2nd/nokia-beatles.patch`: it carries cmdline `lk2nd lk2nd.compatible=nokia,beatles`, keeps the upstream QCDT layout (both `0x14b` entries sharing one DTB), injects a compact `/lk2nd/nokia-beatles` node with the downstream GC9305 v2 panel init stream, and adds `/cpus` with `cpu@0`..`cpu@3` to every QCDT DTB. The 2720's MSM8905 is a partial-goods 2-core part; aboot `ASSERT FAILED at (platform/msm_shared/partial_goods.c:80)` and rebooted into Sahara memory-debug EDL because upstream lk2nd DTBs had no `/cpus` — that was the black-screen/no-fastboot crash. aboot hands off to lk2nd, which keeps aboot's 240x320 RGB565 panel init (or replays the downstream stream when cont-splash is off), then scans `userdata` for `extlinux.conf` and boots `vmlinuz` + `initramfs` with the explicit `fdt /qcom-msm8905-nokia-beatles.dtb`. Rebuild it with `scripts/build-lk2nd-beatles.sh`; see `bootloader/lk2nd/README.md`. The port paints the Bananarchy RGB565 boot splash instead of the near-black upstream splash; the branded screen confirms lk2nd owns the framebuffer. Live `oem display-init` proved the GC9305 v2 stream and frame flush, chain-loaded diagnostics now fall back to the QCDT panel stream, and `oem scan-dtb` captures the final post-update kernel DTB. The release image is display-enabled (`lk2nd.display=on`) so the branded splash and Fastboot menu are visible; the normal no-display image remains available for diagnostics. All QUP/clock polls are bounded, so a dead SPI bus reports a failure instead of hanging. If the phone never shows anything, run `lsusb`: `05c6:900e` means aboot crashed into EDL (Sahara MEMORY_DEBUG), not that lk2nd failed to display; the `/cpus` fix above addresses the confirmed ASSERT. Flash `images/boot-lk2nd-nokia-beatles-diagnostic.img` with `--lk2nd-image --verify --dump-diagnostics` (forced fastboot + runtime `oem display-init` probe), then `fastboot oem log && fastboot get_staged lk2nd.log`; if it returns to `900e`, re-read aboot's RLOG crash buffer (the untouched `bootloader/lk2nd-msm8909.img` lacks `/cpus` as well and crashes identically). See `bootloader/lk2nd/README.md`. If the KaiOS splash persists on a normal power-on, **hold Volume Up** to boot the mainline boot.img in `recovery`. `--method both` is the fallback that writes the standalone `images/boot-bananarchy-nokia-beatles.img` (appended beatles DTB, exact qcom IDs and 512 MiB `/memory` fallback) into both slots; `--method recovery` writes it only to `recovery`. Use `--boot-image PATH` to override the standalone image. Add `--verify` to read back every flashed `boot`/`recovery` partition and confirm the write really committed; a mismatch aborts before `userdata` is touched. Add `--dump-diagnostics` to save small `devinfo`/`aboot`/`tz`/`config` partitions into `backup/diag-*.img` for offline secure-boot analysis. The captured `diag-devinfo.img` proved this 2720 is locked (`is_unlocked=0`, `is_tampered=0`) while `diag-aboot.img` contains `Nokia_beatles ROOT CA0` and `Device is unlocked! Skipping verification...`; aboot therefore rejects every unsigned boot.img. The flasher defaults to unlocking `devinfo` on `nokia-beatles` before writing lk2nd, saves the original as `backup/devinfo-locked-<device>.img`, and accepts `--unlock-bootloader` / `--no-unlock-bootloader`. `scripts/make-unlocked-devinfo.py` can produce the patched image offline. Correction: `target_get_vb_version()` returns `VB_L` on this GPT (no `keymaster`), so aboot reads eMMC `devinfo`, not RPMB. The captured `diag-devinfo.img` after flashing shows `is_unlocked=1`; the eMMC unlock works and **no `fastboot oem unlock-go` step is needed**. `--only-unlock`, `enable_oem_unlock()` and `scripts/make-oem-unlock-config.py` are optional EDL-only prerequisites kept for completeness. EDL is the only required interface. After any DTB change run `python3 scripts/repack-beatles-bootimg.py` and `python3 scripts/sync-beatles-bootfs.py --debug-cmdline`; after any lk2nd change run `./scripts/build-lk2nd-beatles.sh`; never write an Android boot.img directly at raw offset 1 MiB. To diagnose a persistent `05c6:900e` without stock fastboot, power-cycle into EDL and run `python3 scripts/dump-edl-crash.py --out backup/crash-run`; it reads the Sahara memory-debug table and dumps aboot/TZ crash regions. The partition being overwritten is always backed up as `<partition>-<device>.img` (e.g. `boot-nokia-beatles.img`), so stale backups from anotheLine truncated
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -130,7 +136,7 @@ All twenty-five phone applications are compiled as shared-object plugins (`/usr/
|
|||||||
|
|
||||||
1. **System and context menus (`dmenu.so` / `dmenu` / `xdmenu`)**:
|
1. **System and context menus (`dmenu.so` / `dmenu` / `xdmenu`)**:
|
||||||
- **Open / close**: press **Left softkey (`Menu`)** for the **System menu** or **Right softkey (`Back`)** inside an application for its **Context menu**; press the same softkey or `Escape` to close.
|
- **Open / close**: press **Left softkey (`Menu`)** for the **System menu** or **Right softkey (`Back`)** inside an application for its **Context menu**; press the same softkey or `Escape` to close.
|
||||||
- **Built-in submenus and instant toggles**: renders `sys`, `applications`, `scripts`, `modem`, `config`, `sdcard`, `power` (including **Lock**, **Lock (Screen off)**, **Logout**, **Reboot**, **Reboot to loader**, **Reboot to EDL**, and **Poweroff**), `audio` (with linear volume steps and **Output: Speaker**, **Output: Earpiece**, and **Output: Headphones** routing), `notifications`, `wm`, `timezone`, `games`, `st`, and `nano` menus in place in `< 0.5 ms` without spawning external processes.
|
- **Built-in submenus and instant toggles**: renders `sys`, `applications`, `scripts`, `modem`, `config`, `sdcard`, `power` (including **Lock**, **Lock (Screen off)**, **Logout**, **Reboot**, **Reboot to loader**, and **Poweroff**; use the lk2nd Fastboot menu for **EDL**), `audio` (with linear volume steps and **Output: Speaker**, **Output: Earpiece**, and **Output: Headphones** routing), `notifications`, `wm`, `timezone`, `games`, `st`, and `nano` menus in place in `< 0.5 ms` without spawning external processes.
|
||||||
- **Script compatibility**: any script piping items into `/usr/bin/dmenu` or `sxmo_dmenu.sh` communicates with the resident daemon over `/tmp/dwm_plugin_dmenu.sock`.
|
- **Script compatibility**: any script piping items into `/usr/bin/dmenu` or `sxmo_dmenu.sh` communicates with the resident daemon over `/tmp/dwm_plugin_dmenu.sock`.
|
||||||
|
|
||||||
2. **Global phone controls (`xdrawer.so` / `xdrawer`)**:
|
2. **Global phone controls (`xdrawer.so` / `xdrawer`)**:
|
||||||
@@ -443,6 +449,25 @@ Three native X11 games (`/usr/bin/snake`, `/usr/bin/tetris`, and `/usr/bin/scoun
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
### 4.1 First-boot troubleshooting on the 2720 Flip
|
||||||
|
|
||||||
|
- **X startup and keypad**: OpenRC starts independent services in parallel; `etc/init.d/local` replaces its stock `after *` dependency, which deadlocked with parallel startup on this image. `udev_settle_timeout=2` stops missing modem firmware from holding the display manager behind a long `udevadm settle`, and `bananarchy-sshd-debug` starts independently of `local.d`. A boot-open flip reads `/run/bananarchy/lid-state` and starts in `state=unlock` with no passcode screen, so the keypad is live as soon as `dwm` starts. If the keypad is dead, check `rc-service bananarchy-lid status`, `cat /run/bananarchy/lid-state`, `sxmo_state.sh get`, `/tmp/bananarchy_screen_locked`, `DISPLAY=:0 xwininfo -id 0xa00001` and `DISPLAY=:0 xinput list`.
|
||||||
|
- **Closing the flip**: `bananarchy-lid` reads the current `EV_SW` switch mask from `/dev/input/event2`, follows hall edge events with an 80 ms stability window and only polls raw gpio36/gpio92 debugfs levels when no switch evdev is available. On close it blanks the main panel and keypad LED immediately, runs `sxmo_state.sh set screenoff` and tells the cover daemon `LID CLOSED`; on open it clears the lock flag, restores both backlights, sends a trusted `CLOSE` to `locker.so` and runs `sxmo_state.sh set unlock`. Check `rc-service bananarchy-lid status`, `sxmo_state.sh get` and `grep -E " gpio(36|92) " /sys/kernel/debug/gpio`. If the hall polarity is inverted on your unit, set `BANANARCHY_LID_GPIO_FILE` to a different debugfs GPIO file for the fallback path.
|
||||||
|
- **Cover display status**: `bananarchy-cover-idle` is the compiled 0%-CPU default daemon and answers `bananarchy-coverctl`; the native `bananarchy-coverd` is retained only for diagnostics. The shipping DTS keeps the known-good single internal panel; `cover-panel.dtsi` is compile-tested but not applied. The expected live state is no `/dev/fb1` and `bananarchy-coverctl STATUS` reporting `backend=none`. The renderer uses the 32-bpp fbdev `write()` path for future hardware (not `mmap()`, which raises `SIGBUS` on the DRM fbdev). gpio13 selection and external reset polarity still require physical sign-off before the overlay is re-enabled.
|
||||||
|
- **Camera app frozen / UI unresponsive**: check `top` for `bananarchy-volume-keys`. The daemon must be a single instance at 0% CPU; stale evdev fds are pruned by `prune_devices()`/`drop_device()` and guarded by `flock`. `rc-service bananarchy-volume-keys status` and `bananarchy-keypad-diagnose.sh` report its state. `xcamera` should return immediately and `bananarchy-photo <file>` should write a 600x800 JPEG.
|
||||||
|
- **Camera**: `/dev/video0` is provided by the out-of-tree `msm8905-cam` module, loaded at boot by `/etc/modules-load.d/bananarchy-hardware.conf` and `etc/local.d/10-bananarchy-hardware.start`. Check with `v4l2-ctl --list-devices`; a missing node means the module did not load (previously caused by a missing `/bin/sed` breaking the `modules` service).
|
||||||
|
- **Side volume keys**: the compiled evdev daemon `bananarchy-volume-keys` reads `KEY_VOLUMEUP`/`KEY_VOLUMEDOWN` directly and calls `sxmo_audio.sh vol up/down 5`; `sxmo_audio.sh` mirrors that percentage into the live PipeWire sink (the MSM8905 mainline kernel has no ALSA card yet). Press a side button and check `wpctl get-volume <sink-id>`; `bananarchy-keypad-diagnose.sh` reports the XKB mapping and both volume values.
|
||||||
|
- **First-boot checklist**: the rootfs must contain the full BusyBox applet set (`scripts/busybox-applets.txt`). `/bin/ash` is the `user` login shell and `/bin/grep` is used by OpenRC; if either is missing, sshd rejects `user/147147` and `udev` cannot start. Check `rc-service udev status` and `DISPLAY=:0 xinput list`: the keypad only appears in X when udev is running, `/dev/input/event*` are `0660 root:input` and elogind lists the keyboards under `seat0`. Run `rc-service tinydm restart` after fixing udev.
|
||||||
|
- **SSH rejects `147147`**: the PAM-enabled `/usr/sbin/sshd.pam` is pinned through `/etc/conf.d/sshd`, `/etc/pam.d/sshd` supplies an explicit `pam_unix` stack, and both `PasswordAuthentication` and `KbdInteractiveAuthentication` are enabled in `/etc/ssh/sshd_config.d/90-bananarchy-access.conf`. If PAM is ever broken again, a USB-only diagnostic listener is available on port 2222 (bound to `172.16.42.1`, never to Wi-Fi):
|
||||||
|
```bash
|
||||||
|
ssh -p 2222 user@172.16.42.1
|
||||||
|
```
|
||||||
|
The phone key in `keys/phone_id_ed25519` is pre-authorized for both `user` and `root`; add `touch /etc/bananarchy-no-debug-sshd` to turn the fallback listener off.
|
||||||
|
- **No boot splash**: the `extlinux.conf` `append` line must contain `quiet splash`. The pmOS initramfs defaults to `nosplash=y` and only starts `plymouthd` for the literal `splash` parameter; `scripts/sync-beatles-bootfs.py` restores the release cmdline and `--check` rejects a debug cmdline. Use `--debug-cmdline --allow-debug` only for a diagnostic build.
|
||||||
|
- **Keypad does not respond**: run `bananarchy-keypad-diagnose.sh` over SSH. It reports `/proc/bus/input/devices`, udev `ID_INPUT_*` tags (forced by `99-bananarchy-keypad.rules`), `SW_LID` / `SW_KEYPAD_SLIDE` state, kernel messages, Xorg/libinput devices and a short raw `evtest` probe. The Xorg rule `60-bananarchy-keypad.conf` binds the matrix keypad by product name so a missing `ID_INPUT_KEYBOARD` tag cannot make X ignore it. If the kernel emits no `EV_KEY` events at all, check the row/column GPIOs and `SW_LID` polarity on hardware.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 5. Command-line hardware reference
|
## 5. Command-line hardware reference
|
||||||
|
|
||||||
### 5.1 Taking photos and screenshots (`bananarchy-photo`, `bananarchy-screenshot`, and `/dev/video0`)
|
### 5.1 Taking photos and screenshots (`bananarchy-photo`, `bananarchy-screenshot`, and `/dev/video0`)
|
||||||
@@ -626,3 +651,7 @@ sudo ./flash-edl.sh nokia-argon # uses vendor/edl/ and auto-instal
|
|||||||
```
|
```
|
||||||
|
|
||||||
The bootstrap is idempotent: an up-to-date rootfs is left untouched. `prebuilt/` is the single source of truth for compiled artifacts, and `scripts/rootfs-packages.txt` is the single source of truth for the package set. The patched EDL client library is vendored under `vendor/edl/` (MIT), so flashing works from a clean clone without a manual download; `flash-edl.sh` installs `pyusb` and `pyserial` into the gitignored `.flash-deps/` directory when needed.
|
The bootstrap is idempotent: an up-to-date rootfs is left untouched. `prebuilt/` is the single source of truth for compiled artifacts, and `scripts/rootfs-packages.txt` is the single source of truth for the package set. The patched EDL client library is vendored under `vendor/edl/` (MIT), so flashing works from a clean clone without a manual download; `flash-edl.sh` installs `pyusb` and `pyserial` into the gitignored `.flash-deps/` directory when needed.
|
||||||
|
|
||||||
|
## Verified 2720 Flip image set
|
||||||
|
|
||||||
|
For the `a1108` / `dejavu` release, use the verified known-good `nokia-beatles` raw image, standalone boot image, and display-enabled lk2nd image generated in `images/`. These files are local build outputs and are not tracked in git; `scripts/check-rebuild.sh` pins their hashes when present. The X session performs a one-shot startup cleanup of stale `dmenu` and xlocker keyboard grabs, while `dwm` keeps the known-good 350 ms wake guard. `prepare-release.sh` rebuilds missing images from source and packages them; use `BA_REBUILD=1` for a forced source rebuild.
|
||||||
@@ -82,7 +82,7 @@ bananarchy/
|
|||||||
├── rebuild-image.sh # Builds boot.img and partitioned MBR .img
|
├── rebuild-image.sh # Builds boot.img and partitioned MBR .img
|
||||||
├── chroot-shell.sh # Rootless Docker armv7 package and rootfs customization shell
|
├── chroot-shell.sh # Rootless Docker armv7 package and rootfs customization shell
|
||||||
├── artwork/ # Bananarchy master icon, generated icons, wallpapers, and splashes
|
├── artwork/ # Bananarchy master icon, generated icons, wallpapers, and splashes
|
||||||
├── bootloader/ # lk2nd secondary bootloader and Sahara/Firehose programmer (8110.mbn)
|
├── bootloader/ # lk2nd secondary bootloader, source port patch/toolchain, and per-device Sahara/Firehose programmers
|
||||||
├── devices/ # Device definitions, DTBs, and MIPI-DBI panel init sequences
|
├── devices/ # Device definitions, DTBs, and MIPI-DBI panel init sequences
|
||||||
├── patches/ # Upstream kernel, EDL, Sxmo, Xlibre, and fcitx5-t9 patch sets
|
├── patches/ # Upstream kernel, EDL, Sxmo, Xlibre, and fcitx5-t9 patch sets
|
||||||
├── src/
|
├── src/
|
||||||
@@ -183,6 +183,7 @@ All components are pre-compiled in `prebuilt/` and `overlay/rootfs/`, and can be
|
|||||||
```
|
```
|
||||||
Output images are written to `images/`:
|
Output images are written to `images/`:
|
||||||
- `images/bananarchy-<device>.img`: partitioned MBR image with `pmOS_boot` + `pmOS_root` for EDL `userdata`, `fastboot flash userdata`, or a microSD card.
|
- `images/bananarchy-<device>.img`: partitioned MBR image with `pmOS_boot` + `pmOS_root` for EDL `userdata`, `fastboot flash userdata`, or a microSD card.
|
||||||
|
- `images/boot-bananarchy-<device>.img`: standalone Android `boot.img` with the appended device DTB. On `nokia-beatles` the default `--method lk2nd` boots the **source-built** `images/boot-lk2nd-nokia-beatles-display.img` first (the upstream QCDT layout with a compact `/lk2nd/nokia-beatles` node, `/cpus` added to every QCDT DTB to satisfy aboot's partial-goods ASSERT, and the GC9305 v2 panel init stream; see `bootloader/lk2nd/README.md`), then lk2nd loads this kernel/DTB from `userdata` via `extlinux.conf`. The default writes lk2nd to `boot` and this standalone `boot.img` to `recovery`; `--method both` is the fallback that flashes it into both slots. Hold Volume Up if the KaiOS splash persists. The stock 2720 aboot is locked, so the flasher also sets `devinfo.is_unlocked=1` by default (see `scripts/make-unlocked-devinfo.py`); pass `--no-unlock-bootloader` only if you know the device is already unlocked. The eMMC `devinfo` unlock is effective here (`VB_L` path, no `keymaster`), so EDL alone is sufficient; stock fastboot / `oem unlock-go` is not required. `--only-unlock` is optional. After changing that DTB, run `scripts/repack-beatles-bootimg.py` and `scripts/sync-beatles-bootfs.py --debug-cmdline`; rebuild lk2nd with `scripts/build-lk2nd-beatles.sh` if the lk2nd port changed; validate with `scripts/check-beatles-bootimg.py`, `scripts/check-lk2nd-beatles.py`, `scripts/test-lk2nd-beatles-port.py` and `scripts/sync-beatles-bootfs.py --check`. If the phone only shows the KaiOS logo and then goes dark, check `lsusb`: `05c6:900e` means aboot crashed into EDL. The confirmed cause was `ASSERT FAILED at (platform/msm_shared/partial_goods.c:80): 0` because lk2nd's QCDT DTBs lacked `/cpus`; the port now adds it. Flash `images/boot-lk2nd-nokia-beatles-diagnostic.img` with `--lk2nd-image --verify --dump-diagnostics` (forced fastboot + runtime `oem display-init` probe, QCDT panel fallback for chain-loading, final post-update `oem scan-dtb`, and bounded pstore console staging), if it returns to `900e`, re-read aboot's RLOG buffer for the next ASSERT (the untouched `bootloader/lk2nd-msm8909.img` lacks `/cpus` too and will crash identically); see `bootloader/lk2nd/README.md`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -194,10 +195,17 @@ sudo ./flash-edl.sh nokia-argon
|
|||||||
|
|
||||||
The patched EDL client library is vendored under `vendor/edl/` (MIT), so a clean clone flashes without any manual download. `flash-edl.sh` also installs `pyusb` and `pyserial` into the gitignored `.flash-deps/` directory when the host lacks them; set `BANANARCHY_EDL_DIR` to use a different library checkout.
|
The patched EDL client library is vendored under `vendor/edl/` (MIT), so a clean clone flashes without any manual download. `flash-edl.sh` also installs `pyusb` and `pyserial` into the gitignored `.flash-deps/` directory when the host lacks them; set `BANANARCHY_EDL_DIR` to use a different library checkout.
|
||||||
|
|
||||||
|
After a successful flash the phone boots lk2nd's branded boot splash, then the Plymouth boot splash, then X. Log in over the USB network with `ssh user@172.16.42.1` (password `147147`); if the main sshd's PAM stack is ever broken, a USB-only fallback listener accepts the same credentials on `ssh -p 2222 user@172.16.42.1`. Selecting **Reboot to loader** from the Power menu shows the visible lk2nd Fastboot menu; **Bootloader** stays in fastboot, **EDL** enters Sahara, and `fastboot reboot` returns to Linux. On the 2720 Flip, OpenRC starts independent services in parallel with a patched `local` service, a bounded `udevadm settle` and an independent USB fallback sshd keep X from waiting on modem firmware, a boot-open lid starts unlocked with a live keypad, and the external cover overlay remains compile-tested but hardware-gated; the compiled idle renderer is ready for a future `/dev/fb1`. See `MANUAL.md` section 4.1 for first-boot troubleshooting of the boot splash, keypad input and the external cover display.
|
||||||
|
|
||||||
See [MANUAL.md](MANUAL.md) for complete EDL, Fastboot, and microSD installation instructions, keypad navigation shortcuts, and the multi-mode T9 reference.
|
See [MANUAL.md](MANUAL.md) for complete EDL, Fastboot, and microSD installation instructions, keypad navigation shortcuts, and the multi-mode T9 reference.
|
||||||
|
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
All Bananarchy-specific components were initially created by Luxferre and released into the public domain with no warranties.
|
All Bananarchy-specific components were initially created by Luxferre and released into the public domain with no warranties.
|
||||||
|
|
||||||
Alpine Linux, postmarketOS/Nura, and other third-party components are guided by their respective licensing terms.
|
Alpine Linux, postmarketOS/Nura, and other third-party components are guided by their respective licensing terms.
|
||||||
|
|
||||||
|
## Verified 2720 Flip release images
|
||||||
|
|
||||||
|
The `a1108` / `dejavu` release packages the physically verified known-good 2720 Flip image set: the raw `userdata` image, standalone mainline `boot.img`, and display-enabled lk2nd image. These are local build outputs, not tracked in git; `scripts/check-rebuild.sh` pins their hashes when present, and `prepare-release.sh` rebuilds missing artifacts from source. `dwm` uses the known-good 350 ms wake guard, the X session releases stale startup keyboard grabs once, and `BA_REBUILD=1` forces an explicit rebuild.
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
FROM alpine:3.20
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
gcc-arm-none-eabi \
|
||||||
|
make \
|
||||||
|
python3 \
|
||||||
|
dtc \
|
||||||
|
dtc-dev \
|
||||||
|
tar \
|
||||||
|
git \
|
||||||
|
py3-setuptools
|
||||||
@@ -0,0 +1,265 @@
|
|||||||
|
# nokia-beatles lk2nd port
|
||||||
|
|
||||||
|
Source port of
|
||||||
|
[`msm8916-mainline/lk2nd`](https://github.com/msm8916-mainline/lk2nd) for the
|
||||||
|
**Nokia 2720 Flip (`nokia-beatles`)**. Both images in `images/` are compiled
|
||||||
|
from source; the old binary-patching approach is gone.
|
||||||
|
|
||||||
|
## Root cause of "black screen, no fastboot" (confirmed)
|
||||||
|
|
||||||
|
The phone enumerates as **`05c6:900e` in Sahara MEMORY_DEBUG mode** after every
|
||||||
|
boot attempt — aboot crashed before lk2nd ever ran. Reading aboot's RAM over
|
||||||
|
Sahara exposed its `WITH_DEBUG_LOG_BUF` ring buffer (cookie `0x474f4c52`
|
||||||
|
"RLOG"), which contains the exact failure:
|
||||||
|
|
||||||
|
```
|
||||||
|
[580] target_display_init ret=0
|
||||||
|
[590] Failed to get parent node: /cpus errno:-1
|
||||||
|
[600] panic (caller 0x8f61aa00): ASSERT FAILED at (platform/msm_shared/partial_goods.c:80): 0
|
||||||
|
[610] HALT: reboot into dload mode...
|
||||||
|
```
|
||||||
|
|
||||||
|
The 2720's **MSM8905 is a partial-goods (2-core) part**. Its stock aboot calls
|
||||||
|
`update_partial_goods_dtb_nodes()` on the QCDT-selected device tree and
|
||||||
|
`ASSERT(0)`s when `/cpus`, `/cpus/cpu@2` or `/cpus/cpu@3` (with a 4-byte
|
||||||
|
`device_type`) is missing. It then rewrites those `device_type` values from
|
||||||
|
`"cpu\0"` to `"nak\0"`. **Upstream lk2nd's QCDT DTBs contain no `/cpus` node at
|
||||||
|
all** (only `/`, `/chosen`, `/memory`, `/lk2nd`), so *every* lk2nd image —
|
||||||
|
including the untouched `bootloader/lk2nd-msm8909.img` — crashes on this phone.
|
||||||
|
That is why lk2nd never appeared, why the screen went dark, and why no fastboot
|
||||||
|
ever enumerated.
|
||||||
|
|
||||||
|
Other evidence from the same dump:
|
||||||
|
|
||||||
|
- aboot's BSS held our boot.img header (`ANDROID!`, kernel 345048) and cached
|
||||||
|
cmdline `lk2nd lk2nd.compatible=nokia,beatles`; it had also built
|
||||||
|
`mdss_mdp3.panel=1:spi:0:qcom,mdss_spi_gc9305_v2_qvga_cmd:1:none`, i.e. it
|
||||||
|
accepted the image, detected the panel and **initialized the panel itself**.
|
||||||
|
- The kernel payload at `0x80008000` was byte-identical to the flashed image;
|
||||||
|
lk2nd's BSS at `0x80080000` was all zeros, so it never executed.
|
||||||
|
- `devinfo` from the last dump has `is_unlocked=1`, so signature verification is
|
||||||
|
not the blocker.
|
||||||
|
|
||||||
|
Crash evidence lives in `backup/nokia-beatles-2720/crash-20261109/`
|
||||||
|
(`aboot-log.txt`, `aboot_full_rw.bin`, `memory_table.bin`, `aboot_bss2.bin`,
|
||||||
|
`aboot_data.bin`, `mem_bootimg.bin`, `load_cmm.bin`, `rst_stat.bin`,
|
||||||
|
`pmic_pon.bin`, `ocimem.bin`).
|
||||||
|
|
||||||
|
## The port
|
||||||
|
|
||||||
|
- **`/cpus` fix** in the common `lk2nd/device/dts/lk2nd.dtsi`: a `/cpus` node
|
||||||
|
with `cpu@0`..`cpu@3`, each `device_type = "cpu"` (exactly 4 bytes so aboot's
|
||||||
|
`fdt_setprop_inplace(..., "nak", 4)` succeeds). Because it is in the common
|
||||||
|
dtsi, **all eight QCDT DTBs** in the image have it — aboot cannot pick one
|
||||||
|
without it. The mainline `qcom-msm8905-nokia-beatles.dtb` already has `/cpus`,
|
||||||
|
so the Volume Up recovery path is fine too.
|
||||||
|
- **No separate QCDT DTB.** `msm8905-qrd-skub.dts` keeps upstream's
|
||||||
|
`qcom,msm-id = <0x14b 0>` and
|
||||||
|
`qcom,board-id = <0x0b 0x100>, <0x1000b 0x100>`. Both `0x14b` entries
|
||||||
|
(`0xb/0x100` and `0x1000b/0x100`) point at the same DTB. Growing `dt_size`
|
||||||
|
is harmless — aboot happily processed a `24576`-byte QCDT before patching it.
|
||||||
|
- `nokia-beatles.dtsi` injects a compact `/lk2nd/nokia-beatles` node:
|
||||||
|
`model = "Nokia 2720 Flip"`, `compatible = "nokia,beatles"`,
|
||||||
|
`lk2nd,match-panel`, `lk2nd,dtb-files = "msm8905-nokia-beatles"` (lk2nd
|
||||||
|
resolves this to `qcom-msm8905-nokia-beatles.dtb`), and three panel subnodes
|
||||||
|
matching every name the aboot can report.
|
||||||
|
- Only `qcom,mdss_spi_gc9305_v2_qvga_cmd` — the panel the live aboot reports —
|
||||||
|
carries `lk2nd,panel-init`: the downstream KaiOS 3.10
|
||||||
|
`qcom,mdss-spi-on-command` stream in `[wait dlen payload...]` form, setting
|
||||||
|
RGB565, the 240x320 window, sleep-out, display-on and RAMWR.
|
||||||
|
`lk2nd.force-panel-init` forces a replay; by default lk2nd keeps aboot's
|
||||||
|
cont-splash init because aboot reports `1:spi:0:`.
|
||||||
|
- `lk2nd/include/lk2nd/spi-panel-init.h`: byte-stream walker shared between
|
||||||
|
`platform/msm_shared/mdss_spi.c` and the host unit test.
|
||||||
|
- `lk2nd/device/2nd/spi-display.c`: guards a NULL interface, looks up the
|
||||||
|
stream, and paints the Bananarchy RGB565 boot splash before the first
|
||||||
|
framebuffer flush (`DISABLE_SPLASH_PARTITION=1` plus `menu.c`'s bottom-only
|
||||||
|
text otherwise leaves a nearly black frame).
|
||||||
|
- Cmdline: `lk2nd lk2nd.compatible=nokia,beatles` — an upstream lk2nd feature
|
||||||
|
that selects the beatles node directly.
|
||||||
|
|
||||||
|
## Current state: lk2nd works; the display is opt-in and probeable
|
||||||
|
|
||||||
|
lk2nd boots, reaches fastboot and the extlinux chain. The mainline kernel
|
||||||
|
still has not been observed booting successfully; that is a separate issue
|
||||||
|
(the kernel side, not lk2nd). The remaining lk2nd work was to make panel
|
||||||
|
initialization **safe and verifiable** rather than disabled forever.
|
||||||
|
|
||||||
|
Earlier attempts to enable the SPI display during `LK2ND_INIT` wedged lk2nd
|
||||||
|
before USB came up (boot vibrator stuck on, no fastboot). The cause is QUP
|
||||||
|
SPI/clock register polls with no timeout: several loops in `spi_qup.c` and
|
||||||
|
`clock_lib2.c` spin forever when the clock never comes up. The port now:
|
||||||
|
|
||||||
|
- Bounds every QUP FIFO wait (`QUP_FIFO_TIMEOUT`) and every stuck clock poll
|
||||||
|
(`CLK_POLL_TIMEOUT`), so a dead bus can never wedge the bootloader.
|
||||||
|
- Registers a RAM-only 240x320 RGB565 framebuffer at boot by default
|
||||||
|
(`lk2nd.no-display`), which keeps `fbcon_display()` non-NULL so cont-splash
|
||||||
|
does not try to read MDP registers.
|
||||||
|
- Adds fastboot commands that run **after USB is up**:
|
||||||
|
- `fastboot oem display-init` — `mdss_spi_init()`, the GC9305 v2
|
||||||
|
`lk2nd,panel-init` stream (RGB565, 240x320 window, sleep-out, display-on,
|
||||||
|
RAMWR), then paint the branded boot splash and flush one frame. Safe because
|
||||||
|
all polls are bounded; failures are reported and logged, not hung.
|
||||||
|
- `fastboot oem display-test` — repaint and flush.
|
||||||
|
- `fastboot oem screenshot && fastboot get_staged shot.ppm` — verify the
|
||||||
|
framebuffer contents.
|
||||||
|
- `fastboot oem scan-dtb && fastboot get_staged kernel.dtb` — stage the
|
||||||
|
exact DTB lk2nd hands the kernel (after DT updates) for offline inspection.
|
||||||
|
- `fastboot oem scan-boot` / `oem log` — extlinux scan and boot log.
|
||||||
|
- `images/boot-lk2nd-nokia-beatles-display.img` uses `lk2nd.display=on` to
|
||||||
|
run the same panel init during boot. Flash it with
|
||||||
|
`--lk2nd-image ./images/boot-lk2nd-nokia-beatles-display.img`.
|
||||||
|
|
||||||
|
Corrections to earlier notes: the pmOS initramfs jumps straight to stage 2
|
||||||
|
when `/init_2nd.sh` is present (it is), so a missing `/boot/initramfs-extra`
|
||||||
|
is **not** the cause of a hang. And an all-`0xff` ramoops region after a hard
|
||||||
|
power cycle is decayed DRAM, not proof that the kernel hung before pstore.
|
||||||
|
|
||||||
|
## Decisive finding: extlinux is fine, the mainline kernel hangs
|
||||||
|
|
||||||
|
`oem scan-boot` run on the live device proved the boot chain: `wrp0p32p0`
|
||||||
|
(pmOS_boot, 256 MiB) enumerated and mounted, `/extlinux/extlinux.conf`
|
||||||
|
parsed, `vmlinuz` / `qcom-msm8905-nokia-beatles.dtb` / `initramfs` all
|
||||||
|
resolved and `lk2nd_boot_label()` reached `boot_linux()` without errors.
|
||||||
|
`oem read-partition` also verified the live `userdata` MBR (`55aa`, two
|
||||||
|
`0x83` partitions) and its ext2 superblock (`53ef` at 1 MiB).
|
||||||
|
|
||||||
|
So the mainline kernel is where the remaining hang is. `fastboot boot` of the
|
||||||
|
standalone debug boot.img also downloaded OKAY then produced no USB RNDIS,
|
||||||
|
consistent with a kernel that stops before userspace. lk2nd now always
|
||||||
|
injects the ramoops reserved-memory node on Linux boots, and
|
||||||
|
`CONFIG_PSTORE_RAM=y` / `CONFIG_PSTORE_CONSOLE=y` are enabled; a warm reset
|
||||||
|
(power-cycle into fastboot with Vol Down + Power) should preserve
|
||||||
|
`oem ramoops console` output. A hard power-off decays DRAM instead, which is
|
||||||
|
why one earlier read of that region was all `0xff`.
|
||||||
|
|
||||||
|
Note: the panel init stream in `lk2nd,panel-init` is the downstream KaiOS
|
||||||
|
3.10 `qcom,mdss-spi-on-command` sequence for `spi_gc9305_v2_qvga_cmd`,
|
||||||
|
byte-for-byte ([wait dlen payload...] with the wait applied after the
|
||||||
|
command). `lk2nd/include/lk2nd/spi-panel-init.h` walks it; the host C test
|
||||||
|
verifies framing, RGB565, 240x320 window, delays and error handling.
|
||||||
|
|
||||||
|
## Live hardware confirmation and next step
|
||||||
|
|
||||||
|
The GC9305 v2 panel init is confirmed on the phone. A chain-loaded
|
||||||
|
diagnostic image initially lacked aboot's `mdss_mdp3.panel` tag, so the
|
||||||
|
port now falls back to the beats QCDT node's only `lk2nd,panel-init`
|
||||||
|
stream and keeps the known SPI interface. With that fallback,
|
||||||
|
`oem display-init` and `oem display-test` both returned OKAY, USB stayed
|
||||||
|
up, and `oem screenshot` staged a 240x320 P6 framebuffer with exactly the
|
||||||
|
three test colors: a cyan 20-pixel top bar and alternating blue/dark
|
||||||
|
a branded splash. The boot-time `lk2nd.display=on` path also pushes SPI
|
||||||
|
traffic; the forced-fastboot menu redraws over the splash afterwards.
|
||||||
|
|
||||||
|
The diagnostics were tightened after that live run:
|
||||||
|
|
||||||
|
- `oem scan-boot` now lets `boot_linux()` apply the final cmdline and DT
|
||||||
|
updates, then returns before the kernel jump. `oem scan-dtb` therefore
|
||||||
|
stages the actual post-update DTB, not the raw extlinux file.
|
||||||
|
- `oem ramoops console` validates the pstore signature, size and offset,
|
||||||
|
rotates a wrapped ring buffer, and reports `No valid pstore console`
|
||||||
|
for decayed DRAM instead of trying to stage `0xffffffff` bytes.
|
||||||
|
- The upstream per-word QUP `SPEW` log was removed. Earlier `DEBUG=2`
|
||||||
|
builds spent about 40 seconds per full frame and overwrote the whole
|
||||||
|
32 KiB log with FIFO status lines.
|
||||||
|
|
||||||
|
From fastboot, without reflashing:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
fastboot boot ./images/boot-lk2nd-nokia-beatles-diagnostic.img
|
||||||
|
fastboot getvar lk2nd:panel
|
||||||
|
fastboot oem display-init
|
||||||
|
fastboot oem display-test
|
||||||
|
fastboot oem screenshot && fastboot get_staged shot.ppm
|
||||||
|
fastboot oem scan-boot
|
||||||
|
fastboot oem scan-dtb && fastboot get_staged kernel.dtb
|
||||||
|
fastboot oem log && fastboot get_staged lk2nd.log
|
||||||
|
fastboot oem ramoops console && fastboot get_staged console.log
|
||||||
|
```
|
||||||
|
|
||||||
|
Use `kernel.dtb` to check whether `cpu@2`/`cpu@3` are `status = "fail"`
|
||||||
|
on this dual-core partial-goods part (fuse `0x58000` reads `0x30100094`).
|
||||||
|
The `r2` diagnostic staged a 41440-byte final DTB that differs from the
|
||||||
|
source DTB: `cpu@2`/`cpu@3` are `status = "fail"`,
|
||||||
|
`/reserved-memory/ramoops@9fa80000` has a 256 KiB console, and `/chosen`
|
||||||
|
contains the final bootargs plus `linux,initrd-start` / `linux,initrd-end`.
|
||||||
|
The partial-goods DT update is therefore confirmed; enabled CPU2/3 are no
|
||||||
|
longer the leading kernel-hang suspect. If pstore was populated by a warm
|
||||||
|
reset, `console.log` gives the kernel console; a hard power-off decays DRAM
|
||||||
|
and produces no valid console. Upstream `oem read-partition` passes the
|
||||||
|
requested byte count directly to `mmc_read()`, which asserts unless the
|
||||||
|
size is a 512-byte multiple; the 16-byte `SEANDROIDENFORCE` tail used to
|
||||||
|
drop USB during boot-slot read-back. The r3 port rounds the MMC read up
|
||||||
|
internally, rejects unaligned offsets and stages only the requested byte
|
||||||
|
count. Use `fastboot reboot`, not `fastboot reboot-bootloader`, to test a
|
||||||
|
persisted boot slot. `reboot-bootloader` now writes the low-bit
|
||||||
|
`FASTBOOT_MODE` cookie and returns to this lk2nd Fastboot menu; it is not
|
||||||
|
a way to test the newly flashed image. A `fastboot flash boot` handoff can
|
||||||
|
still drop USB, so power-cycle with Vol Down + Power if fastboot does not
|
||||||
|
reappear.
|
||||||
|
|
||||||
|
## Power-menu Fastboot menu
|
||||||
|
|
||||||
|
`sxmo_power.sh loader` writes `0x02` into `PON_SOFT_RB_SPARE[1:0]`. The stock
|
||||||
|
boot chain scrubs the upstream high-bit cookie before chain-loading lk2nd, so
|
||||||
|
this port's `check_hard_reboot_mode()` prefers bits `[1:0]` and its
|
||||||
|
`reboot_device()` writes the same low-bit cookie for `FASTBOOT_MODE`. That
|
||||||
|
keeps **Bootloader**, **EDL**, **Reboot**, **Recovery** and **Shutdown**
|
||||||
|
visible on the display-enabled image. Live verification: the menu appears
|
||||||
|
within 6 s, `fastboot oem screenshot` stages the 240x320 menu frame, and
|
||||||
|
`fastboot reboot-bootloader` returns to `lk2nd:version` instead of booting
|
||||||
|
Linux.
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
```sh
|
||||||
|
./scripts/build-lk2nd-beatles.sh # build normal + diagnostic + display + validate
|
||||||
|
./scripts/build-lk2nd-beatles.sh --check # validate the shipped images only
|
||||||
|
./scripts/build-lk2nd-beatles.sh --only normal|diagnostic|display
|
||||||
|
./scripts/build-lk2nd-beatles.sh --only normal --force-panel-init
|
||||||
|
WITH_DISPLAY=1 ./scripts/build-lk2nd-beatles.sh --only normal
|
||||||
|
```
|
||||||
|
|
||||||
|
Pins upstream commit `cf45aefd22d744b2bf9b39455afae697ce430063`, applies
|
||||||
|
`nokia-beatles.patch`, builds inside the rootless Docker toolchain image from
|
||||||
|
`Dockerfile` (`gcc-arm-none-eabi`, `dtc`, `libfdt`). All three images are
|
||||||
|
reproducible byte for byte. Overrides: `BANANARCHY_LK2ND_SRC`,
|
||||||
|
`BANANARCHY_LK2ND_BUILD_DIR`, `JOBS`.
|
||||||
|
|
||||||
|
## Validating
|
||||||
|
|
||||||
|
```sh
|
||||||
|
python3 scripts/check-lk2nd-beatles.py # boot header, QCDT, DTB, /cpus, stream
|
||||||
|
python3 scripts/check-lk2nd-beatles.py \
|
||||||
|
--image images/boot-lk2nd-nokia-beatles-display.img --expect-display 1
|
||||||
|
python3 scripts/test-lk2nd-beatles-port.py # all 3 images + host C parser unit test
|
||||||
|
```
|
||||||
|
|
||||||
|
The validator is pure Python (it parses the FDT itself) and enforces that
|
||||||
|
**every** QCDT DTB has `/cpus/cpu@2` and `/cpus/cpu@3` with a 4-byte
|
||||||
|
`device_type`, that both `0x14b` entries share one DTB, and that the 2720 DTB
|
||||||
|
carries the beatles node with a valid GC9305 v2 `lk2nd,panel-init` stream.
|
||||||
|
|
||||||
|
## Panel data provenance and limits
|
||||||
|
|
||||||
|
The v2 init stream comes from the 2720 downstream KaiOS 3.10
|
||||||
|
`arch/arm/boot/dts/qcom/spi-panel-gc9305-qvga-cmd.dtsi` as adapted by the
|
||||||
|
archived pmaports `linux-nokia-beatles` package. The other two panel names are
|
||||||
|
match-only nodes: aboot detects and initializes those sources itself and their
|
||||||
|
exact streams are not published. The 240x240 external cover display is a
|
||||||
|
separate SPI panel, untouched by lk2nd. The kernel `spi-mux` modules are
|
||||||
|
built and loaded, but the overlay remains hardware-gated until gpio13 and the
|
||||||
|
external reset/DC routing are validated.
|
||||||
|
|
||||||
|
SPI wiring matches downstream: `BLSP_QUP_BASE(1, 4)` is `spi@78b9000`
|
||||||
|
(BLSP1 QUP5 in 1-based numbering), DC GPIO 110.
|
||||||
|
|
||||||
|
## Normal flashing
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo ./flash-edl.sh nokia-beatles --backup-dir ./backup/nokia-beatles-2720 --verify
|
||||||
|
```
|
||||||
|
|
||||||
|
`flash-edl.py` writes the normal image to `boot` and the standalone mainline
|
||||||
|
`boot.img` to `recovery` (Volume Up fallback), and unlocks eMMC `devinfo` first.
|
||||||
|
A successful Bananarchy boot has not been observed yet.
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,53 @@
|
|||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
#ifndef LK2ND_SPI_PANEL_INIT_H
|
||||||
|
#define LK2ND_SPI_PANEL_INIT_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Walk a downstream qcom,mdss-spi-on-command byte stream.
|
||||||
|
*
|
||||||
|
* Every command is [wait_ms, dlen, payload[dlen]]. The first payload byte is
|
||||||
|
* the command (DC low), the rest are parameters (DC high), and wait_ms is
|
||||||
|
* applied after the command. This matches the KaiOS 3.10 mdss_spi_panel_on()
|
||||||
|
* implementation (struct spi_ctrl_hdr { char wait; char dlen; }).
|
||||||
|
*
|
||||||
|
* Returns 0 on success, a negative value on a malformed stream or a write
|
||||||
|
* error. The callbacks make this usable by both the target SPI driver and a
|
||||||
|
* host unit test.
|
||||||
|
*/
|
||||||
|
struct lk2nd_spi_panel_init_ops {
|
||||||
|
int (*write_cmd)(const unsigned char *cmd);
|
||||||
|
int (*write_data)(const unsigned char *data, unsigned int len);
|
||||||
|
void (*delay)(unsigned int ms);
|
||||||
|
};
|
||||||
|
|
||||||
|
static inline int lk2nd_spi_panel_init_run(const unsigned char *cmds,
|
||||||
|
unsigned int len, const struct lk2nd_spi_panel_init_ops *ops)
|
||||||
|
{
|
||||||
|
unsigned int off = 0, size;
|
||||||
|
unsigned char wait;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
while(off + 2 <= len) {
|
||||||
|
wait = cmds[off++];
|
||||||
|
size = cmds[off++];
|
||||||
|
if(!size || off + size > len)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
ret = ops->write_cmd(cmds + off);
|
||||||
|
if(ret)
|
||||||
|
return ret;
|
||||||
|
if(size > 1) {
|
||||||
|
ret = ops->write_data(cmds + off + 1, size - 1);
|
||||||
|
if(ret)
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
off += size;
|
||||||
|
if(wait)
|
||||||
|
ops->delay(wait);
|
||||||
|
}
|
||||||
|
|
||||||
|
return off == len ? 0 : -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* LK2ND_SPI_PANEL_INIT_H */
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
/* Host unit test for the lk2nd SPI panel init byte-stream walker. */
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "spi-panel-init.h"
|
||||||
|
#include "panel_streams.h"
|
||||||
|
|
||||||
|
static unsigned char cmds[64];
|
||||||
|
static unsigned char data[64][16];
|
||||||
|
static unsigned int data_len[64];
|
||||||
|
static unsigned int cmd_count, delay_total, delay_count;
|
||||||
|
static int fail_write;
|
||||||
|
|
||||||
|
static int rec_cmd(const unsigned char *cmd)
|
||||||
|
{
|
||||||
|
if(fail_write)
|
||||||
|
return -5;
|
||||||
|
if(cmd_count < 64)
|
||||||
|
cmds[cmd_count] = cmd[0];
|
||||||
|
cmd_count++;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int rec_data(const unsigned char *buf, unsigned int len)
|
||||||
|
{
|
||||||
|
if(fail_write)
|
||||||
|
return -5;
|
||||||
|
if(cmd_count > 0 && cmd_count <= 64 && len <= 16) {
|
||||||
|
memcpy(data[cmd_count - 1], buf, len);
|
||||||
|
data_len[cmd_count - 1] = len;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void rec_delay(unsigned int ms)
|
||||||
|
{
|
||||||
|
delay_total += ms;
|
||||||
|
delay_count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct lk2nd_spi_panel_init_ops ops = {
|
||||||
|
.write_cmd = rec_cmd,
|
||||||
|
.write_data = rec_data,
|
||||||
|
.delay = rec_delay,
|
||||||
|
};
|
||||||
|
|
||||||
|
static void reset(void)
|
||||||
|
{
|
||||||
|
cmd_count = delay_total = delay_count = 0;
|
||||||
|
fail_write = 0;
|
||||||
|
memset(cmds, 0, sizeof(cmds));
|
||||||
|
memset(data_len, 0, sizeof(data_len));
|
||||||
|
}
|
||||||
|
|
||||||
|
#define CHECK(cond, msg) do { \
|
||||||
|
if(!(cond)) { \
|
||||||
|
printf("[fail] %s (line %d)\n", (msg), __LINE__); \
|
||||||
|
return 1; \
|
||||||
|
} \
|
||||||
|
} while(0)
|
||||||
|
|
||||||
|
static int has_cmd(const unsigned char *cmd, unsigned int len)
|
||||||
|
{
|
||||||
|
unsigned int i;
|
||||||
|
for(i = 0; i < cmd_count; i++) {
|
||||||
|
if(cmds[i] != cmd[0])
|
||||||
|
continue;
|
||||||
|
if(len == 1)
|
||||||
|
return 1;
|
||||||
|
if(data_len[i] == len - 1 && memcmp(data[i], cmd + 1, len - 1) == 0)
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
static const unsigned char rgb565[] = {0x3a, 0x05};
|
||||||
|
static const unsigned char window_x[] = {0x2a, 0x00, 0x00, 0x00, 0xef};
|
||||||
|
static const unsigned char window_y[] = {0x2b, 0x00, 0x00, 0x01, 0x3f};
|
||||||
|
static const unsigned char zero_dlen[] = {0x00, 0x00};
|
||||||
|
static const unsigned char trailing[] = {0x00, 0x01, 0x29, 0x00};
|
||||||
|
static const unsigned char truncated[] = {0x00, 0x05, 0x2a, 0x00};
|
||||||
|
|
||||||
|
reset();
|
||||||
|
CHECK(lk2nd_spi_panel_init_run(stream_v2, sizeof(stream_v2), &ops) == 0,
|
||||||
|
"v2 stream rejected");
|
||||||
|
CHECK(cmd_count == 10, "v2 stream must have 10 commands");
|
||||||
|
CHECK(delay_total == 120 && delay_count == 1,
|
||||||
|
"v2 stream must wait 120 ms once after sleep-out");
|
||||||
|
CHECK(cmds[0] == 0xfe && cmds[1] == 0xef,
|
||||||
|
"v2 stream must start with the GC9305 page select");
|
||||||
|
CHECK(has_cmd(rgb565, sizeof(rgb565)), "missing RGB565 COLMOD");
|
||||||
|
CHECK(has_cmd(window_x, sizeof(window_x)), "missing 240 column window");
|
||||||
|
CHECK(has_cmd(window_y, sizeof(window_y)), "missing 320 row window");
|
||||||
|
CHECK(has_cmd((const unsigned char *)"\x11", 1), "missing sleep-out");
|
||||||
|
CHECK(has_cmd((const unsigned char *)"\x29", 1), "missing display-on");
|
||||||
|
CHECK(cmds[cmd_count - 1] == 0x2c, "stream must end with RAMWR (0x2c)");
|
||||||
|
|
||||||
|
reset();
|
||||||
|
CHECK(lk2nd_spi_panel_init_run(zero_dlen, sizeof(zero_dlen), &ops) < 0,
|
||||||
|
"zero dlen accepted");
|
||||||
|
reset();
|
||||||
|
CHECK(lk2nd_spi_panel_init_run(trailing, sizeof(trailing), &ops) < 0,
|
||||||
|
"trailing garbage accepted");
|
||||||
|
reset();
|
||||||
|
CHECK(lk2nd_spi_panel_init_run(truncated, sizeof(truncated), &ops) < 0,
|
||||||
|
"truncated payload accepted");
|
||||||
|
reset();
|
||||||
|
fail_write = 1;
|
||||||
|
CHECK(lk2nd_spi_panel_init_run(stream_v2, sizeof(stream_v2), &ops) == -5,
|
||||||
|
"write error not propagated");
|
||||||
|
|
||||||
|
printf("[ok] SPI panel init walker: GC9305 v2 stream, framing, RGB565, "
|
||||||
|
"240x320 window, delays and error handling\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -1,2 +1 @@
|
|||||||
earlycon
|
|
||||||
console=ttyMSM0,115200
|
console=ttyMSM0,115200
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
|
//
|
||||||
|
// Nokia 2720 Flip (nokia-beatles) external 240x240 GC9305 panel.
|
||||||
|
//
|
||||||
|
// Both the internal 240x320 panel and the external cover panel hang off the
|
||||||
|
// same BLSP1 QUP5 SPI lines; gpio13 selects which one the bus reaches. The
|
||||||
|
// spi-mux driver selects the mux state from the child chip-select number,
|
||||||
|
// so display@0 keeps the internal panel on state 0 and display@1 selects the
|
||||||
|
// external panel on state 1. panel-mipi-dbi-spi creates a second DRM device
|
||||||
|
// and DRM fbdev emulation exposes it as /dev/fb1 for bananarchy-cover-idle.
|
||||||
|
//
|
||||||
|
// The external child is named display@1, not cover@1: dtc keeps SPI children
|
||||||
|
// in lexical node-name order, so display@0 is registered before display@1.
|
||||||
|
// That keeps the 240x320 internal panel on /dev/fb0 for Xorg's fbdev config
|
||||||
|
// while the external panel gets /dev/fb1 for the idle cover renderer.
|
||||||
|
// The external panel has no dc-gpios property: mipi_dbi_spi_init() then uses
|
||||||
|
// MIPI DBI Type C Option 1 (9-bit SPI with the D/C bit as the ninth bit), so
|
||||||
|
// it does not fight panel-mipi-dbi-spi for the internal panel's gpio110/DC.
|
||||||
|
// Requires CONFIG_MULTIPLEXER, CONFIG_MUX_GPIO and CONFIG_SPI_MUX (all =m in
|
||||||
|
// patches/kernel/config-bananarchy-msm8909.armv7) plus
|
||||||
|
// /lib/firmware/nokia,beatles-gc9305-ext-panel.bin.
|
||||||
|
//
|
||||||
|
// This overlay is compile-checked but NOT applied to the shipping DTB.
|
||||||
|
// Live testing broke the main panel/keypad path, so the shipping DTS keeps
|
||||||
|
// the single internal panel and spidev@1 fallback until gpio13/reset/DC
|
||||||
|
// routing is validated on hardware.
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
/plugin/;
|
||||||
|
|
||||||
|
/ {
|
||||||
|
fragment@0 {
|
||||||
|
target-path = "/";
|
||||||
|
__overlay__ {
|
||||||
|
spi_panel_mux: spi-panel-mux {
|
||||||
|
compatible = "gpio-mux";
|
||||||
|
#mux-control-cells = <0>;
|
||||||
|
mux-gpios = <0x27 13 0>;
|
||||||
|
idle-state = <0>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fragment@1 {
|
||||||
|
target-path = "/soc@0/spi@78b9000";
|
||||||
|
__overlay__ {
|
||||||
|
spi-mux@0 {
|
||||||
|
compatible = "spi-mux";
|
||||||
|
reg = <0>;
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
spi-max-frequency = <50000000>;
|
||||||
|
mux-controls = <&spi_panel_mux>;
|
||||||
|
|
||||||
|
display@0 {
|
||||||
|
compatible = "nokia,beatles-gc9305-panel", "panel-mipi-dbi-spi";
|
||||||
|
reg = <0>;
|
||||||
|
spi-max-frequency = <50000000>;
|
||||||
|
reset-gpios = <0x27 25 0>;
|
||||||
|
dc-gpios = <0x27 110 0>;
|
||||||
|
backlight = <0x6b>;
|
||||||
|
power-supply = <0x6c>;
|
||||||
|
io-supply = <0x6d>;
|
||||||
|
width-mm = <36>;
|
||||||
|
height-mm = <48>;
|
||||||
|
pinctrl-0 = <0x6e>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
|
||||||
|
panel-timing {
|
||||||
|
hactive = <240>;
|
||||||
|
vactive = <320>;
|
||||||
|
hback-porch = <0>;
|
||||||
|
vback-porch = <0>;
|
||||||
|
hfront-porch = <0>;
|
||||||
|
vfront-porch = <0>;
|
||||||
|
hsync-len = <0>;
|
||||||
|
vsync-len = <0>;
|
||||||
|
clock-frequency = <0>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
display@1 {
|
||||||
|
compatible = "nokia,beatles-gc9305-ext-panel", "panel-mipi-dbi-spi";
|
||||||
|
reg = <1>;
|
||||||
|
spi-max-frequency = <50000000>;
|
||||||
|
reset-gpios = <0x27 23 0>;
|
||||||
|
power-supply = <0x6c>;
|
||||||
|
io-supply = <0x6d>;
|
||||||
|
width-mm = <30>;
|
||||||
|
height-mm = <30>;
|
||||||
|
pinctrl-0 = <0x92>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
write-only;
|
||||||
|
|
||||||
|
panel-timing {
|
||||||
|
hactive = <240>;
|
||||||
|
vactive = <240>;
|
||||||
|
hback-porch = <0>;
|
||||||
|
vback-porch = <0>;
|
||||||
|
hfront-porch = <0>;
|
||||||
|
vfront-porch = <0>;
|
||||||
|
hsync-len = <0>;
|
||||||
|
vsync-len = <0>;
|
||||||
|
clock-frequency = <0>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fragment@2 {
|
||||||
|
target-path = "/soc@0/spi@78b9000/display@0";
|
||||||
|
__overlay__ {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fragment@3 {
|
||||||
|
target-path = "/soc@0/spi@78b9000/spidev@1";
|
||||||
|
__overlay__ {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -27,8 +27,12 @@ deviceinfo_flash_pagesize="2048"
|
|||||||
deviceinfo_header_version="0"
|
deviceinfo_header_version="0"
|
||||||
deviceinfo_flash_offset_base="0x80000000"
|
deviceinfo_flash_offset_base="0x80000000"
|
||||||
deviceinfo_flash_offset_kernel="0x00008000"
|
deviceinfo_flash_offset_kernel="0x00008000"
|
||||||
deviceinfo_flash_offset_ramdisk="0x02700000"
|
# Stock 2720 Flip aboot load addresses (archived pmOS device-nokia-beatles
|
||||||
|
# deviceinfo), not the 8110 4G addresses. These only affect boot.img, used by
|
||||||
|
# the rooted-KaiOS "dd boot.img to recovery" fallback; lk2nd/extlinux EDL
|
||||||
|
# flashing loads vmlinuz + initramfs directly.
|
||||||
|
deviceinfo_flash_offset_ramdisk="0x01000000"
|
||||||
deviceinfo_flash_offset_second="0x00f00000"
|
deviceinfo_flash_offset_second="0x00f00000"
|
||||||
deviceinfo_flash_offset_tags="0x02500000"
|
deviceinfo_flash_offset_tags="0x00000100"
|
||||||
deviceinfo_flash_sparse="true"
|
deviceinfo_flash_sparse="true"
|
||||||
deviceinfo_partition_type="msdos"
|
deviceinfo_partition_type="msdos"
|
||||||
@@ -1,2 +1 @@
|
|||||||
earlycon
|
|
||||||
console=ttyMSM0,115200
|
console=ttyMSM0,115200
|
||||||
Binary file not shown.
@@ -0,0 +1,41 @@
|
|||||||
|
# Nokia 2720 Flip (nokia-beatles) 1.3-inch 240x240 external GC9305 panel.
|
||||||
|
#
|
||||||
|
# Derived from the KaiOS 3.10 downstream DTS in the archived postmarketOS
|
||||||
|
# linux-nokia-beatles package (0004-dts-adaptations.patch):
|
||||||
|
# spi_gc9305_v2_qvga_ext_cmd, qcom,mdss-spi-on-command:
|
||||||
|
# fe, ef, 3a 05, 35 00, 2a 00 00 00 ef, 2b 00 00 00 ef, 2c,
|
||||||
|
# delay 120, 11, 29, 2c
|
||||||
|
# qcom,mdss-spi-panel-width = 240, height = 240, bpp = 16.
|
||||||
|
#
|
||||||
|
# The register/gamma block below is the one already proven on this device's
|
||||||
|
# internal GC9305 panel (nokia,beatles-gc9305-panel.txt); the two column/page
|
||||||
|
# windows are set to 0..239 for the square cover panel. The blob is consumed
|
||||||
|
# by panel-mipi-dbi-spi (kernel) or by bananarchy-coverd's spidev backend.
|
||||||
|
#
|
||||||
|
# This init sequence is derived from vendor sources but has NOT yet been
|
||||||
|
# verified on 2720 Flip hardware; see NOKIA-2720-FLIP.md.
|
||||||
|
|
||||||
|
command 0xfe
|
||||||
|
command 0xef
|
||||||
|
command 0x36 0x00 # MADCTL
|
||||||
|
command 0x3a 0x55 # 65K 16-bit RGB565
|
||||||
|
command 0x35 0x00 # TE v-blanking
|
||||||
|
command 0xb2 0x0c 0x0c 0x00 0x33 0x33 # porch setting
|
||||||
|
command 0xb7 0x75 # gate control VGH/VGL
|
||||||
|
command 0xbb 0x34 # Vcoms
|
||||||
|
command 0xc0 0x2c # LCM control
|
||||||
|
command 0xc2 0x01 # VDV/VRH enable
|
||||||
|
command 0xc3 0x0d # VRH set
|
||||||
|
command 0xc4 0x20 # VDV set
|
||||||
|
command 0xc6 0xef # frame rate
|
||||||
|
command 0x44 0x00 0x00 # tearing scan line
|
||||||
|
command 0xd0 0xa4 0xa1 # power control 1
|
||||||
|
command 0xe0 0xd0 0x02 0x09 0x0d 0x0e 0x19 0x30 0x51 0x43 0x09 0x14 0x13 0x18 0x21
|
||||||
|
command 0xe1 0xd0 0x02 0x09 0x0d 0x0d 0x18 0x32 0x46 0x42 0x09 0x13 0x13 0x17 0x21
|
||||||
|
command 0x2a 0x00 0x00 0x00 0xef # column address 0..239
|
||||||
|
command 0x2b 0x00 0x00 0x00 0xef # page address 0..239
|
||||||
|
command 0x2c # memory write
|
||||||
|
command 0x11 # sleep out
|
||||||
|
delay 120
|
||||||
|
command 0x29 # display on
|
||||||
|
command 0x2c
|
||||||
Binary file not shown.
@@ -7,6 +7,9 @@
|
|||||||
model = "Nokia 2720 Flip";
|
model = "Nokia 2720 Flip";
|
||||||
compatible = "nokia,beatles", "nokia,argon", "qcom,msm8905", "qcom,msm8909";
|
compatible = "nokia,beatles", "nokia,argon", "qcom,msm8905", "qcom,msm8909";
|
||||||
chassis-type = "handset";
|
chassis-type = "handset";
|
||||||
|
qcom,msm-id = <0x14b 0x00>;
|
||||||
|
qcom,board-id = <0x1000b 0x100>;
|
||||||
|
qcom,pmic-id = <0x1000d 0x00 0x00 0x00>;
|
||||||
|
|
||||||
aliases {
|
aliases {
|
||||||
mmc0 = "/soc@0/sdhci@7824000";
|
mmc0 = "/soc@0/sdhci@7824000";
|
||||||
@@ -129,9 +132,7 @@
|
|||||||
|
|
||||||
cpu-opp-table {
|
cpu-opp-table {
|
||||||
compatible = "operating-points-v2-kryo-cpu", "operating-points-v2";
|
compatible = "operating-points-v2-kryo-cpu", "operating-points-v2";
|
||||||
/* Real DVFS latency: without this cpufreq-dt reports CPUFREQ_ETERNAL
|
clock-latency-ns = <0x186a0>;
|
||||||
* (UINT_MAX) and schedutil derives a ~6.44 s rate limit. */
|
|
||||||
clock-latency-ns = <100000>;
|
|
||||||
nvmem-cells = <0x0f>;
|
nvmem-cells = <0x0f>;
|
||||||
opp-shared;
|
opp-shared;
|
||||||
phandle = <0x05>;
|
phandle = <0x05>;
|
||||||
@@ -197,7 +198,7 @@
|
|||||||
|
|
||||||
memory@80000000 {
|
memory@80000000 {
|
||||||
device_type = "memory";
|
device_type = "memory";
|
||||||
reg = <0x80000000 0x00>;
|
reg = <0x80000000 0x20000000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
pmu {
|
pmu {
|
||||||
@@ -1016,7 +1017,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
matrix-keypad-col-default-state {
|
matrix-keypad-col-default-state {
|
||||||
pins = "gpio52", "gpio56", "gpio7", "gpio99", "gpio6";
|
pins = "gpio52", "gpio56", "gpio7", "gpio99", "gpio6", "gpio1";
|
||||||
function = "gpio";
|
function = "gpio";
|
||||||
drive-strength = <0x02>;
|
drive-strength = <0x02>;
|
||||||
bias-disable;
|
bias-disable;
|
||||||
@@ -1030,6 +1031,14 @@
|
|||||||
bias-pull-down;
|
bias-pull-down;
|
||||||
phandle = <0x6e>;
|
phandle = <0x6e>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
cover-panel-gpios-default-state {
|
||||||
|
pins = "gpio21", "gpio23", "gpio13";
|
||||||
|
function = "gpio";
|
||||||
|
drive-strength = <0x02>;
|
||||||
|
bias-pull-down;
|
||||||
|
phandle = <0x92>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
clock-controller@1800000 {
|
clock-controller@1800000 {
|
||||||
@@ -1056,57 +1065,62 @@
|
|||||||
phandle = <0x15>;
|
phandle = <0x15>;
|
||||||
};
|
};
|
||||||
|
|
||||||
gpu: gpu@1c00000 {
|
gpu@1c00000 {
|
||||||
compatible = "qcom,adreno-304.0", "qcom,adreno";
|
compatible = "qcom,adreno-304.0", "qcom,adreno";
|
||||||
reg = <0x01c00000 0x20000>;
|
reg = <0x1c00000 0x20000>;
|
||||||
reg-names = "kgsl_3d0_reg_memory";
|
reg-names = "kgsl_3d0_reg_memory";
|
||||||
interrupts = <0x00 33 0x04>;
|
interrupts = <0x00 0x21 0x04>;
|
||||||
interrupt-names = "kgsl_3d0_irq";
|
interrupt-names = "kgsl_3d0_irq";
|
||||||
clock-names = "core", "iface", "mem_iface", "alt_mem_iface", "gtcu_iface", "gfx3d";
|
clock-names = "core", "iface", "mem_iface", "alt_mem_iface", "gtcu_iface", "gfx3d";
|
||||||
clocks = <0x14 124>, <0x14 123>, <0x14 72>, <0x14 73>, <0x14 66>, <0x14 35>;
|
clocks = <0x14 0x7c 0x14 0x7b 0x14 0x48 0x14 0x49 0x14 0x42 0x14 0x23>;
|
||||||
power-domains = <0x14 1>;
|
power-domains = <0x14 0x01>;
|
||||||
operating-points-v2 = <&gpu_opp_table>;
|
operating-points-v2 = <0x8b>;
|
||||||
iommus = <&gpu_iommu 1>, <&gpu_iommu 2>;
|
iommus = <0x8c 0x01 0x8c 0x02>;
|
||||||
#cooling-cells = <2>;
|
#cooling-cells = <0x02>;
|
||||||
|
|
||||||
gpu_opp_table: opp-table {
|
opp-table {
|
||||||
compatible = "operating-points-v2";
|
compatible = "operating-points-v2";
|
||||||
|
phandle = <0x8b>;
|
||||||
|
|
||||||
opp-409600000 {
|
opp-409600000 {
|
||||||
opp-hz = /bits/ 64 <409600000>;
|
opp-hz = <0x00 0x186a0000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
opp-307200000 {
|
opp-307200000 {
|
||||||
opp-hz = /bits/ 64 <307200000>;
|
opp-hz = <0x00 0x124f8000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
opp-200000000 {
|
opp-200000000 {
|
||||||
opp-hz = /bits/ 64 <200000000>;
|
opp-hz = <0x00 0xbebc200>;
|
||||||
};
|
};
|
||||||
|
|
||||||
opp-19200000 {
|
opp-19200000 {
|
||||||
opp-hz = /bits/ 64 <19200000>;
|
opp-hz = <0x00 0x124f800>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
gpu_iommu: iommu@1f08000 {
|
iommu@1f08000 {
|
||||||
#address-cells = <1>;
|
#address-cells = <0x01>;
|
||||||
#size-cells = <1>;
|
#size-cells = <0x01>;
|
||||||
#iommu-cells = <1>;
|
#iommu-cells = <0x01>;
|
||||||
compatible = "qcom,msm8909-iommu", "qcom,msm8916-iommu", "qcom,msm-iommu-v1";
|
compatible = "qcom,msm8909-iommu", "qcom,msm8916-iommu", "qcom,msm-iommu-v1";
|
||||||
ranges = <0 0x01f08000 0x10000>;
|
ranges = <0x00 0x1f08000 0x10000>;
|
||||||
clocks = <0x14 69>, <0x14 65>, <0x14 64>;
|
clocks = <0x14 0x45 0x14 0x41 0x14 0x40>;
|
||||||
clock-names = "iface", "bus", "tbu";
|
clock-names = "iface", "bus", "tbu";
|
||||||
qcom,iommu-secure-id = <18>;
|
qcom,iommu-secure-id = <0x12>;
|
||||||
|
phandle = <0x8c>;
|
||||||
|
|
||||||
iommu-ctx@1000 {
|
iommu-ctx@1000 {
|
||||||
compatible = "qcom,msm-iommu-v1-ns";
|
compatible = "qcom,msm-iommu-v1-ns";
|
||||||
reg = <0x1000 0x1000>;
|
reg = <0x1000 0x1000>;
|
||||||
interrupts = <0x00 241 0x04>;
|
interrupts = <0x00 0xf1 0x04>;
|
||||||
};
|
};
|
||||||
|
|
||||||
iommu-ctx@2000 {
|
iommu-ctx@2000 {
|
||||||
compatible = "qcom,msm-iommu-v1-ns";
|
compatible = "qcom,msm-iommu-v1-ns";
|
||||||
reg = <0x2000 0x1000>;
|
reg = <0x2000 0x1000>;
|
||||||
interrupts = <0x00 242 0x04>;
|
interrupts = <0x00 0xf2 0x04>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1150,7 +1164,7 @@
|
|||||||
debounce = <0x3d09>;
|
debounce = <0x3d09>;
|
||||||
bias-pull-up;
|
bias-pull-up;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
linux,code = <0x6c>;
|
linux,code = <0x72>;
|
||||||
};
|
};
|
||||||
|
|
||||||
watchdog {
|
watchdog {
|
||||||
@@ -1863,6 +1877,13 @@
|
|||||||
clock-frequency = "", "#(";
|
clock-frequency = "", "#(";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
spidev@1 {
|
||||||
|
compatible = "rohm,dh2228fv";
|
||||||
|
reg = <0x01>;
|
||||||
|
spi-max-frequency = <0x2faf080>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
i2c@78ba000 {
|
i2c@78ba000 {
|
||||||
@@ -2287,30 +2308,31 @@
|
|||||||
pinctrl-0 = <0x86 0x87>;
|
pinctrl-0 = <0x86 0x87>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
|
|
||||||
key-up {
|
key-volup {
|
||||||
wakeup-source;
|
wakeup-source;
|
||||||
gpios = <0x27 0x5a 0x01>;
|
gpios = <0x27 0x5a 0x01>;
|
||||||
linux,code = <0x67>;
|
linux,code = <0x73>;
|
||||||
debounce-interval = <0x0f>;
|
debounce-interval = <0x0f>;
|
||||||
linux,can-disable;
|
linux,can-disable;
|
||||||
};
|
};
|
||||||
|
|
||||||
key-back {
|
key-end {
|
||||||
wakeup-source;
|
wakeup-source;
|
||||||
gpios = <0x27 0x62 0x01>;
|
gpios = <0x27 0x62 0x01>;
|
||||||
linux,code = <0x0e>;
|
linux,code = <0x74>;
|
||||||
debounce-interval = <0x0f>;
|
debounce-interval = <0x0f>;
|
||||||
linux,can-disable;
|
linux,can-disable;
|
||||||
};
|
};
|
||||||
|
|
||||||
switch-lid-close {
|
hall-lid-closed {
|
||||||
wakeup-source;
|
wakeup-source;
|
||||||
gpios = <0x27 0x5c 0x01>;
|
gpios = <0x27 0x5c 0x01>;
|
||||||
linux,input-type = <0x05>;
|
linux,input-type = <0x05>;
|
||||||
linux,code = <0x00>;
|
linux,code = <0x00>;
|
||||||
};
|
};
|
||||||
|
|
||||||
switch-lid-open {
|
hall-lid-open {
|
||||||
|
wakeup-source;
|
||||||
gpios = <0x27 0x24 0x01>;
|
gpios = <0x27 0x24 0x01>;
|
||||||
linux,input-type = <0x05>;
|
linux,input-type = <0x05>;
|
||||||
linux,code = <0x0a>;
|
linux,code = <0x0a>;
|
||||||
@@ -2325,8 +2347,8 @@
|
|||||||
pinctrl-0 = <0x88 0x89>;
|
pinctrl-0 = <0x88 0x89>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
row-gpios = <0x27 0x61 0x01 0x27 0x60 0x01 0x27 0x5f 0x01 0x27 0x5e 0x01>;
|
row-gpios = <0x27 0x61 0x01 0x27 0x60 0x01 0x27 0x5f 0x01 0x27 0x5e 0x01>;
|
||||||
col-gpios = <0x27 0x34 0x01 0x27 0x38 0x01 0x27 0x07 0x01 0x27 0x63 0x01 0x27 0x06 0x01>;
|
col-gpios = <0x27 0x34 0x01 0x27 0x38 0x01 0x27 0x07 0x01 0x27 0x63 0x01 0x27 0x06 0x01 0x27 0x01 0x01>;
|
||||||
linux,keymap = <0x1bd 0x10002 0x20005 0x30008 0x4020a 0x1000069 0x1010003 0x1020006 0x1030009 0x104000b 0x20002b8 0x2010004 0x2020007 0x203000a 0x204020b 0x300001c 0x301006a 0x30202b9>;
|
linux,keymap = <0x1bd 0x10002 0x20005 0x30008 0x4020a 0x500d4 0x1000069 0x1010003 0x1020006 0x1030009 0x104000b 0x105000e 0x200007f 0x2010004 0x2020007 0x203000a 0x204020b 0x300001c 0x301006a 0x302009e 0x3030067 0x304006c>;
|
||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
earlycon
|
|
||||||
console=ttyMSM0,115200
|
console=ttyMSM0,115200
|
||||||
@@ -1,2 +1 @@
|
|||||||
earlycon
|
|
||||||
console=ttyMSM0,115200
|
console=ttyMSM0,115200
|
||||||
+580
-33
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
@@ -39,6 +40,84 @@ DEVICE_LABELS = {
|
|||||||
"nokia-leo": "Nokia 6300 4G (nokia-leo)",
|
"nokia-leo": "Nokia 6300 4G (nokia-leo)",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Firehose programmers are signed for one root of trust, so the PBL rejects a
|
||||||
|
# mismatched one in Sahara. Never silently fall back to the 8110 programmer
|
||||||
|
# for a different target; --loader is the explicit escape hatch.
|
||||||
|
# Identities below were read from the attestation certificates embedded in
|
||||||
|
# each .mbn (see --list-loaders). 8k.mbn is signed Nokia_leo but covers both
|
||||||
|
# MSM8909 phones; 2720v.mbn is signed Nokia_bts_us, the 2720 Flip US variant.
|
||||||
|
DEVICE_LOADERS = {
|
||||||
|
"nokia-argon": "8110.mbn", # legacy generic MSM8905 programmer
|
||||||
|
"nokia-beatles": "2720.mbn", # Nokia_beatles
|
||||||
|
"nokia-tough": "800t.mbn", # Nokia_coconut
|
||||||
|
"nokia-sparkler": "8k.mbn", # Nokia_leo root, shared with 6300 4G
|
||||||
|
"nokia-leo": "8k.mbn", # Nokia_leo
|
||||||
|
}
|
||||||
|
|
||||||
|
DEVICE_LOADER_VARIANTS = {
|
||||||
|
"nokia-beatles": {"us": "2720v.mbn"}, # Nokia_bts_us, 2720 Flip US variant
|
||||||
|
}
|
||||||
|
|
||||||
|
DEVICE_LOADER_IDENTITIES = {
|
||||||
|
"nokia-argon": "",
|
||||||
|
"nokia-beatles": "Nokia_beatles",
|
||||||
|
"nokia-tough": "Nokia_coconut",
|
||||||
|
"nokia-sparkler": "Nokia_leo",
|
||||||
|
"nokia-leo": "Nokia_leo",
|
||||||
|
}
|
||||||
|
|
||||||
|
VARIANT_LOADER_IDENTITIES = {
|
||||||
|
("nokia-beatles", "us"): "Nokia_bts_us",
|
||||||
|
}
|
||||||
|
|
||||||
|
# A failed boot can leave the PBL in Sahara on 900e (QHSUSB_BULK) instead of
|
||||||
|
# the usual 9008 (QDLoader); 9006 is the diag/DLOAD variant. Probe all three
|
||||||
|
# so a power-cycle is not needed just because the PID changed.
|
||||||
|
EDL_PIDS = (0x9008, 0x900E, 0x9006)
|
||||||
|
|
||||||
|
# images/boot-lk2nd-nokia-beatles.img is built from upstream lk2nd source plus
|
||||||
|
# bootloader/lk2nd/nokia-beatles.patch (see bootloader/lk2nd/README.md). It has
|
||||||
|
# a dedicated QCDT DTB for the exact stock 2720 IDs (0x14b/0x1000b/0x100), a
|
||||||
|
# /lk2nd/nokia-beatles device node with the three GC9305 panel init streams,
|
||||||
|
# and cmdline lk2nd.compatible=nokia,beatles. aboot hands off to lk2nd, lk2nd
|
||||||
|
# brings up the 240x320 RGB565 main panel and boots Bananarchy from userdata
|
||||||
|
# via extlinux.conf. This is the default path on nokia-beatles.
|
||||||
|
BOOT_IMAGE_DEVICES = ("nokia-beatles",)
|
||||||
|
# Stock 2720 aboot has secure boot enabled and devinfo is locked. Writing a
|
||||||
|
# custom boot.img (lk2nd or mainline) is rejected unless devinfo.is_unlocked=1.
|
||||||
|
UNLOCK_DEFAULT_DEVICES = ("nokia-beatles",)
|
||||||
|
DEVINFO_MAGIC = b"ANDROID-BOOT!"
|
||||||
|
DEVINFO_UNLOCKED_OFFSET = 13
|
||||||
|
DEVINFO_TAMPERED_OFFSET = 14
|
||||||
|
# aboot reads is_allow_unlock from the last byte of the "config" partition.
|
||||||
|
# VB1 enables USE_RPMB_FOR_DEVINFO, so only "fastboot oem unlock-go" can write
|
||||||
|
# the authoritative RPMB devinfo; eMMC devinfo alone is not enough.
|
||||||
|
OEM_UNLOCK_PARTITIONS = ("config", "frp")
|
||||||
|
OEM_UNLOCK_FLAG_OFFSET = -1
|
||||||
|
# Rebuild the source port with scripts/build-lk2nd-beatles.sh after changing
|
||||||
|
# bootloader/lk2nd/nokia-beatles.patch; never binary-patch the prebuilt
|
||||||
|
# bootloader/lk2nd-msm8909.img.
|
||||||
|
BEATLES_LK2ND_IMAGE = "images/boot-lk2nd-nokia-beatles-display.img"
|
||||||
|
BOOT_METHOD_PARTITIONS = {
|
||||||
|
"lk2nd": "boot", # lk2nd image into boot
|
||||||
|
"boot": "boot", # raw Bananarchy boot.img into boot (normal power-on)
|
||||||
|
"recovery": "recovery", # boot.img into recovery (Volume Up)
|
||||||
|
"both": "boot", # boot.img into boot and recovery (covers either path)
|
||||||
|
}
|
||||||
|
BOOT_METHOD_TARGETS = {
|
||||||
|
"lk2nd": ("boot",),
|
||||||
|
"boot": ("boot",),
|
||||||
|
"recovery": ("recovery",),
|
||||||
|
"both": ("boot", "recovery"),
|
||||||
|
}
|
||||||
|
DIAG_PARTITIONS = (
|
||||||
|
"devinfo", "config", "misc", "frp", "aboot", "abootbak",
|
||||||
|
"sbl1", "sbl1bak", "tz", "tzbak", "rpm", "rpmbak",
|
||||||
|
"hyp", "hypbak", "sec", "keystore", "cmnlib", "cmnlib64",
|
||||||
|
"devcfg", "keymaster", "prov", "limits", "toolsfv", "logfs",
|
||||||
|
"dip", "mdtp", "cdt", "ddr", "sp", "uefivarstore",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def _fb_read_status(ep_in, timeout_ms=5000):
|
def _fb_read_status(ep_in, timeout_ms=5000):
|
||||||
while True:
|
while True:
|
||||||
@@ -174,11 +253,13 @@ def try_kick_into_edl():
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def wait_for_edl_usb(vid, pid, device_label, timeout_sec=0):
|
def wait_for_edl_usb(vid, pids, device_label, timeout_sec=0):
|
||||||
cdc = usb_class(vid=vid, pid=pid)
|
if isinstance(pids, int):
|
||||||
|
pids = (pids,)
|
||||||
|
pids = tuple(pids)
|
||||||
print(
|
print(
|
||||||
f"[*] Waiting for {device_label} in EDL mode "
|
"[*] Waiting for %s in EDL mode (USB %04x:%s Qualcomm Sahara/Firehose)..."
|
||||||
f"(USB {vid:04x}:{pid:04x} Qualcomm QDLoader 9008)..."
|
% (device_label, vid, "/".join("%04x" % pid for pid in pids))
|
||||||
)
|
)
|
||||||
print(" To enter EDL mode on the phone, use one of:")
|
print(" To enter EDL mode on the phone, use one of:")
|
||||||
print(" 1) From lk2nd Fastboot menu, select 'EDL' (or connect in Fastboot mode)")
|
print(" 1) From lk2nd Fastboot menu, select 'EDL' (or connect in Fastboot mode)")
|
||||||
@@ -190,23 +271,25 @@ def wait_for_edl_usb(vid, pid, device_label, timeout_sec=0):
|
|||||||
|
|
||||||
start_ts = time.time()
|
start_ts = time.time()
|
||||||
dots = 0
|
dots = 0
|
||||||
while not cdc.connected:
|
while True:
|
||||||
|
for pid in pids:
|
||||||
|
if usb.core.find(idVendor=vid, idProduct=pid) is None:
|
||||||
|
continue
|
||||||
|
cdc = usb_class(vid=vid, pid=pid)
|
||||||
try:
|
try:
|
||||||
cdc.connected = cdc.connect()
|
cdc.connected = cdc.connect()
|
||||||
except usb.core.USBError as exc:
|
except usb.core.USBError as exc:
|
||||||
if getattr(exc, "errno", None) == 13:
|
if getattr(exc, "errno", None) == 13:
|
||||||
print(
|
print(
|
||||||
"\n[!] Error: USB permission denied when opening 05c6:9008. "
|
"\n[!] Error: USB permission denied when opening 05c6:%04x. "
|
||||||
"Please run via sudo (e.g. sudo ./flash-edl.sh)."
|
"Please run via sudo (e.g. sudo ./flash-edl.sh)." % pid
|
||||||
)
|
)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
time.sleep(0.05)
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if cdc.connected:
|
if cdc.connected:
|
||||||
if dots > 0:
|
if dots > 0:
|
||||||
sys.stdout.write("\n")
|
sys.stdout.write("\n")
|
||||||
print("[+] USB EDL device connected.")
|
print("[+] USB EDL device connected (05c6:%04x)." % pid)
|
||||||
return cdc
|
return cdc
|
||||||
|
|
||||||
if timeout_sec > 0 and (time.time() - start_ts) >= timeout_sec:
|
if timeout_sec > 0 and (time.time() - start_ts) >= timeout_sec:
|
||||||
@@ -236,6 +319,33 @@ def find_partition(partentries, name):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def verify_partition(fh, lun, part, source_path):
|
||||||
|
"""Read back a written partition and compare its leading bytes.
|
||||||
|
|
||||||
|
Returns (ok, detail). A mismatch means the Sahara/Firehose session did not
|
||||||
|
actually commit the image, which is the usual cause of a phone that keeps
|
||||||
|
booting the stock image.
|
||||||
|
"""
|
||||||
|
size = os.path.getsize(source_path)
|
||||||
|
tmp_path = ""
|
||||||
|
try:
|
||||||
|
with tempfile.NamedTemporaryFile(prefix="verify-partition-",
|
||||||
|
delete=False) as tf:
|
||||||
|
tmp_path = tf.name
|
||||||
|
res = fh.cmd_read(lun, part.sector, part.sectors, tmp_path, Display=False)
|
||||||
|
if res == "" or not os.path.exists(tmp_path):
|
||||||
|
return False, "read-back failed"
|
||||||
|
with open(source_path, "rb") as src, open(tmp_path, "rb") as got:
|
||||||
|
if src.read(size) != got.read(size):
|
||||||
|
return False, "read-back differs from the source image"
|
||||||
|
return True, "read-back matches"
|
||||||
|
except Exception as exc: # noqa: BLE001 - report the USB/Firehose error
|
||||||
|
return False, "read-back error: %s" % exc
|
||||||
|
finally:
|
||||||
|
if tmp_path and os.path.exists(tmp_path):
|
||||||
|
os.unlink(tmp_path)
|
||||||
|
|
||||||
|
|
||||||
def write_partition(fh, lun, part, filepath):
|
def write_partition(fh, lun, part, filepath):
|
||||||
size = os.stat(filepath).st_size
|
size = os.stat(filepath).st_size
|
||||||
sector_size = fh.cfg.SECTOR_SIZE_IN_BYTES
|
sector_size = fh.cfg.SECTOR_SIZE_IN_BYTES
|
||||||
@@ -277,14 +387,170 @@ def dump_partition(fh, lun, part, filepath):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def resolve_default_loader():
|
def dump_diagnostics(fh, lun, partentries, backup_dir):
|
||||||
|
"""Copy small bootloader/config partitions for offline secure-boot analysis."""
|
||||||
|
os.makedirs(backup_dir, exist_ok=True)
|
||||||
|
max_sectors = 4096
|
||||||
|
for pname in DIAG_PARTITIONS:
|
||||||
|
part = find_partition(partentries, pname)
|
||||||
|
if not part:
|
||||||
|
continue
|
||||||
|
sectors = min(part.sectors, max_sectors)
|
||||||
|
dest = os.path.join(backup_dir, f"diag-{pname}.img")
|
||||||
|
print(f"[*] Diagnostic read '{pname}' ({sectors} sectors) -> {dest}...")
|
||||||
|
res = fh.cmd_read(lun, part.sector, sectors, dest, Display=False)
|
||||||
|
if res == "" or not os.path.isfile(dest) or os.stat(dest).st_size == 0:
|
||||||
|
print(f"[!] Warning: diagnostic read of '{pname}' failed.")
|
||||||
|
else:
|
||||||
|
print(f"[+] Saved diagnostic: {dest}")
|
||||||
|
|
||||||
|
|
||||||
|
def unlock_devinfo(fh, lun, partentries, backup_dir, device):
|
||||||
|
"""Set devinfo.is_unlocked=1 so aboot skips signed-boot verification."""
|
||||||
|
part = find_partition(partentries, "devinfo")
|
||||||
|
if not part:
|
||||||
|
print("[!] Warning: 'devinfo' partition not found; cannot unlock bootloader.")
|
||||||
|
return False
|
||||||
|
os.makedirs(backup_dir, exist_ok=True)
|
||||||
|
locked_backup = os.path.join(backup_dir, f"devinfo-locked-{device}.img")
|
||||||
|
tmp_path = ""
|
||||||
|
try:
|
||||||
|
with tempfile.NamedTemporaryFile(prefix="devinfo-", delete=False) as tf:
|
||||||
|
tmp_path = tf.name
|
||||||
|
res = fh.cmd_read(lun, part.sector, part.sectors, tmp_path, Display=False)
|
||||||
|
if res == "" or not os.path.exists(tmp_path) or os.stat(tmp_path).st_size == 0:
|
||||||
|
print("[!] Error: failed to read 'devinfo' for unlocking.")
|
||||||
|
return False
|
||||||
|
data = bytearray(open(tmp_path, "rb").read())
|
||||||
|
if bytes(data[:len(DEVINFO_MAGIC)]) != DEVINFO_MAGIC:
|
||||||
|
print("[!] Error: 'devinfo' magic mismatch; refusing to modify it.")
|
||||||
|
return False
|
||||||
|
with open(locked_backup, "wb") as handle:
|
||||||
|
handle.write(data)
|
||||||
|
print(f"[+] Saved locked devinfo backup: {locked_backup}")
|
||||||
|
data[DEVINFO_UNLOCKED_OFFSET] = 1
|
||||||
|
data[DEVINFO_TAMPERED_OFFSET] = 0
|
||||||
|
with open(tmp_path, "wb") as handle:
|
||||||
|
handle.write(data)
|
||||||
|
print("[*] Setting devinfo: is_unlocked=1, is_tampered=0 ...")
|
||||||
|
if not fh.cmd_write(lun, part.sector, tmp_path, Display=True):
|
||||||
|
print("[!] Error: failed to write unlocked devinfo.")
|
||||||
|
return False
|
||||||
|
print("[+] Bootloader unlock flag written to 'devinfo'.")
|
||||||
|
return True
|
||||||
|
except Exception as exc: # noqa: BLE001 - report Firehose error
|
||||||
|
print(f"[!] Error unlocking devinfo: {exc}")
|
||||||
|
return False
|
||||||
|
finally:
|
||||||
|
if tmp_path and os.path.exists(tmp_path):
|
||||||
|
os.unlink(tmp_path)
|
||||||
|
|
||||||
|
|
||||||
|
def enable_oem_unlock(fh, lun, partentries, backup_dir, device):
|
||||||
|
"""Set the last byte of config/frp so aboot allows 'oem unlock-go'."""
|
||||||
|
part = None
|
||||||
|
for name in OEM_UNLOCK_PARTITIONS:
|
||||||
|
part = find_partition(partentries, name)
|
||||||
|
if part:
|
||||||
|
break
|
||||||
|
if not part:
|
||||||
|
print("[!] Warning: neither 'config' nor 'frp' partition found; "
|
||||||
|
"cannot enable OEM unlock.")
|
||||||
|
return False
|
||||||
|
os.makedirs(backup_dir, exist_ok=True)
|
||||||
|
backup = os.path.join(backup_dir, f"{part.name}-locked-{device}.img")
|
||||||
|
tmp_path = ""
|
||||||
|
try:
|
||||||
|
with tempfile.NamedTemporaryFile(prefix="oem-unlock-", delete=False) as tf:
|
||||||
|
tmp_path = tf.name
|
||||||
|
res = fh.cmd_read(lun, part.sector, part.sectors, tmp_path, Display=False)
|
||||||
|
if res == "" or not os.path.exists(tmp_path) or os.stat(tmp_path).st_size == 0:
|
||||||
|
print(f"[!] Error: failed to read '{part.name}' for OEM unlock.")
|
||||||
|
return False
|
||||||
|
data = bytearray(open(tmp_path, "rb").read())
|
||||||
|
with open(backup, "wb") as handle:
|
||||||
|
handle.write(data)
|
||||||
|
print(f"[+] Saved original {part.name} backup: {backup}")
|
||||||
|
data[OEM_UNLOCK_FLAG_OFFSET] |= 1
|
||||||
|
with open(tmp_path, "wb") as handle:
|
||||||
|
handle.write(data)
|
||||||
|
print(f"[*] Enabling OEM unlock in '{part.name}' (last byte |= 1)...")
|
||||||
|
if not fh.cmd_write(lun, part.sector, tmp_path, Display=True):
|
||||||
|
print(f"[!] Error: failed to write '{part.name}'.")
|
||||||
|
return False
|
||||||
|
# Read back and confirm the flag persisted.
|
||||||
|
res = fh.cmd_read(lun, part.sector, part.sectors, tmp_path, Display=False)
|
||||||
|
if res == "" or not os.path.exists(tmp_path):
|
||||||
|
print(f"[!] Warning: could not read back '{part.name}'.")
|
||||||
|
elif not (open(tmp_path, "rb").read()[OEM_UNLOCK_FLAG_OFFSET] & 1):
|
||||||
|
print(f"[!] Error: OEM unlock flag did not persist in '{part.name}'.")
|
||||||
|
return False
|
||||||
|
print(f"[+] OEM unlock enabled in '{part.name}'.")
|
||||||
|
return True
|
||||||
|
except Exception as exc: # noqa: BLE001
|
||||||
|
print(f"[!] Error enabling OEM unlock: {exc}")
|
||||||
|
return False
|
||||||
|
finally:
|
||||||
|
if tmp_path and os.path.exists(tmp_path):
|
||||||
|
os.unlink(tmp_path)
|
||||||
|
|
||||||
|
|
||||||
|
def loader_identity(path):
|
||||||
|
"""Return the Nokia_<codename> attestation name embedded in an .mbn."""
|
||||||
|
try:
|
||||||
|
with open(path, "rb") as handle:
|
||||||
|
data = handle.read(1024 * 1024)
|
||||||
|
except OSError:
|
||||||
|
return ""
|
||||||
|
match = re.search(rb"Nokia_[A-Za-z0-9_]+", data)
|
||||||
|
return match.group(0).decode("ascii", "replace") if match else ""
|
||||||
|
|
||||||
|
|
||||||
|
def available_loaders():
|
||||||
|
loaders_dir = os.path.join(BASE_DIR, "bootloader", "loaders")
|
||||||
|
if not os.path.isdir(loaders_dir):
|
||||||
|
return []
|
||||||
|
return sorted(
|
||||||
|
name for name in os.listdir(loaders_dir)
|
||||||
|
if name.lower().endswith(".mbn")
|
||||||
|
and os.path.isfile(os.path.join(loaders_dir, name))
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def list_loaders():
|
||||||
|
loaders_dir = os.path.join(BASE_DIR, "bootloader", "loaders")
|
||||||
|
names = available_loaders()
|
||||||
|
print("Firehose programmers in %s:" % loaders_dir)
|
||||||
|
if not names:
|
||||||
|
print(" (none found)")
|
||||||
|
for name in names:
|
||||||
|
path = os.path.join(loaders_dir, name)
|
||||||
|
ident = loader_identity(path) or "no embedded Nokia identity"
|
||||||
|
users = [dev for dev, fn in DEVICE_LOADERS.items() if fn == name]
|
||||||
|
for dev, variants in DEVICE_LOADER_VARIANTS.items():
|
||||||
|
for variant, fn in variants.items():
|
||||||
|
if fn == name:
|
||||||
|
users.append("%s --variant %s" % (dev, variant))
|
||||||
|
note = "-> " + ", ".join(users) if users else "(unused: select with --loader)"
|
||||||
|
print(" %-12s %9d bytes %-22s %s" % (
|
||||||
|
name, os.path.getsize(path), ident, note))
|
||||||
|
print("\nThe device default is chosen by --device / the positional target.")
|
||||||
|
print("Use --variant us for a 2720 Flip US (Nokia_bts_us) device.")
|
||||||
|
print("Use --loader PATH to select any programmer explicitly.")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
def resolve_default_loader(device="nokia-argon", variant=""):
|
||||||
|
name = DEVICE_LOADERS.get(device, "8110.mbn")
|
||||||
|
if variant:
|
||||||
|
name = DEVICE_LOADER_VARIANTS.get(device, {}).get(variant, name)
|
||||||
for cand in [
|
for cand in [
|
||||||
os.path.join(BASE_DIR, "bootloader", "loaders", "8110.mbn"),
|
os.path.join(BASE_DIR, "bootloader", "loaders", name),
|
||||||
os.path.join(BASE_DIR, "8110.mbn"),
|
os.path.join(BASE_DIR, name),
|
||||||
]:
|
]:
|
||||||
if os.path.isfile(cand):
|
if os.path.isfile(cand):
|
||||||
return cand
|
return cand
|
||||||
return os.path.join(BASE_DIR, "bootloader", "loaders", "8110.mbn")
|
return os.path.join(BASE_DIR, "bootloader", "loaders", name)
|
||||||
|
|
||||||
|
|
||||||
def resolve_default_bootloader():
|
def resolve_default_bootloader():
|
||||||
@@ -301,6 +567,37 @@ def resolve_default_image(device):
|
|||||||
return os.path.join(BASE_DIR, "images", f"bananarchy-{device}.img")
|
return os.path.join(BASE_DIR, "images", f"bananarchy-{device}.img")
|
||||||
|
|
||||||
|
|
||||||
|
def resolve_wipe_system(method, no_wipe, wipe):
|
||||||
|
"""Zero the stock system superblock by default for every method.
|
||||||
|
|
||||||
|
This is the original Bananarchy behavior: the stock KaiOS system must not
|
||||||
|
be mountable when the phone is re-purposed. --no-wipe-system is the opt-out.
|
||||||
|
"""
|
||||||
|
if no_wipe:
|
||||||
|
return False
|
||||||
|
if wipe:
|
||||||
|
return True
|
||||||
|
return method in BOOT_METHOD_PARTITIONS
|
||||||
|
|
||||||
|
|
||||||
|
def resolve_boot_method(device, explicit=""):
|
||||||
|
if explicit:
|
||||||
|
return explicit
|
||||||
|
# lk2nd is the Android boot.img for every target. On the 2720 the
|
||||||
|
# source-built port has a dedicated QCDT DTB for the exact stock
|
||||||
|
# 0x14b/0x1000b/0x100 entry, so aboot accepts it, lk2nd initializes the
|
||||||
|
# GC9305 main panel and boots Bananarchy from userdata via extlinux.
|
||||||
|
return "lk2nd"
|
||||||
|
|
||||||
|
|
||||||
|
def resolve_recovery_image(device):
|
||||||
|
return os.path.join(BASE_DIR, "images", f"boot-bananarchy-{device}.img")
|
||||||
|
|
||||||
|
|
||||||
|
def resolve_beatles_lk2nd_image():
|
||||||
|
return os.path.join(BASE_DIR, BEATLES_LK2ND_IMAGE)
|
||||||
|
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="Automated EDL Flasher for Bananarchy Linux (MSM8909 / Sxmo)"
|
description="Automated EDL Flasher for Bananarchy Linux (MSM8909 / Sxmo)"
|
||||||
@@ -343,8 +640,41 @@ def parse_args():
|
|||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--loader",
|
"--loader",
|
||||||
default=resolve_default_loader(),
|
default=None,
|
||||||
help="Path to Firehose programmer (.mbn)",
|
help="Path to Firehose programmer (.mbn); default: device-specific loader",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--list-loaders",
|
||||||
|
action="store_true",
|
||||||
|
help="List available Firehose programmers and their device mapping, then exit",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--method",
|
||||||
|
choices=["lk2nd", "boot", "recovery", "both"],
|
||||||
|
default="",
|
||||||
|
help="Boot method (default: lk2nd for all targets). On nokia-beatles "
|
||||||
|
"lk2nd is written to boot and recovery; both writes the mainline "
|
||||||
|
"boot.img to both slots; recovery needs Volume Up",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--boot-image",
|
||||||
|
default="",
|
||||||
|
help="Standalone Android boot.img for recovery flashing "
|
||||||
|
"(default: images/boot-bananarchy-<device>.img)",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--lk2nd-image",
|
||||||
|
default="",
|
||||||
|
help="Override the nokia-beatles lk2nd boot.img written to 'boot' "
|
||||||
|
"(e.g. images/boot-lk2nd-nokia-beatles-diagnostic.img for the "
|
||||||
|
"forced-fastboot/on-screen-log diagnostic build)",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--variant",
|
||||||
|
choices=["us"],
|
||||||
|
default="",
|
||||||
|
help="Hardware variant: 'us' selects the Nokia_bts_us programmer "
|
||||||
|
"(2720v.mbn) for the 2720 Flip US variant",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--backup-dir",
|
"--backup-dir",
|
||||||
@@ -369,7 +699,51 @@ def parse_args():
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--no-wipe-system",
|
"--no-wipe-system",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
help="Do not zero the stock system partition superblock",
|
help="Keep the stock system superblock intact (opt-out of the default wipe)",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--verify",
|
||||||
|
action="store_true",
|
||||||
|
help="Read back the flashed boot/recovery partition and compare it "
|
||||||
|
"(diagnoses a flash that never committed)",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--dump-diagnostics",
|
||||||
|
action="store_true",
|
||||||
|
help="Before flashing, read small bootloader/config partitions into "
|
||||||
|
"backup/diag-*.img (helps diagnose secure boot / aboot state)",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--unlock-bootloader",
|
||||||
|
action="store_true",
|
||||||
|
help="Set devinfo.is_unlocked=1 (default on nokia-beatles; needed for "
|
||||||
|
"the locked stock aboot to accept an unsigned boot.img)",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--no-unlock-bootloader",
|
||||||
|
action="store_true",
|
||||||
|
help="Leave devinfo untouched (custom boot.img will likely be rejected)",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--enable-oem-unlock",
|
||||||
|
action="store_true",
|
||||||
|
help="Patch config/frp allow-unlock flag (default on nokia-beatles). "
|
||||||
|
"Required before 'fastboot oem unlock-go' can write RPMB devinfo",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--no-enable-oem-unlock",
|
||||||
|
action="store_true",
|
||||||
|
help="Do not patch the config/frp allow-unlock flag",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--only-unlock",
|
||||||
|
action="store_true",
|
||||||
|
help="Only patch eMMC devinfo and config/frp and exit without flashing",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--wipe-system",
|
||||||
|
action="store_true",
|
||||||
|
help="Zero the stock system superblock (already the default; kept for compatibility)",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--no-reset",
|
"--no-reset",
|
||||||
@@ -389,8 +763,8 @@ def parse_args():
|
|||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--pid",
|
"--pid",
|
||||||
default="0x9008",
|
default="",
|
||||||
help="USB Product ID (default: 0x9008)",
|
help="USB Product ID (default: auto-detect 05c6:9008, 900e or 9006)",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--lun",
|
"--lun",
|
||||||
@@ -403,23 +777,64 @@ def parse_args():
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
args = parse_args()
|
args = parse_args()
|
||||||
|
if args.list_loaders:
|
||||||
|
return list_loaders()
|
||||||
device = args.device_pos if args.device_pos and args.device_pos != "sxmo" else args.device
|
device = args.device_pos if args.device_pos and args.device_pos != "sxmo" else args.device
|
||||||
device_label = DEVICE_LABELS.get(device, device)
|
device_label = DEVICE_LABELS.get(device, device)
|
||||||
|
method = resolve_boot_method(device, args.method)
|
||||||
|
boot_img = os.path.abspath(args.boot_image or resolve_recovery_image(device))
|
||||||
userdata_img = (
|
userdata_img = (
|
||||||
os.path.abspath(args.image)
|
os.path.abspath(args.image)
|
||||||
if args.image
|
if args.image
|
||||||
else os.path.abspath(resolve_default_image(device))
|
else os.path.abspath(resolve_default_image(device))
|
||||||
)
|
)
|
||||||
bootloader_img = os.path.abspath(args.bootloader)
|
bootloader_img = os.path.abspath(args.bootloader)
|
||||||
loader_mbn = os.path.abspath(args.loader)
|
beatles_lk2nd_img = os.path.abspath(args.lk2nd_image or resolve_beatles_lk2nd_image())
|
||||||
|
mainline_img = boot_img
|
||||||
|
loader_mbn = os.path.abspath(
|
||||||
|
args.loader or resolve_default_loader(device, args.variant))
|
||||||
backup_dir = os.path.abspath(args.backup_dir)
|
backup_dir = os.path.abspath(args.backup_dir)
|
||||||
|
unlock_bootloader = (
|
||||||
|
not args.no_unlock_bootloader
|
||||||
|
and (args.unlock_bootloader or device in UNLOCK_DEFAULT_DEVICES)
|
||||||
|
)
|
||||||
|
oem_unlock_enabled = (
|
||||||
|
not args.no_enable_oem_unlock
|
||||||
|
and (args.enable_oem_unlock or device in UNLOCK_DEFAULT_DEVICES)
|
||||||
|
)
|
||||||
|
|
||||||
print("============================================================")
|
print("============================================================")
|
||||||
print(" Bananarchy Linux (MSM8909 / Sxmo) Automated EDL Flasher")
|
print(" Bananarchy Linux (MSM8909 / Sxmo) Automated EDL Flasher")
|
||||||
print("============================================================")
|
print("============================================================")
|
||||||
print(f" Target Device : {device_label}")
|
print(f" Target Device : {device_label}")
|
||||||
print(f" Target UI : Sxmo (240x320 native, Multi-Mode T9)")
|
print(f" Target UI : Sxmo (240x320 native, Multi-Mode T9)")
|
||||||
|
print(f" Target Variant : {args.variant or 'default'}")
|
||||||
|
print(f" Boot Method : {method}")
|
||||||
|
wipe_system = resolve_wipe_system(
|
||||||
|
method, args.no_wipe_system, args.wipe_system)
|
||||||
|
print(f" Wipe System : {'yes' if wipe_system else 'no (--no-wipe-system)'}")
|
||||||
|
print(f" Verify Writes : {'yes' if args.verify else 'no (--verify to enable)'}")
|
||||||
|
print(f" Unlock Bootloader: {'yes (devinfo)' if unlock_bootloader else 'no'}")
|
||||||
|
print(f" Enable OEM Unlock: {'yes (config/frp)' if oem_unlock_enabled else 'no'}")
|
||||||
|
if args.only_unlock:
|
||||||
|
print(" Mode : prepare unlock only (no images flashed)")
|
||||||
|
if method in ("boot", "recovery", "both"):
|
||||||
|
print(f" Boot Image : {boot_img}")
|
||||||
print(f" Firehose Loader : {loader_mbn}")
|
print(f" Firehose Loader : {loader_mbn}")
|
||||||
|
if os.path.isfile(loader_mbn) and os.path.getsize(loader_mbn) > 0:
|
||||||
|
ident = loader_identity(loader_mbn)
|
||||||
|
if ident:
|
||||||
|
print(f" Firehose ID : {ident}")
|
||||||
|
expected = VARIANT_LOADER_IDENTITIES.get(
|
||||||
|
(device, args.variant), DEVICE_LOADER_IDENTITIES.get(device, ""))
|
||||||
|
if expected and ident and ident != expected:
|
||||||
|
print(
|
||||||
|
"[!] Warning: %s is signed for %s, expected %s for %s. "
|
||||||
|
"Verify on hardware or pass --loader." % (
|
||||||
|
os.path.basename(loader_mbn), ident, expected, device))
|
||||||
|
if method == "lk2nd" and device == "nokia-beatles":
|
||||||
|
print(f" LK2ND (boot) : {beatles_lk2nd_img} (nokia-beatles source port)")
|
||||||
|
print(f" Boot Image (rec) : {mainline_img}")
|
||||||
print(f" Bootloader (boot): {bootloader_img}")
|
print(f" Bootloader (boot): {bootloader_img}")
|
||||||
print(f" System (userdata): {userdata_img}")
|
print(f" System (userdata): {userdata_img}")
|
||||||
print(
|
print(
|
||||||
@@ -428,18 +843,34 @@ def main():
|
|||||||
)
|
)
|
||||||
print("============================================================")
|
print("============================================================")
|
||||||
|
|
||||||
for label, path in [
|
if not os.path.isfile(loader_mbn) or os.path.getsize(loader_mbn) == 0:
|
||||||
|
print("[!] Error: Firehose programmer for %s not found or empty at: %s" % (
|
||||||
|
device, loader_mbn))
|
||||||
|
print(" Expected %s; available: %s" % (
|
||||||
|
os.path.basename(loader_mbn),
|
||||||
|
", ".join(available_loaders()) or "none"))
|
||||||
|
print(" Run './flash-edl.sh --list-loaders' or pass --loader PATH.")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
required_files = [
|
||||||
("Firehose programmer", loader_mbn),
|
("Firehose programmer", loader_mbn),
|
||||||
("lk2nd bootloader image", bootloader_img),
|
|
||||||
("System userdata image", userdata_img),
|
("System userdata image", userdata_img),
|
||||||
]:
|
]
|
||||||
|
if method in ("boot", "recovery", "both"):
|
||||||
|
required_files.append(("Boot image", boot_img))
|
||||||
|
else:
|
||||||
|
required_files.append(("lk2nd bootloader image", bootloader_img))
|
||||||
|
if method == "lk2nd" and device == "nokia-beatles":
|
||||||
|
required_files.append(("nokia-beatles lk2nd image", beatles_lk2nd_img))
|
||||||
|
required_files.append(("Recovery boot image", mainline_img))
|
||||||
|
for label, path in required_files:
|
||||||
if not os.path.isfile(path) or os.stat(path).st_size == 0:
|
if not os.path.isfile(path) or os.stat(path).st_size == 0:
|
||||||
print(f"[!] Error: {label} not found or empty at: {path}")
|
print(f"[!] Error: {label} not found or empty at: {path}")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
vid = int(args.vid, 16)
|
vid = int(args.vid, 16)
|
||||||
pid = int(args.pid, 16)
|
pids = [int(args.pid, 16)] if args.pid else list(EDL_PIDS)
|
||||||
cdc = wait_for_edl_usb(vid, pid, device_label, timeout_sec=args.timeout)
|
cdc = wait_for_edl_usb(vid, pids, device_label, timeout_sec=args.timeout)
|
||||||
|
|
||||||
sahara = qualcomm_sahara(cdc)
|
sahara = qualcomm_sahara(cdc)
|
||||||
with open(loader_mbn, "rb") as rf:
|
with open(loader_mbn, "rb") as rf:
|
||||||
@@ -497,16 +928,42 @@ def main():
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
boot_part = find_partition(guid_gpt.partentries, "boot")
|
boot_part = find_partition(guid_gpt.partentries, "boot")
|
||||||
|
recovery_part = find_partition(guid_gpt.partentries, "recovery")
|
||||||
userdata_part = find_partition(guid_gpt.partentries, "userdata")
|
userdata_part = find_partition(guid_gpt.partentries, "userdata")
|
||||||
system_part = find_partition(guid_gpt.partentries, "system")
|
system_part = find_partition(guid_gpt.partentries, "system")
|
||||||
|
|
||||||
if not boot_part:
|
target_names = BOOT_METHOD_TARGETS[method]
|
||||||
print("[!] Error: Partition 'boot' not found in device GPT.")
|
if method == "lk2nd" and device == "nokia-beatles":
|
||||||
|
# Match the 8110/Argon shape: lk2nd in boot, mainline boot.img in
|
||||||
|
# recovery (Volume Up fallback). Also refresh the separate 512 KiB
|
||||||
|
# lk2nd partition so "Reboot to bootloader" cannot chain-load a stale
|
||||||
|
# image without the visible menu.
|
||||||
|
target_names = ("boot", "recovery", "lk2nd")
|
||||||
|
target_parts = []
|
||||||
|
for name in target_names:
|
||||||
|
part = find_partition(guid_gpt.partentries, name)
|
||||||
|
if not part:
|
||||||
|
if name == "lk2nd" and method == "lk2nd" and device == "nokia-beatles":
|
||||||
|
print(f"[!] Warning: optional partition '{name}' not found; skipping.")
|
||||||
|
continue
|
||||||
|
print(f"[!] Error: Partition '{name}' not found in device GPT.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
target_parts.append((name, part))
|
||||||
|
|
||||||
|
def source_for(name):
|
||||||
|
if method == "lk2nd" and device == "nokia-beatles":
|
||||||
|
if name in ("boot", "lk2nd"):
|
||||||
|
return beatles_lk2nd_img
|
||||||
|
return mainline_img
|
||||||
|
if method == "lk2nd":
|
||||||
|
return bootloader_img
|
||||||
|
return boot_img
|
||||||
|
|
||||||
if not userdata_part:
|
if not userdata_part:
|
||||||
print("[!] Error: Partition 'userdata' not found in device GPT.")
|
print("[!] Error: Partition 'userdata' not found in device GPT.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
if boot_part:
|
||||||
print(
|
print(
|
||||||
f"[+] Found 'boot' : sector {boot_part.sector}, "
|
f"[+] Found 'boot' : sector {boot_part.sector}, "
|
||||||
f"{boot_part.sectors} sectors "
|
f"{boot_part.sectors} sectors "
|
||||||
@@ -518,6 +975,50 @@ def main():
|
|||||||
f"({(userdata_part.sectors * fh.cfg.SECTOR_SIZE_IN_BYTES) / (1024 * 1024):.1f} MiB)"
|
f"({(userdata_part.sectors * fh.cfg.SECTOR_SIZE_IN_BYTES) / (1024 * 1024):.1f} MiB)"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if args.dump_diagnostics:
|
||||||
|
dump_diagnostics(fh, args.lun, guid_gpt.partentries, backup_dir)
|
||||||
|
|
||||||
|
if args.only_unlock:
|
||||||
|
ok = True
|
||||||
|
if unlock_bootloader:
|
||||||
|
print("\n[*] Unlocking eMMC devinfo for unsigned boot images...")
|
||||||
|
ok = unlock_devinfo(fh, args.lun, guid_gpt.partentries,
|
||||||
|
backup_dir, device) and ok
|
||||||
|
if oem_unlock_enabled:
|
||||||
|
print("\n[*] Enabling OEM unlock in config/frp...")
|
||||||
|
ok = enable_oem_unlock(fh, args.lun, guid_gpt.partentries,
|
||||||
|
backup_dir, device) and ok
|
||||||
|
if not ok:
|
||||||
|
print("[!] Unlock preparation failed; re-enter EDL and retry.")
|
||||||
|
sys.exit(1)
|
||||||
|
print("\n============================================================")
|
||||||
|
print(" UNLOCK PREPARATION COMPLETE")
|
||||||
|
print("============================================================")
|
||||||
|
print(" The stock aboot reads devinfo from RPMB, not eMMC. To finish:")
|
||||||
|
print(" 1. Power off, hold Volume Down, plug USB to enter fastboot.")
|
||||||
|
print(" 2. Run: fastboot oem unlock-go")
|
||||||
|
print(" (Confirm on-screen if asked; this wipes userdata.)")
|
||||||
|
print(" 3. Re-enter EDL and run the normal flash again.")
|
||||||
|
print(" It will write lk2nd to boot/recovery and userdata.")
|
||||||
|
print("============================================================")
|
||||||
|
if not args.no_reset:
|
||||||
|
fh.cmd_reset()
|
||||||
|
return
|
||||||
|
|
||||||
|
if unlock_bootloader:
|
||||||
|
print("\n[*] Unlocking eMMC devinfo for unsigned boot images...")
|
||||||
|
if not unlock_devinfo(fh, args.lun, guid_gpt.partentries,
|
||||||
|
backup_dir, device):
|
||||||
|
print("[!] Custom boot.img will be rejected while devinfo stays locked.")
|
||||||
|
print(" Re-enter EDL and retry; do not trust this flash.")
|
||||||
|
sys.exit(1)
|
||||||
|
if oem_unlock_enabled:
|
||||||
|
print("\n[*] Enabling OEM unlock in config/frp (RPMB unlock prerequisite)...")
|
||||||
|
if not enable_oem_unlock(fh, args.lun, guid_gpt.partentries,
|
||||||
|
backup_dir, device):
|
||||||
|
print("[!] Could not enable 'oem unlock-go'. Run --only-unlock first.")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
if not args.skip_backup:
|
if not args.skip_backup:
|
||||||
os.makedirs(backup_dir, exist_ok=True)
|
os.makedirs(backup_dir, exist_ok=True)
|
||||||
gpt_backup_path = os.path.join(backup_dir, "gpt.bin")
|
gpt_backup_path = os.path.join(backup_dir, "gpt.bin")
|
||||||
@@ -526,7 +1027,8 @@ def main():
|
|||||||
wf.write(gpt_raw)
|
wf.write(gpt_raw)
|
||||||
print(f"[+] Saved GPT backup: {gpt_backup_path}")
|
print(f"[+] Saved GPT backup: {gpt_backup_path}")
|
||||||
|
|
||||||
backup_parts = ["fsc", "fsg", "modemst1", "modemst2", "persist", "boot"]
|
backup_parts = ["fsc", "fsg", "modemst1", "modemst2", "persist"]
|
||||||
|
backup_parts += list(target_names)
|
||||||
if args.backup_modem:
|
if args.backup_modem:
|
||||||
backup_parts.append("modem")
|
backup_parts.append("modem")
|
||||||
|
|
||||||
@@ -536,8 +1038,14 @@ def main():
|
|||||||
print(f"[!] Warning: Partition '{pname}' not found in GPT; skipping backup.")
|
print(f"[!] Warning: Partition '{pname}' not found in GPT; skipping backup.")
|
||||||
continue
|
continue
|
||||||
dest_file = os.path.join(backup_dir, f"{pname}.img")
|
dest_file = os.path.join(backup_dir, f"{pname}.img")
|
||||||
|
# Never reuse a stale backup of a partition we are about to overwrite:
|
||||||
|
# an older device's boot.img in ./backup must not be trusted.
|
||||||
|
is_target = pname in target_names
|
||||||
|
if is_target:
|
||||||
|
dest_file = os.path.join(backup_dir, f"{pname}-{device}.img")
|
||||||
if (
|
if (
|
||||||
not args.force_backup
|
not is_target
|
||||||
|
and not args.force_backup
|
||||||
and os.path.exists(dest_file)
|
and os.path.exists(dest_file)
|
||||||
and os.stat(dest_file).st_size > 0
|
and os.stat(dest_file).st_size > 0
|
||||||
):
|
):
|
||||||
@@ -546,15 +1054,32 @@ def main():
|
|||||||
if not dump_partition(fh, args.lun, part, dest_file):
|
if not dump_partition(fh, args.lun, part, dest_file):
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
print("\n[*] Step 1/3: Flashing lk2nd secondary bootloader to 'boot'...")
|
for name, part in target_parts:
|
||||||
if not write_partition(fh, args.lun, boot_part, bootloader_img):
|
source = source_for(name)
|
||||||
|
if method == "lk2nd" and source != mainline_img and (
|
||||||
|
source == bootloader_img or source == beatles_lk2nd_img):
|
||||||
|
print("\n[*] Step 1/3: Flashing lk2nd secondary bootloader to '%s'..." % name)
|
||||||
|
else:
|
||||||
|
print("\n[*] Step 1/3: Flashing Bananarchy boot.img to '%s'..." % name)
|
||||||
|
if not write_partition(fh, args.lun, part, source):
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
if args.verify:
|
||||||
|
for name, part in target_parts:
|
||||||
|
source = source_for(name)
|
||||||
|
ok, detail = verify_partition(fh, args.lun, part, source)
|
||||||
|
print("[%s] Read-back of '%s': %s" % (
|
||||||
|
"+" if ok else "!", name, detail))
|
||||||
|
if not ok:
|
||||||
|
print("[!] The image was not committed to '%s'. Re-enter EDL and "
|
||||||
|
"retry before trusting the flash." % name)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
print(f"\n[*] Step 2/3: Flashing Bananarchy Linux ({device}) image to 'userdata'...")
|
print(f"\n[*] Step 2/3: Flashing Bananarchy Linux ({device}) image to 'userdata'...")
|
||||||
if not write_partition(fh, args.lun, userdata_part, userdata_img):
|
if not write_partition(fh, args.lun, userdata_part, userdata_img):
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if not args.no_wipe_system and system_part:
|
if wipe_system and system_part:
|
||||||
print(
|
print(
|
||||||
"\n[*] Step 3/3: Clearing stock 'system' superblock "
|
"\n[*] Step 3/3: Clearing stock 'system' superblock "
|
||||||
"(first 64 sectors / 32 KiB)..."
|
"(first 64 sectors / 32 KiB)..."
|
||||||
@@ -571,7 +1096,8 @@ def main():
|
|||||||
if os.path.exists(zero_path):
|
if os.path.exists(zero_path):
|
||||||
os.unlink(zero_path)
|
os.unlink(zero_path)
|
||||||
else:
|
else:
|
||||||
print("\n[*] Step 3/3: Skipping 'system' superblock wipe.")
|
print("\n[*] Step 3/3: Skipping 'system' superblock wipe "
|
||||||
|
"(--no-wipe-system).")
|
||||||
|
|
||||||
if not args.no_reset:
|
if not args.no_reset:
|
||||||
print(f"\n[*] Resetting and booting {device_label}...")
|
print(f"\n[*] Resetting and booting {device_label}...")
|
||||||
@@ -580,6 +1106,27 @@ def main():
|
|||||||
print("\n============================================================")
|
print("\n============================================================")
|
||||||
print(" BANANARCHY EDL FLASHING COMPLETED SUCCESSFULLY")
|
print(" BANANARCHY EDL FLASHING COMPLETED SUCCESSFULLY")
|
||||||
print("============================================================")
|
print("============================================================")
|
||||||
|
if unlock_bootloader:
|
||||||
|
print(" eMMC devinfo.is_unlocked=1; note stock aboot also reads RPMB devinfo.")
|
||||||
|
if oem_unlock_enabled:
|
||||||
|
print(" config/frp allow-unlock flag set; run 'fastboot oem unlock-go'")
|
||||||
|
print(" once if verification still blocks lk2nd (see --only-unlock).")
|
||||||
|
if method == "recovery":
|
||||||
|
print(" system superblock wiped; a normal power-on will hang on the KaiOS logo.")
|
||||||
|
print(" Hold Volume Up at power-on to boot Bananarchy from 'recovery'.")
|
||||||
|
elif method == "both":
|
||||||
|
print(" boot and recovery both hold Bananarchy boot.img.")
|
||||||
|
print(" Try a normal power-on first; if the KaiOS logo persists, hold")
|
||||||
|
print(" Volume Up at power-on to boot the recovery copy.")
|
||||||
|
elif method == "boot":
|
||||||
|
print(" boot now holds Bananarchy boot.img: a normal power-on boots it.")
|
||||||
|
print(" (system superblock wiped; restore boot + system from stock firmware")
|
||||||
|
print(" if you ever want KaiOS back.)")
|
||||||
|
elif method == "lk2nd" and device == "nokia-beatles":
|
||||||
|
print(" boot and lk2nd hold the display-enabled nokia-beatles lk2nd port; recovery holds the mainline boot.img.")
|
||||||
|
print(" Normal power-on: aboot -> lk2nd -> extlinux -> Bananarchy.")
|
||||||
|
print(" Volume Up: aboot -> recovery -> mainline boot.img -> Bananarchy.")
|
||||||
|
else:
|
||||||
print(" The phone will now boot via lk2nd into Bananarchy Linux (Sxmo).")
|
print(" The phone will now boot via lk2nd into Bananarchy Linux (Sxmo).")
|
||||||
print(" Default login: user / " + DEFAULT_USER_PASSWORD + " | USB SSH: ssh user@172.16.42.1")
|
print(" Default login: user / " + DEFAULT_USER_PASSWORD + " | USB SSH: ssh user@172.16.42.1")
|
||||||
print("============================================================")
|
print("============================================================")
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@ if ! "$PYTHON_BIN" -c 'import usb.core' >/dev/null 2>&1; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
if [ "$arg" = "-h" ] || [ "$arg" = "--help" ]; then
|
if [ "$arg" = "-h" ] || [ "$arg" = "--help" ] || [ "$arg" = "--list-loaders" ]; then
|
||||||
exec "$PYTHON_BIN" "$FLASHER_PY" "$@"
|
exec "$PYTHON_BIN" "$FLASHER_PY" "$@"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
+267
-267
@@ -45060,273 +45060,273 @@ c0d043bc D proc_uid_seq_operations
|
|||||||
c0d043cc D pidns_operations
|
c0d043cc D pidns_operations
|
||||||
c0d043ec D pidns_for_children_operations
|
c0d043ec D pidns_for_children_operations
|
||||||
c0d04414 D kernel_config_data
|
c0d04414 D kernel_config_data
|
||||||
c0d0e56f D kernel_config_data_end
|
c0d0e599 D kernel_config_data_end
|
||||||
c0d0e578 d config_gz_proc_ops
|
c0d0e5a4 d config_gz_proc_ops
|
||||||
c0d0e5e0 d __func__.10
|
c0d0e60c d __func__.10
|
||||||
c0d0e5ec d __func__.7
|
c0d0e618 d __func__.7
|
||||||
c0d0e5fc d __func__.5
|
c0d0e628 d __func__.5
|
||||||
c0d0e610 d __func__.3
|
c0d0e63c d __func__.3
|
||||||
c0d0e620 d audit_feature_names
|
c0d0e64c d audit_feature_names
|
||||||
c0d0e740 d audit_ops
|
c0d0e770 d audit_ops
|
||||||
c0d0e98c d audit_nfcfgs
|
c0d0e9bc d audit_nfcfgs
|
||||||
c0d0ea3c d ntp_name.0
|
c0d0ea6c d ntp_name.0
|
||||||
c0d0ea54 d audit_watch_fsnotify_ops
|
c0d0ea84 d audit_watch_fsnotify_ops
|
||||||
c0d0ea6c d audit_mark_fsnotify_ops
|
c0d0ea9c d audit_mark_fsnotify_ops
|
||||||
c0d0ea84 d audit_tree_ops
|
c0d0eab4 d audit_tree_ops
|
||||||
c0d0ea9c d kprobes_fops
|
c0d0eacc d kprobes_fops
|
||||||
c0d0eb20 d fops_kp
|
c0d0eb50 d fops_kp
|
||||||
c0d0eba4 d kprobe_blacklist_fops
|
c0d0ebd4 d kprobe_blacklist_fops
|
||||||
c0d0ec28 d kprobes_sops
|
c0d0ec58 d kprobes_sops
|
||||||
c0d0ec38 d kprobe_blacklist_sops
|
c0d0ec68 d kprobe_blacklist_sops
|
||||||
c0d0ec70 d seccomp_log_names
|
c0d0eca0 d seccomp_log_names
|
||||||
c0d0ecb8 d seccomp_notify_ops
|
c0d0ece8 d seccomp_notify_ops
|
||||||
c0d0ed3c d mode1_syscalls
|
c0d0ed6c d mode1_syscalls
|
||||||
c0d0ed50 d seccomp_actions_avail
|
c0d0ed80 d seccomp_actions_avail
|
||||||
c0d0ed90 d taskstats_ops
|
c0d0edc0 d taskstats_ops
|
||||||
c0d0edc8 d cgroupstats_cmd_get_policy
|
c0d0edf8 d cgroupstats_cmd_get_policy
|
||||||
c0d0edd8 d taskstats_cmd_get_policy
|
c0d0ee08 d taskstats_cmd_get_policy
|
||||||
c0d0ee0c d empty_hash
|
c0d0ee3c d empty_hash
|
||||||
c0d0ee24 d show_ftrace_seq_ops
|
c0d0ee54 d show_ftrace_seq_ops
|
||||||
c0d0ee34 d ftrace_graph_seq_ops
|
c0d0ee64 d ftrace_graph_seq_ops
|
||||||
c0d0ee44 d this_mod.0
|
c0d0ee74 d this_mod.0
|
||||||
c0d0ee54 d ftrace_filter_fops
|
c0d0ee84 d ftrace_filter_fops
|
||||||
c0d0eed8 d ftrace_notrace_fops
|
c0d0ef08 d ftrace_notrace_fops
|
||||||
c0d0ef5c d ftrace_no_pid_sops
|
c0d0ef8c d ftrace_no_pid_sops
|
||||||
c0d0ef6c d ftrace_pid_sops
|
c0d0ef9c d ftrace_pid_sops
|
||||||
c0d0ef7c d ftrace_pid_fops
|
c0d0efac d ftrace_pid_fops
|
||||||
c0d0f000 d ftrace_no_pid_fops
|
c0d0f030 d ftrace_no_pid_fops
|
||||||
c0d0f084 d ftrace_avail_fops
|
c0d0f0b4 d ftrace_avail_fops
|
||||||
c0d0f108 d ftrace_avail_addrs_fops
|
c0d0f138 d ftrace_avail_addrs_fops
|
||||||
c0d0f18c d ftrace_enabled_fops
|
c0d0f1bc d ftrace_enabled_fops
|
||||||
c0d0f210 d ftrace_touched_fops
|
c0d0f240 d ftrace_touched_fops
|
||||||
c0d0f294 d ftrace_graph_fops
|
c0d0f2c4 d ftrace_graph_fops
|
||||||
c0d0f318 d ftrace_graph_notrace_fops
|
c0d0f348 d ftrace_graph_notrace_fops
|
||||||
c0d0f39c d empty_buckets
|
c0d0f3cc d empty_buckets
|
||||||
c0d0f44c d rb_meta_seq_ops
|
c0d0f47c d rb_meta_seq_ops
|
||||||
c0d0f460 d trace_clocks
|
c0d0f490 d trace_clocks
|
||||||
c0d0f4cc d tracing_buffers_vmops
|
c0d0f4fc d tracing_buffers_vmops
|
||||||
c0d0f504 d buffer_pipe_buf_ops
|
c0d0f534 d buffer_pipe_buf_ops
|
||||||
c0d0f514 d trace_options_fops
|
c0d0f544 d trace_options_fops
|
||||||
c0d0f598 d show_traces_seq_ops
|
c0d0f5c8 d show_traces_seq_ops
|
||||||
c0d0f5a8 d tracing_err_log_seq_ops
|
c0d0f5d8 d tracing_err_log_seq_ops
|
||||||
c0d0f5b8 d show_traces_fops
|
c0d0f5e8 d show_traces_fops
|
||||||
c0d0f63c d set_tracer_fops
|
c0d0f66c d set_tracer_fops
|
||||||
c0d0f6c0 d tracing_cpumask_fops
|
c0d0f6f0 d tracing_cpumask_fops
|
||||||
c0d0f744 d tracing_iter_fops
|
c0d0f774 d tracing_iter_fops
|
||||||
c0d0f7c8 d tracing_fops
|
c0d0f7f8 d tracing_fops
|
||||||
c0d0f84c d tracing_pipe_fops
|
c0d0f87c d tracing_pipe_fops
|
||||||
c0d0f8d0 d tracing_entries_fops
|
c0d0f900 d tracing_entries_fops
|
||||||
c0d0f954 d tracing_total_entries_fops
|
c0d0f984 d tracing_total_entries_fops
|
||||||
c0d0f9d8 d tracing_free_buffer_fops
|
c0d0fa08 d tracing_free_buffer_fops
|
||||||
c0d0fa5c d tracing_mark_fops
|
c0d0fa8c d tracing_mark_fops
|
||||||
c0d0fae0 d tracing_mark_raw_fops
|
c0d0fb10 d tracing_mark_raw_fops
|
||||||
c0d0fb64 d trace_clock_fops
|
c0d0fb94 d trace_clock_fops
|
||||||
c0d0fbe8 d rb_simple_fops
|
c0d0fc18 d rb_simple_fops
|
||||||
c0d0fc6c d trace_time_stamp_mode_fops
|
c0d0fc9c d trace_time_stamp_mode_fops
|
||||||
c0d0fcf0 d buffer_percent_fops
|
c0d0fd20 d buffer_percent_fops
|
||||||
c0d0fd74 d buffer_subbuf_size_fops
|
c0d0fda4 d buffer_subbuf_size_fops
|
||||||
c0d0fdf8 d trace_options_core_fops
|
c0d0fe28 d trace_options_core_fops
|
||||||
c0d0fe7c d last_boot_fops
|
c0d0feac d last_boot_fops
|
||||||
c0d0ff00 d tracing_err_log_fops
|
c0d0ff30 d tracing_err_log_fops
|
||||||
c0d0ff84 d tracing_buffers_fops
|
c0d0ffb4 d tracing_buffers_fops
|
||||||
c0d10008 d tracing_stats_fops
|
c0d10038 d tracing_stats_fops
|
||||||
c0d1008c d tracing_buffer_meta_fops
|
c0d100bc d tracing_buffer_meta_fops
|
||||||
c0d10110 d tracer_seq_ops
|
c0d10140 d tracer_seq_ops
|
||||||
c0d10120 d space.8
|
c0d10150 d space.8
|
||||||
c0d10130 d tracing_thresh_fops
|
c0d10160 d tracing_thresh_fops
|
||||||
c0d101b4 d tracing_readme_fops
|
c0d101e4 d tracing_readme_fops
|
||||||
c0d10238 d tracing_dyn_info_fops
|
c0d10268 d tracing_dyn_info_fops
|
||||||
c0d102bc D trace_min_max_fops
|
c0d102ec D trace_min_max_fops
|
||||||
c0d10340 d readme_msg
|
c0d10370 d readme_msg
|
||||||
c0d11e60 d timerlat_lat_context
|
c0d11e90 d timerlat_lat_context
|
||||||
c0d11e6c d state_char.0
|
c0d11e9c d state_char.0
|
||||||
c0d11e78 d trace_stat_seq_ops
|
c0d11ea8 d trace_stat_seq_ops
|
||||||
c0d11e88 d tracing_stat_fops
|
c0d11eb8 d tracing_stat_fops
|
||||||
c0d11f0c d ftrace_formats_fops
|
c0d11f3c d ftrace_formats_fops
|
||||||
c0d11f90 d show_format_seq_ops
|
c0d11fc0 d show_format_seq_ops
|
||||||
c0d11fa0 d tracing_saved_tgids_seq_ops
|
c0d11fd0 d tracing_saved_tgids_seq_ops
|
||||||
c0d11fb0 d tracing_saved_cmdlines_seq_ops
|
c0d11fe0 d tracing_saved_cmdlines_seq_ops
|
||||||
c0d11fc0 D tracing_saved_cmdlines_size_fops
|
c0d11ff0 D tracing_saved_cmdlines_size_fops
|
||||||
c0d12044 D tracing_saved_cmdlines_fops
|
c0d12074 D tracing_saved_cmdlines_fops
|
||||||
c0d120c8 D tracing_saved_tgids_fops
|
c0d120f8 D tracing_saved_tgids_fops
|
||||||
c0d1214c d CSWTCH.34
|
c0d1217c d CSWTCH.34
|
||||||
c0d12170 d spaces.0
|
c0d121a0 d spaces.0
|
||||||
c0d12198 d graph_depth_fops
|
c0d121c8 d graph_depth_fops
|
||||||
c0d12234 d ftrace_subsystem_filter_fops
|
c0d12264 d ftrace_subsystem_filter_fops
|
||||||
c0d122b8 d ftrace_system_enable_fops
|
c0d122e8 d ftrace_system_enable_fops
|
||||||
c0d1233c d ftrace_tr_enable_fops
|
c0d1236c d ftrace_tr_enable_fops
|
||||||
c0d123c0 d ftrace_show_header_page_fops
|
c0d123f0 d ftrace_show_header_page_fops
|
||||||
c0d12444 d ftrace_show_header_event_fops
|
c0d12474 d ftrace_show_header_event_fops
|
||||||
c0d124c8 d trace_format_seq_ops
|
c0d124f8 d trace_format_seq_ops
|
||||||
c0d124d8 d ftrace_set_event_fops
|
c0d12508 d ftrace_set_event_fops
|
||||||
c0d1255c d ftrace_set_event_pid_fops
|
c0d1258c d ftrace_set_event_pid_fops
|
||||||
c0d125e0 d ftrace_set_event_notrace_pid_fops
|
c0d12610 d ftrace_set_event_notrace_pid_fops
|
||||||
c0d12664 d show_set_event_seq_ops
|
c0d12694 d show_set_event_seq_ops
|
||||||
c0d12674 d show_event_seq_ops
|
c0d126a4 d show_event_seq_ops
|
||||||
c0d12684 d show_set_no_pid_seq_ops
|
c0d126b4 d show_set_no_pid_seq_ops
|
||||||
c0d12694 d show_set_pid_seq_ops
|
c0d126c4 d show_set_pid_seq_ops
|
||||||
c0d126a4 d ftrace_event_format_fops
|
c0d126d4 d ftrace_event_format_fops
|
||||||
c0d12728 d ftrace_enable_fops
|
c0d12758 d ftrace_enable_fops
|
||||||
c0d127ac d ftrace_event_filter_fops
|
c0d127dc d ftrace_event_filter_fops
|
||||||
c0d12830 d ftrace_event_id_fops
|
c0d12860 d ftrace_event_id_fops
|
||||||
c0d128b4 d ftrace_avail_fops
|
c0d128e4 d ftrace_avail_fops
|
||||||
c0d12a20 d ops
|
c0d12a50 d ops
|
||||||
c0d12a44 d event_triggers_seq_ops
|
c0d12a74 d event_triggers_seq_ops
|
||||||
c0d12a54 D event_trigger_fops
|
c0d12a84 D event_trigger_fops
|
||||||
c0d12d50 d bpf_key_sig_kfunc_set
|
c0d12d80 d bpf_key_sig_kfunc_set
|
||||||
c0d12d5c d bpf_kprobe_multi_kfunc_set
|
c0d12d8c d bpf_kprobe_multi_kfunc_set
|
||||||
c0d12d68 D bpf_get_current_task_proto
|
c0d12d98 D bpf_get_current_task_proto
|
||||||
c0d12da4 D bpf_get_current_task_btf_proto
|
c0d12dd4 D bpf_get_current_task_btf_proto
|
||||||
c0d12de0 D bpf_task_pt_regs_proto
|
c0d12e10 D bpf_task_pt_regs_proto
|
||||||
c0d12e1c d bpf_perf_event_read_proto
|
c0d12e4c d bpf_perf_event_read_proto
|
||||||
c0d12e58 d bpf_trace_printk_proto
|
c0d12e88 d bpf_trace_printk_proto
|
||||||
c0d12e94 D bpf_probe_read_user_proto
|
c0d12ec4 D bpf_probe_read_user_proto
|
||||||
c0d12ed0 D bpf_probe_read_user_str_proto
|
c0d12f00 D bpf_probe_read_user_str_proto
|
||||||
c0d12f0c d bpf_probe_read_compat_str_proto
|
c0d12f3c d bpf_probe_read_compat_str_proto
|
||||||
c0d12f48 d bpf_probe_read_compat_proto
|
c0d12f78 d bpf_probe_read_compat_proto
|
||||||
c0d12f84 D bpf_probe_read_kernel_str_proto
|
c0d12fb4 D bpf_probe_read_kernel_str_proto
|
||||||
c0d12fc0 d bpf_send_signal_proto
|
c0d12ff0 d bpf_send_signal_proto
|
||||||
c0d12ffc d bpf_send_signal_thread_proto
|
c0d1302c d bpf_send_signal_thread_proto
|
||||||
c0d13038 d bpf_perf_event_read_value_proto
|
c0d13068 d bpf_perf_event_read_value_proto
|
||||||
c0d13074 D bpf_snprintf_btf_proto
|
c0d130a4 D bpf_snprintf_btf_proto
|
||||||
c0d130b0 d bpf_trace_vprintk_proto
|
c0d130e0 d bpf_trace_vprintk_proto
|
||||||
c0d130ec d bpf_get_func_ip_proto_tracing
|
c0d1311c d bpf_get_func_ip_proto_tracing
|
||||||
c0d13128 d bpf_get_branch_snapshot_proto
|
c0d13158 d bpf_get_branch_snapshot_proto
|
||||||
c0d13164 d bpf_probe_write_user_proto
|
c0d13194 d bpf_probe_write_user_proto
|
||||||
c0d131a0 D bpf_probe_read_kernel_proto
|
c0d131d0 D bpf_probe_read_kernel_proto
|
||||||
c0d131dc d __func__.2
|
c0d1320c d __func__.2
|
||||||
c0d131f4 d __func__.0
|
c0d13224 d __func__.0
|
||||||
c0d13210 d bpf_perf_event_output_proto
|
c0d13240 d bpf_perf_event_output_proto
|
||||||
c0d1324c d bpf_get_func_ip_proto_kprobe_multi
|
c0d1327c d bpf_get_func_ip_proto_kprobe_multi
|
||||||
c0d13288 d bpf_get_func_ip_proto_uprobe_multi
|
c0d132b8 d bpf_get_func_ip_proto_uprobe_multi
|
||||||
c0d132c4 d bpf_get_func_ip_proto_kprobe
|
c0d132f4 d bpf_get_func_ip_proto_kprobe
|
||||||
c0d13300 d bpf_get_attach_cookie_proto_kmulti
|
c0d13330 d bpf_get_attach_cookie_proto_kmulti
|
||||||
c0d1333c d bpf_get_attach_cookie_proto_umulti
|
c0d1336c d bpf_get_attach_cookie_proto_umulti
|
||||||
c0d13378 d bpf_get_attach_cookie_proto_trace
|
c0d133a8 d bpf_get_attach_cookie_proto_trace
|
||||||
c0d133b4 d bpf_perf_event_output_proto_tp
|
c0d133e4 d bpf_perf_event_output_proto_tp
|
||||||
c0d133f0 d bpf_get_stackid_proto_tp
|
c0d13420 d bpf_get_stackid_proto_tp
|
||||||
c0d1342c d bpf_get_stack_proto_tp
|
c0d1345c d bpf_get_stack_proto_tp
|
||||||
c0d13468 d bpf_perf_event_output_proto_raw_tp
|
c0d13498 d bpf_perf_event_output_proto_raw_tp
|
||||||
c0d134a4 d bpf_get_stackid_proto_raw_tp
|
c0d134d4 d bpf_get_stackid_proto_raw_tp
|
||||||
c0d134e0 d bpf_get_stack_proto_raw_tp
|
c0d13510 d bpf_get_stack_proto_raw_tp
|
||||||
c0d1351c d bpf_get_attach_cookie_proto_tracing
|
c0d1354c d bpf_get_attach_cookie_proto_tracing
|
||||||
c0d13558 d bpf_perf_prog_read_value_proto
|
c0d13588 d bpf_perf_prog_read_value_proto
|
||||||
c0d13594 d bpf_read_branch_records_proto
|
c0d135c4 d bpf_read_branch_records_proto
|
||||||
c0d135d0 d bpf_get_attach_cookie_proto_pe
|
c0d13600 d bpf_get_attach_cookie_proto_pe
|
||||||
c0d1360c d bpf_d_path_proto
|
c0d1363c d bpf_d_path_proto
|
||||||
c0d13648 d bpf_seq_write_proto
|
c0d13678 d bpf_seq_write_proto
|
||||||
c0d13684 d bpf_get_func_arg_cnt_proto
|
c0d136b4 d bpf_get_func_arg_cnt_proto
|
||||||
c0d136c0 d bpf_get_func_ret_proto
|
c0d136f0 d bpf_get_func_ret_proto
|
||||||
c0d136fc d bpf_get_func_arg_proto
|
c0d1372c d bpf_get_func_arg_proto
|
||||||
c0d13738 d bpf_seq_printf_btf_proto
|
c0d13768 d bpf_seq_printf_btf_proto
|
||||||
c0d13774 d bpf_seq_printf_proto
|
c0d137a4 d bpf_seq_printf_proto
|
||||||
c0d137b0 D perf_event_prog_ops
|
c0d137e0 D perf_event_prog_ops
|
||||||
c0d137b4 D perf_event_verifier_ops
|
c0d137e4 D perf_event_verifier_ops
|
||||||
c0d137d0 D raw_tracepoint_writable_prog_ops
|
c0d13800 D raw_tracepoint_writable_prog_ops
|
||||||
c0d137d4 D raw_tracepoint_writable_verifier_ops
|
c0d13804 D raw_tracepoint_writable_verifier_ops
|
||||||
c0d137f0 D tracing_prog_ops
|
c0d13820 D tracing_prog_ops
|
||||||
c0d137f4 D tracing_verifier_ops
|
c0d13824 D tracing_verifier_ops
|
||||||
c0d13810 D raw_tracepoint_prog_ops
|
c0d13840 D raw_tracepoint_prog_ops
|
||||||
c0d13814 D raw_tracepoint_verifier_ops
|
c0d13844 D raw_tracepoint_verifier_ops
|
||||||
c0d13830 D tracepoint_prog_ops
|
c0d13860 D tracepoint_prog_ops
|
||||||
c0d13834 D tracepoint_verifier_ops
|
c0d13864 D tracepoint_verifier_ops
|
||||||
c0d13850 D kprobe_prog_ops
|
c0d13880 D kprobe_prog_ops
|
||||||
c0d13854 D kprobe_verifier_ops
|
c0d13884 D kprobe_verifier_ops
|
||||||
c0d13870 d str__bpf_trace__trace_system_name
|
c0d138a0 d str__bpf_trace__trace_system_name
|
||||||
c0d138b0 d kprobe_events_ops
|
c0d138e0 d kprobe_events_ops
|
||||||
c0d13934 d kprobe_profile_ops
|
c0d13964 d kprobe_profile_ops
|
||||||
c0d139b8 d profile_seq_op
|
c0d139e8 d profile_seq_op
|
||||||
c0d139c8 d probes_seq_op
|
c0d139f8 d probes_seq_op
|
||||||
c0d139d8 d symbols.0
|
c0d13a08 d symbols.0
|
||||||
c0d139f8 d str__error_report__trace_system_name
|
c0d13a28 d str__error_report__trace_system_name
|
||||||
c0d13a08 d symbols.3
|
c0d13a38 d symbols.3
|
||||||
c0d13a50 d symbols.2
|
c0d13a80 d symbols.2
|
||||||
c0d13a70 d symbols.0
|
c0d13aa0 d symbols.0
|
||||||
c0d13a88 d symbols.1
|
c0d13ab8 d symbols.1
|
||||||
c0d13aa8 d str__power__trace_system_name
|
c0d13ad8 d str__power__trace_system_name
|
||||||
c0d13ab0 d symbols.0
|
c0d13ae0 d symbols.0
|
||||||
c0d13ae0 d str__rpm__trace_system_name
|
c0d13b10 d str__rpm__trace_system_name
|
||||||
c0d13ae4 d dynamic_events_ops
|
c0d13b14 d dynamic_events_ops
|
||||||
c0d13b68 d dyn_event_seq_op
|
c0d13b98 d dyn_event_seq_op
|
||||||
c0d13b98 d probe_fetch_types
|
c0d13bc8 d probe_fetch_types
|
||||||
c0d13d48 d CSWTCH.274
|
c0d13d78 d CSWTCH.274
|
||||||
c0d13d54 d CSWTCH.273
|
c0d13d84 d CSWTCH.273
|
||||||
c0d13d60 d reserved_field_names
|
c0d13d90 d reserved_field_names
|
||||||
c0d13d80 D print_type_format_string
|
c0d13db0 D print_type_format_string
|
||||||
c0d13d88 D print_type_format_symbol
|
c0d13db8 D print_type_format_symbol
|
||||||
c0d13d8c D print_type_format_char
|
c0d13dbc D print_type_format_char
|
||||||
c0d13d94 D print_type_format_x64
|
c0d13dc4 D print_type_format_x64
|
||||||
c0d13d9c D print_type_format_x32
|
c0d13dcc D print_type_format_x32
|
||||||
c0d13da4 D print_type_format_x16
|
c0d13dd4 D print_type_format_x16
|
||||||
c0d13dac D print_type_format_x8
|
c0d13ddc D print_type_format_x8
|
||||||
c0d13db4 D print_type_format_s64
|
c0d13de4 D print_type_format_s64
|
||||||
c0d13db8 D print_type_format_s32
|
c0d13de8 D print_type_format_s32
|
||||||
c0d13dbc D print_type_format_s16
|
c0d13dec D print_type_format_s16
|
||||||
c0d13dc0 D print_type_format_s8
|
c0d13df0 D print_type_format_s8
|
||||||
c0d13dc4 D print_type_format_u64
|
c0d13df4 D print_type_format_u64
|
||||||
c0d13dc8 D print_type_format_u32
|
c0d13df8 D print_type_format_u32
|
||||||
c0d13dcc D print_type_format_u16
|
c0d13dfc D print_type_format_u16
|
||||||
c0d13dd0 D print_type_format_u8
|
c0d13e00 D print_type_format_u8
|
||||||
c0d13df8 d uprobe_events_ops
|
c0d13e28 d uprobe_events_ops
|
||||||
c0d13e7c d uprobe_profile_ops
|
c0d13eac d uprobe_profile_ops
|
||||||
c0d13f00 d profile_seq_op
|
c0d13f30 d profile_seq_op
|
||||||
c0d13f10 d probes_seq_op
|
c0d13f40 d probes_seq_op
|
||||||
c0d13fbc d symbols.8
|
c0d13fec d symbols.8
|
||||||
c0d13ff4 d symbols.7
|
c0d14024 d symbols.7
|
||||||
c0d1402c d symbols.6
|
c0d1405c d symbols.6
|
||||||
c0d14064 d symbols.5
|
c0d14094 d symbols.5
|
||||||
c0d1409c d symbols.4
|
c0d140cc d symbols.4
|
||||||
c0d140d4 d symbols.3
|
c0d14104 d symbols.3
|
||||||
c0d1410c d symbols.2
|
c0d1413c d symbols.2
|
||||||
c0d1413c d symbols.1
|
c0d1416c d symbols.1
|
||||||
c0d1416c d symbols.0
|
c0d1419c d symbols.0
|
||||||
c0d141ac d public_insntable.10
|
c0d141dc d public_insntable.10
|
||||||
c0d142ac d str__xdp__trace_system_name
|
c0d142dc d str__xdp__trace_system_name
|
||||||
c0d142b0 V arena_map_ops
|
c0d142e0 V arena_map_ops
|
||||||
c0d1435c D bpf_tail_call_proto
|
c0d1438c D bpf_tail_call_proto
|
||||||
c0d14410 V bpf_seq_printf_btf_proto
|
c0d14440 V bpf_seq_printf_btf_proto
|
||||||
c0d14c18 d bpf_link_type_strs
|
c0d14c48 d bpf_link_type_strs
|
||||||
c0d14c54 d CSWTCH.401
|
c0d14c84 d CSWTCH.401
|
||||||
c0d14c8c d bpf_audit_str
|
c0d14cbc d bpf_audit_str
|
||||||
c0d14c94 d bpf_map_default_vmops
|
c0d14cc4 d bpf_map_default_vmops
|
||||||
c0d14ccc D bpf_map_offload_ops
|
c0d14cfc D bpf_map_offload_ops
|
||||||
c0d14d78 D bpf_map_fops
|
c0d14da8 D bpf_map_fops
|
||||||
c0d14dfc d bpf_link_fops_poll
|
c0d14e2c d bpf_link_fops_poll
|
||||||
c0d14e80 d bpf_link_fops
|
c0d14eb0 d bpf_link_fops
|
||||||
c0d14f04 D bpf_prog_fops
|
c0d14f34 D bpf_prog_fops
|
||||||
c0d14f88 d bpf_map_types
|
c0d14fb8 d bpf_map_types
|
||||||
c0d15010 d bpf_prog_types
|
c0d15040 d bpf_prog_types
|
||||||
c0d15094 d bpf_tracing_link_lops
|
c0d150c4 d bpf_tracing_link_lops
|
||||||
c0d150b8 d bpf_raw_tp_link_lops
|
c0d150e8 d bpf_raw_tp_link_lops
|
||||||
c0d150dc d bpf_perf_link_lops
|
c0d1510c d bpf_perf_link_lops
|
||||||
c0d15100 d bpf_stats_fops
|
c0d15130 d bpf_stats_fops
|
||||||
c0d15184 d bpf_sys_bpf_proto
|
c0d151b4 d bpf_sys_bpf_proto
|
||||||
c0d151c0 d bpf_sys_close_proto
|
c0d151f0 d bpf_sys_close_proto
|
||||||
c0d151fc d bpf_kallsyms_lookup_name_proto
|
c0d1522c d bpf_kallsyms_lookup_name_proto
|
||||||
c0d15238 D bpf_syscall_prog_ops
|
c0d15268 D bpf_syscall_prog_ops
|
||||||
c0d1523c D bpf_syscall_verifier_ops
|
c0d1526c D bpf_syscall_verifier_ops
|
||||||
c0d15dbc d reg2btf_ids
|
c0d15dec d reg2btf_ids
|
||||||
c0d15e14 d caller_saved
|
c0d15e44 d caller_saved
|
||||||
c0d15e2c d opcode_flip.0
|
c0d15e5c d opcode_flip.0
|
||||||
c0d15ee4 d compatible_reg_types
|
c0d15f14 d compatible_reg_types
|
||||||
c0d15f44 d mem_types
|
c0d15f74 d mem_types
|
||||||
c0d15f70 d bpf_verifier_ops
|
c0d15fa0 d bpf_verifier_ops
|
||||||
c0d16044 d dynptr_types
|
c0d16074 d dynptr_types
|
||||||
c0d16070 d kptr_xchg_dest_types
|
c0d160a0 d kptr_xchg_dest_types
|
||||||
c0d1609c d timer_types
|
c0d160cc d timer_types
|
||||||
c0d160c8 d const_str_ptr_types
|
c0d160f8 d const_str_ptr_types
|
||||||
c0d160f4 d stack_ptr_types
|
c0d16124 d stack_ptr_types
|
||||||
c0d16120 d func_ptr_types
|
c0d16150 d func_ptr_types
|
||||||
c0d1614c d percpu_btf_ptr_types
|
c0d1617c d percpu_btf_ptr_types
|
||||||
c0d16178 d btf_ptr_types
|
c0d161a8 d btf_ptr_types
|
||||||
c0d161a4 d const_map_ptr_types
|
c0d161d4 d const_map_ptr_types
|
||||||
c0d161d0 d ringbuf_mem_types
|
c0d16200 d ringbuf_mem_types
|
||||||
c0d161fc d context_types
|
c0d1622c d context_types
|
||||||
c0d16228 d scalar_types
|
c0d16258 d scalar_types
|
||||||
c0d16254 d fullsock_types
|
c0d16284 d fullsock_types
|
||||||
c0d16280 d spin_lock_types
|
c0d162b0 d spin_lock_types
|
||||||
c0d162ac d btf_id_sock_common_types
|
c0d162dc d btf_id_sock_common_types
|
||||||
c0d162d8 d sock_types
|
c0d16308 d sock_types
|
||||||
c0d16380 d bpf_map_iops
|
c0d16380 d bpf_map_iops
|
||||||
c0d16400 d bpf_link_iops
|
c0d16400 d bpf_link_iops
|
||||||
c0d16480 d bpf_prog_iops
|
c0d16480 d bpf_prog_iops
|
||||||
|
|||||||
@@ -2524,7 +2524,7 @@ CONFIG_SPI_QUP=y
|
|||||||
#
|
#
|
||||||
# SPI Multiplexer support
|
# SPI Multiplexer support
|
||||||
#
|
#
|
||||||
# CONFIG_SPI_MUX is not set
|
CONFIG_SPI_MUX=m
|
||||||
|
|
||||||
#
|
#
|
||||||
# SPI Protocol Masters
|
# SPI Protocol Masters
|
||||||
@@ -6070,6 +6070,17 @@ CONFIG_NVMEM_QCOM_QFPROM=y
|
|||||||
# CONFIG_FPGA is not set
|
# CONFIG_FPGA is not set
|
||||||
# CONFIG_FSI is not set
|
# CONFIG_FSI is not set
|
||||||
# CONFIG_TEE is not set
|
# CONFIG_TEE is not set
|
||||||
|
CONFIG_MULTIPLEXER=m
|
||||||
|
|
||||||
|
#
|
||||||
|
# Multiplexer drivers
|
||||||
|
#
|
||||||
|
# CONFIG_MUX_ADG792A is not set
|
||||||
|
# CONFIG_MUX_ADGS1408 is not set
|
||||||
|
CONFIG_MUX_GPIO=m
|
||||||
|
# CONFIG_MUX_MMIO is not set
|
||||||
|
# end of Multiplexer drivers
|
||||||
|
|
||||||
CONFIG_PM_OPP=y
|
CONFIG_PM_OPP=y
|
||||||
# CONFIG_SIOX is not set
|
# CONFIG_SIOX is not set
|
||||||
# CONFIG_SLIMBUS is not set
|
# CONFIG_SLIMBUS is not set
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,33 @@
|
|||||||
|
# Bananarchy cover display daemon (Nokia 2720 Flip external panel).
|
||||||
|
# Root-owned: the daemon runs as root; user preferences live in
|
||||||
|
# /home/user/.config/bananarchy/cover-display.conf and are applied by
|
||||||
|
# the xcover DWM plugin at session start.
|
||||||
|
|
||||||
|
# auto = /dev/fb1 (kernel spi-mux) -> /dev/spidev0.1 -> no hardware
|
||||||
|
backend = auto
|
||||||
|
fb_device = /dev/fb1
|
||||||
|
spidev_device = /dev/spidev0.1
|
||||||
|
gpiochip_device = /dev/gpiochip0
|
||||||
|
panel_firmware = /lib/firmware/nokia,beatles-gc9305-ext-panel.bin
|
||||||
|
socket_path = /run/bananarchy/cover.sock
|
||||||
|
theme_file = /home/user/.Xresources
|
||||||
|
input_dir = /dev/input
|
||||||
|
|
||||||
|
# GPIO offsets on MSM8909 TLMM (from the KaiOS downstream DTS)
|
||||||
|
mux_gpio = 13
|
||||||
|
reset_gpio = 23
|
||||||
|
# gpio110 (the internal panel's DC line) is claimed exclusively by
|
||||||
|
# panel-mipi-dbi-spi, so the daemon cannot request it through gpiochip0.
|
||||||
|
# The gpio13 switch routes the shared DC/CS lines; -1 lets the spidev
|
||||||
|
# backend open without fighting the kernel driver. Set this back to 110
|
||||||
|
# only when the spi-mux kernel modules own both panels instead.
|
||||||
|
dc_gpio = -1
|
||||||
|
|
||||||
|
# Privacy defaults: no caller name, no notification body, no text in logs.
|
||||||
|
enabled = 1
|
||||||
|
show_caller = 0
|
||||||
|
show_notify = 0
|
||||||
|
mask_logs = 1
|
||||||
|
clock24 = 1
|
||||||
|
brightness = 160
|
||||||
|
blank_timeout = 120
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# Bananarchy: pin the PAM-enabled sshd binary explicitly. The stock init
|
||||||
|
# script picks /usr/sbin/sshd.pam only when its "sshd -G | grep UsePAM yes"
|
||||||
|
# probe succeeds; if that probe is skipped (e.g. a service manager invoking
|
||||||
|
# sshd directly) the default /usr/sbin/sshd is used and it *rejects* the
|
||||||
|
# postmarketOS "UsePAM yes" drop-in as an unsupported option.
|
||||||
|
SSHD_BINARY="/usr/sbin/sshd.pam"
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# Bound udevadm settle so missing modem firmware cannot delay X startup.
|
||||||
|
udev_settle_timeout=2
|
||||||
+34
@@ -0,0 +1,34 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
# Bananarchy cover display daemon. Only active on flip devices; the
|
||||||
|
# lid-profile file is written by scripts/apply-bananarchy-overlay.sh.
|
||||||
|
|
||||||
|
description="Nokia 2720 Flip external cover display"
|
||||||
|
# The recovered native bananarchy-coverd busy-loops at 100% CPU on the
|
||||||
|
# spidev backend (gpio110/DC is owned by panel-mipi-dbi-spi) and paints
|
||||||
|
# nothing. Keep that binary installed for the future spi-mux work, but run
|
||||||
|
# the compiled idle IPC server in the default runlevel. No Python runs here.
|
||||||
|
command="/usr/bin/bananarchy-cover-idle"
|
||||||
|
command_args="--config /etc/bananarchy/cover-display.conf"
|
||||||
|
command_background="yes"
|
||||||
|
pidfile="/run/bananarchy/cover-display.pid"
|
||||||
|
output_log="/run/bananarchy/cover-display.log"
|
||||||
|
error_log="/run/bananarchy/cover-display.log"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need udev
|
||||||
|
after udev-settle
|
||||||
|
}
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
mkdir -p /run/bananarchy
|
||||||
|
chmod 0755 /run/bananarchy
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
if [ "$(cat /usr/share/bananarchy/lid-profile 2>/dev/null)" != "flip" ]; then
|
||||||
|
ebegin "Skipping cover display (not a flip device)"
|
||||||
|
eend 0
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
default_start
|
||||||
|
}
|
||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
# Nokia 2720 Flip hall-sensor lid handling (lock, blank, cover switch).
|
||||||
|
|
||||||
|
description="Bananarchy flip lid handler"
|
||||||
|
|
||||||
|
command="/usr/bin/bananarchy-lid"
|
||||||
|
command_background=true
|
||||||
|
pidfile="/run/bananarchy-lid.pid"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need udev
|
||||||
|
after udev-settle
|
||||||
|
before bananarchy-cover-display tinydm
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
# USB-only PAM-free fallback sshd, started independently of local.d.
|
||||||
|
description="Bananarchy USB diagnostic sshd"
|
||||||
|
|
||||||
|
command="/usr/sbin/sshd"
|
||||||
|
command_args="-f /etc/ssh/sshd_config_debug"
|
||||||
|
pidfile="/run/sshd-debug.pid"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need localmount
|
||||||
|
after sshd udev-settle
|
||||||
|
}
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
[ -x /usr/sbin/sshd ] || return 1
|
||||||
|
[ -f /etc/ssh/ssh_host_ed25519_key ] || /usr/sbin/ssh-keygen -A >/dev/null 2>&1 || true
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
if [ -f /etc/bananarchy-no-debug-sshd ]; then
|
||||||
|
ebegin "Skipping USB-only diagnostic sshd"
|
||||||
|
eend 0
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
ebegin "Starting USB-only diagnostic sshd"
|
||||||
|
"$command" $command_args
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
# Direct evdev handling for the 2720 Flip side volume rocker.
|
||||||
|
|
||||||
|
description="Bananarchy side volume keys"
|
||||||
|
|
||||||
|
command="/usr/bin/bananarchy-volume-keys"
|
||||||
|
command_background=true
|
||||||
|
pidfile="/run/bananarchy-volume-keys.pid"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need udev
|
||||||
|
after udev-settle
|
||||||
|
}
|
||||||
Executable
+96
@@ -0,0 +1,96 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
# Copyright (c) 2007-2015 The OpenRC Authors.
|
||||||
|
# See the Authors file at the top-level directory of this distribution and
|
||||||
|
# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
|
||||||
|
#
|
||||||
|
# This file is part of OpenRC. It is subject to the license terms in
|
||||||
|
# the LICENSE file found in the top-level directory of this
|
||||||
|
# distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
|
||||||
|
# This file may not be copied, modified, propagated, or distributed
|
||||||
|
# except according to the terms contained in the LICENSE file.
|
||||||
|
|
||||||
|
conf_d_dir="${RC_SERVICE%/*/*}/conf.d"
|
||||||
|
local_d_dir="${RC_SERVICE%/*/*}/local.d"
|
||||||
|
|
||||||
|
description="Executes user programs in ${local_d_dir}"
|
||||||
|
|
||||||
|
depend()
|
||||||
|
{
|
||||||
|
after modules udev-settle
|
||||||
|
keyword -timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
start()
|
||||||
|
{
|
||||||
|
local file has_errors redirect retval
|
||||||
|
has_errors=0
|
||||||
|
yesno $rc_verbose || redirect='> /dev/null 2>&1'
|
||||||
|
ebegin "Starting local"
|
||||||
|
eindent
|
||||||
|
for file in "${local_d_dir}"/*.start; do
|
||||||
|
if [ -x "${file}" ]; then
|
||||||
|
vebegin "Executing \"${file}\""
|
||||||
|
eval "${file}" $redirect
|
||||||
|
retval=$?
|
||||||
|
if [ ${retval} -ne 0 ]; then
|
||||||
|
has_errors=1
|
||||||
|
fi
|
||||||
|
veend ${retval} "Execution of \"${file}\" failed."
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
eoutdent
|
||||||
|
|
||||||
|
if command -v local_start >/dev/null 2>&1; then
|
||||||
|
ewarn "\"${conf_d_dir}/local\" should be removed."
|
||||||
|
ewarn "Please move the code from the local_start function"
|
||||||
|
ewarn "to executable scripts with an .start extension"
|
||||||
|
ewarn "in \"${local_d_dir}\""
|
||||||
|
local_start
|
||||||
|
fi
|
||||||
|
|
||||||
|
eend ${has_errors}
|
||||||
|
|
||||||
|
# We have to end with a zero exit code, because a failed execution
|
||||||
|
# of an executable ${local_d_dir}/*.start file shouldn't result in
|
||||||
|
# marking the local service as failed. Otherwise we are unable to
|
||||||
|
# execute any executable ${local_d_dir}/*.stop file, because a failed
|
||||||
|
# marked service cannot be stopped (and the stop function would
|
||||||
|
# actually call the executable ${local_d_dir}/*.stop file(s)).
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
stop()
|
||||||
|
{
|
||||||
|
local file has_errors redirect retval
|
||||||
|
has_errors=0
|
||||||
|
yesno $rc_verbose || redirect='> /dev/null 2>&1'
|
||||||
|
ebegin "Stopping local"
|
||||||
|
eindent
|
||||||
|
for file in "${local_d_dir}"/*.stop; do
|
||||||
|
if [ -x "${file}" ]; then
|
||||||
|
vebegin "Executing \"${file}\""
|
||||||
|
eval "${file}" $redirect
|
||||||
|
retval=$?
|
||||||
|
if [ ${retval} -ne 0 ]; then
|
||||||
|
has_errors=1
|
||||||
|
fi
|
||||||
|
veend ${retval} "Execution of \"${file}\" failed."
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
eoutdent
|
||||||
|
|
||||||
|
if command -v local_stop >/dev/null 2>&1; then
|
||||||
|
ewarn "\"${conf_d_dir}/local\" should be removed."
|
||||||
|
ewarn "Please move the code from the local_stop function"
|
||||||
|
ewarn "to executable scripts with an .stop extension"
|
||||||
|
ewarn "in \"${local_d_dir}\""
|
||||||
|
local_stop
|
||||||
|
fi
|
||||||
|
|
||||||
|
eend ${has_errors}
|
||||||
|
|
||||||
|
# An executable ${local_d_dir}/*.stop file which failed with a
|
||||||
|
# non-zero exit status is not a reason to mark this service
|
||||||
|
# as failed, therefore we have to end with a zero exit code.
|
||||||
|
return 0
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Make sure the out-of-tree camera driver, the cover-panel spidev driver and
|
||||||
|
# the spi-mux modules are loaded even when the boot-runlevel "modules" service
|
||||||
|
# could not process /etc/modules (it needs /bin/sed, which was missing on some
|
||||||
|
# rootfs builds).
|
||||||
|
for mod in msm8905-cam spidev mux-core mux-gpio spi-mux; do
|
||||||
|
i=0
|
||||||
|
while [ "$i" -lt 5 ]; do
|
||||||
|
/sbin/modprobe -q "$mod" && break
|
||||||
|
i=$((i + 1))
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
done
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Keep a USB-only diagnostic login available even when the main sshd's PAM
|
||||||
|
# stack is misconfigured. It is bound to 172.16.42.1 so it is never exposed
|
||||||
|
# over Wi-Fi or the modem; create /etc/bananarchy-no-debug-sshd to disable.
|
||||||
|
[ -f /etc/bananarchy-no-debug-sshd ] && exit 0
|
||||||
|
if rc-service bananarchy-sshd-debug status >/dev/null 2>&1; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
[ -x /usr/sbin/sshd ] || exit 0
|
||||||
|
[ -f /etc/ssh/ssh_host_ed25519_key ] || /usr/sbin/ssh-keygen -A >/dev/null 2>&1
|
||||||
|
# The USB gadget address may appear after this service starts, so retry.
|
||||||
|
(
|
||||||
|
i=0
|
||||||
|
while [ "$i" -lt 30 ]; do
|
||||||
|
/usr/sbin/sshd -f /etc/ssh/sshd_config_debug >/dev/null 2>&1 && break
|
||||||
|
i=$((i + 1))
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
) &
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Bananarchy hardware drivers that are not probed from a DT node.
|
||||||
|
# msm8905-cam registers /dev/video0 (GC2395/GC2385 rear camera).
|
||||||
|
msm8905-cam
|
||||||
|
# spidev binds to the 2720 Flip external-panel chip select (/dev/spidev0.1).
|
||||||
|
spidev
|
||||||
|
# The opt-in cover-panel DTB needs the gpio mux and spi-mux drivers.
|
||||||
|
mux-core
|
||||||
|
mux-gpio
|
||||||
|
spi-mux
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
#%PAM-1.0
|
||||||
|
# Bananarchy: Alpine ships two sshd binaries. The postmarketOS policy
|
||||||
|
# drop-in (50-postmarketos-ui-policy.conf) sets "UsePAM yes", which makes
|
||||||
|
# /etc/init.d/sshd pick /usr/sbin/sshd.pam + /usr/lib/ssh/sshd-auth.pam.
|
||||||
|
# Without this service file Linux-PAM falls back to a nonexistent
|
||||||
|
# /etc/pam.d/other and pam_start() aborts: password, keyboard-interactive
|
||||||
|
# and even the account check for public-key logins all fail. Keep the stack
|
||||||
|
# minimal so it works with or without elogind running.
|
||||||
|
auth required pam_unix.so
|
||||||
|
account required pam_unix.so
|
||||||
|
password required pam_unix.so
|
||||||
|
session optional pam_env.so
|
||||||
|
session required pam_unix.so
|
||||||
@@ -0,0 +1,346 @@
|
|||||||
|
# Global OpenRC configuration settings
|
||||||
|
|
||||||
|
# Set to "YES" if you want the rc system to try and start services
|
||||||
|
# in parallel for a slight speed improvement. When running in parallel we
|
||||||
|
# prefix the service output with its name as the output will get
|
||||||
|
# jumbled up.
|
||||||
|
# WARNING: whilst we have improved parallel, it can still potentially lock
|
||||||
|
# the boot process. Don't file bugs about this unless you can supply
|
||||||
|
# patches that fix it without breaking other things!
|
||||||
|
#rc_parallel="NO"
|
||||||
|
|
||||||
|
# Set rc_interactive to "YES" and you'll be able to press the I key during
|
||||||
|
# boot so you can choose to start specific services. Set to "NO" to disable
|
||||||
|
# this feature. This feature is automatically disabled if rc_parallel is
|
||||||
|
# set to YES.
|
||||||
|
#rc_interactive="YES"
|
||||||
|
|
||||||
|
# Set to "NO" if you don't want pam_openrc autostarting user services. This
|
||||||
|
# effectively disables the pam module, without the need of removing it from
|
||||||
|
# the pam configuration files.
|
||||||
|
#rc_autostart_user="YES"
|
||||||
|
|
||||||
|
# If we need to drop to a shell, you can specify it here.
|
||||||
|
# If not specified we use $SHELL, otherwise the one specified in /etc/passwd,
|
||||||
|
# otherwise /bin/sh
|
||||||
|
# Linux users could specify /sbin/sulogin
|
||||||
|
#rc_shell=/bin/sh
|
||||||
|
|
||||||
|
# Do we allow any started service in the runlevel to satisfy the dependency
|
||||||
|
# or do we want all of them regardless of state? For example, if net.eth0
|
||||||
|
# and net.eth1 are in the default runlevel then with rc_depend_strict="NO"
|
||||||
|
# both will be started, but services that depend on 'net' will work if either
|
||||||
|
# one comes up. With rc_depend_strict="YES" we would require them both to
|
||||||
|
# come up.
|
||||||
|
#rc_depend_strict="YES"
|
||||||
|
|
||||||
|
# rc_hotplug controls which services we allow to be hotplugged.
|
||||||
|
# A hotplugged service is one started by a dynamic dev manager when a matching
|
||||||
|
# hardware device is found.
|
||||||
|
# Hotplugged services appear in the "hotplugged" runlevel.
|
||||||
|
# If rc_hotplug is set to any value, we compare the name of this service
|
||||||
|
# to every pattern in the value, from left to right, and we allow the
|
||||||
|
# service to be hotplugged if it matches a pattern, or if it matches no
|
||||||
|
# patterns. Patterns can include shell wildcards.
|
||||||
|
# To disable services from being hotplugged, prefix patterns with "!".
|
||||||
|
#If rc_hotplug is not set or is empty, all hotplugging is disabled.
|
||||||
|
# Example - rc_hotplug="net.wlan !net.*"
|
||||||
|
# This allows net.wlan and any service not matching net.* to be hotplugged.
|
||||||
|
# Example - rc_hotplug="!net.*"
|
||||||
|
# This allows services that do not match "net.*" to be hotplugged.
|
||||||
|
|
||||||
|
# rc_logger launches a logging daemon to log the entire rc process to
|
||||||
|
# /var/log/rc.log
|
||||||
|
# NOTE: Linux systems require the devfs service to be started before
|
||||||
|
# logging can take place and as such cannot log the sysinit runlevel.
|
||||||
|
#rc_logger="NO"
|
||||||
|
|
||||||
|
# Through rc_log_path you can specify a custom log file.
|
||||||
|
# The default value is: /var/log/rc.log
|
||||||
|
#rc_log_path="/var/log/rc.log"
|
||||||
|
|
||||||
|
# If you want verbose output for OpenRC, set this to yes. If you want
|
||||||
|
# verbose output for service foo only, set it to yes in /etc/conf.d/foo.
|
||||||
|
#rc_verbose=no
|
||||||
|
|
||||||
|
# By default we filter the environment for our running scripts. To allow other
|
||||||
|
# variables through, add them here. Use a * to allow all variables through.
|
||||||
|
#rc_env_allow="VAR1 VAR2"
|
||||||
|
|
||||||
|
# By default we assume that all daemons will start correctly.
|
||||||
|
# However, some do not - a classic example is that they fork and return 0 AND
|
||||||
|
# then child barfs on a configuration error. Or the daemon has a bug and the
|
||||||
|
# child crashes. You can set the number of milliseconds start-stop-daemon
|
||||||
|
# waits to check that the daemon is still running after starting here.
|
||||||
|
# The default is 0 - no checking.
|
||||||
|
#rc_start_wait=100
|
||||||
|
|
||||||
|
# rc_nostop is a list of services which will not stop when changing runlevels.
|
||||||
|
# This still allows the service itself to be stopped when called directly.
|
||||||
|
#rc_nostop=""
|
||||||
|
|
||||||
|
# rc will attempt to start crashed services by default.
|
||||||
|
# However, it will not stop them by default as that could bring down other
|
||||||
|
# critical services.
|
||||||
|
#rc_crashed_stop=NO
|
||||||
|
#rc_crashed_start=YES
|
||||||
|
|
||||||
|
# Set rc_nocolor to yes if you do not want colors displayed in OpenRC
|
||||||
|
# output.
|
||||||
|
#rc_nocolor=NO
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# MISC CONFIGURATION VARIABLES
|
||||||
|
# There variables are shared between many init scripts
|
||||||
|
|
||||||
|
# Set unicode to NO to turn off unicode support for keyboards and screens.
|
||||||
|
#unicode="YES"
|
||||||
|
|
||||||
|
# This is how long fuser should wait for a remote server to respond. The
|
||||||
|
# default is 60 seconds, but it can be adjusted here.
|
||||||
|
#rc_fuser_timeout=60
|
||||||
|
|
||||||
|
# Below is the default list of network fstypes.
|
||||||
|
#
|
||||||
|
# afs ceph cifs coda davfs fuse fuse.glusterfs fuse.sshfs gfs glusterfs lustre
|
||||||
|
# ncpfs nfs nfs4 ocfs2 shfs smbfs
|
||||||
|
#
|
||||||
|
# If you would like to add to this list, you can do so by adding your
|
||||||
|
# own fstypes to the following variable.
|
||||||
|
#extra_net_fs_list=""
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# SERVICE CONFIGURATION VARIABLES
|
||||||
|
# These variables are documented here, but should be configured in
|
||||||
|
# /etc/conf.d/foo for service foo and NOT enabled here unless you
|
||||||
|
# really want them to work on a global basis.
|
||||||
|
# If your service has characters in its name which are not legal in
|
||||||
|
# shell variable names and you configure the variables for it in this
|
||||||
|
# file, those characters should be replaced with underscores in the
|
||||||
|
# variable names as shown below.
|
||||||
|
|
||||||
|
# Some daemons are started and stopped via start-stop-daemon.
|
||||||
|
# We can set some things on a per service basis, like the nicelevel.
|
||||||
|
# These need to be exported
|
||||||
|
#export SSD_NICELEVEL="0"
|
||||||
|
# Or the ionice level. The format is class[:data] , just like the
|
||||||
|
# --ionice start-stop-daemon parameter.
|
||||||
|
#export SSD_IONICELEVEL="0:0"
|
||||||
|
# Or the OOM score adjustment.
|
||||||
|
#export SSD_OOM_SCORE_ADJ="0"
|
||||||
|
|
||||||
|
# Pass ulimit parameters
|
||||||
|
# If you are using bash in POSIX mode for your shell, note that the
|
||||||
|
# ulimit command uses a block size of 512 bytes for the -c and -f
|
||||||
|
# options
|
||||||
|
#rc_ulimit="-u 30"
|
||||||
|
|
||||||
|
# It's possible to define extra dependencies for services like so
|
||||||
|
#rc_config="/etc/foo"
|
||||||
|
#rc_need="openvpn"
|
||||||
|
#rc_use="net.eth0"
|
||||||
|
#rc_after="clock"
|
||||||
|
#rc_before="local"
|
||||||
|
#rc_provide="!net"
|
||||||
|
|
||||||
|
# You can also enable the above commands here for each service. Below is an
|
||||||
|
# example for service foo.
|
||||||
|
#rc_foo_config="/etc/foo"
|
||||||
|
#rc_foo_need="openvpn"
|
||||||
|
#rc_foo_after="clock"
|
||||||
|
|
||||||
|
# Below is an example for service foo-bar. Note that the '-' is illegal
|
||||||
|
# in a shell variable name, so we convert it to an underscore.
|
||||||
|
# example for service foo-bar.
|
||||||
|
#rc_foo_bar_config="/etc/foo-bar"
|
||||||
|
#rc_foo_bar_need="openvpn"
|
||||||
|
#rc_foo_bar_after="clock"
|
||||||
|
|
||||||
|
# You can also remove dependencies.
|
||||||
|
# This is mainly used for saying which services do NOT provide net.
|
||||||
|
#rc_net_tap0_provide="!net"
|
||||||
|
|
||||||
|
# This is the subsystem type.
|
||||||
|
# It is used to match against keywords set by the keyword call in the
|
||||||
|
# depend function of service scripts.
|
||||||
|
#
|
||||||
|
# It should be set to the value representing the environment this file is
|
||||||
|
# PRESENTLY in, not the virtualization the environment is capable of.
|
||||||
|
# If it is commented out, automatic detection will be used.
|
||||||
|
#
|
||||||
|
# The list below shows all possible settings as well as the host
|
||||||
|
# operating systems where they can be used and autodetected.
|
||||||
|
#
|
||||||
|
# "" - nothing special
|
||||||
|
# "docker" - Docker container manager (Linux)
|
||||||
|
# "podman" - Podman container manager (Linux)
|
||||||
|
# "jail" - Jail (DragonflyBSD or FreeBSD)
|
||||||
|
# "lxc" - Linux Containers
|
||||||
|
# "openvz" - Linux OpenVZ
|
||||||
|
# "prefix" - Prefix
|
||||||
|
# "rkt" - CoreOS container management system (Linux)
|
||||||
|
# "subhurd" - Hurd subhurds (to be checked)
|
||||||
|
# "systemd-nspawn" - Container created by systemd-nspawn (Linux)
|
||||||
|
# "uml" - Usermode Linux
|
||||||
|
# "vserver" - Linux vserver
|
||||||
|
# "xen0" - Xen0 Domain (Linux and NetBSD)
|
||||||
|
# "xenU" - XenU Domain (Linux and NetBSD)
|
||||||
|
#rc_sys=""
|
||||||
|
|
||||||
|
# if you use openrc-init, which is currently only available on Linux,
|
||||||
|
# this is the default runlevel to activate after "sysinit" and "boot"
|
||||||
|
# when booting.
|
||||||
|
#rc_default_runlevel="default"
|
||||||
|
|
||||||
|
# on Linux and Hurd, this is the number of ttys allocated for logins
|
||||||
|
# It is used in the consolefont, keymaps, numlock and termencoding
|
||||||
|
# service scripts.
|
||||||
|
rc_tty_number=12
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# LINUX CGROUPS RESOURCE MANAGEMENT
|
||||||
|
|
||||||
|
# This sets the mode used to mount cgroups.
|
||||||
|
# "hybrid" mounts cgroups version 2 on /sys/fs/cgroup/unified and
|
||||||
|
# cgroups version 1 on /sys/fs/cgroup.
|
||||||
|
# "legacy" mounts cgroups version 1 on /sys/fs/cgroup
|
||||||
|
# "unified" mounts cgroups version 2 on /sys/fs/cgroup
|
||||||
|
#rc_cgroup_mode="unified"
|
||||||
|
|
||||||
|
# This is a list of controllers which should be enabled for cgroups version 2
|
||||||
|
# when hybrid mode is being used.
|
||||||
|
# Controllers listed here will not be available for cgroups version 1.
|
||||||
|
#rc_cgroup_controllers=""
|
||||||
|
|
||||||
|
# This variable contains the cgroups version 2 settings for your services.
|
||||||
|
# If this is set in this file, the settings will apply to all services.
|
||||||
|
# If you want different settings for each service, place the settings in
|
||||||
|
# /etc/conf.d/foo for service foo.
|
||||||
|
# The format is to specify the setting and value followed by a newline.
|
||||||
|
# Multiple settings and values can be specified.
|
||||||
|
# For example, you would use this to set the maximum memory and maximum
|
||||||
|
# number of pids for a service.
|
||||||
|
#rc_cgroup_settings="
|
||||||
|
#memory.max 10485760
|
||||||
|
#pids.max max
|
||||||
|
#"
|
||||||
|
#
|
||||||
|
# For more information about the adjustments that can be made with
|
||||||
|
# cgroups version 2, see Documentation/cgroups-v2.txt in the linux kernel
|
||||||
|
# source tree.
|
||||||
|
#rc_cgroup_settings=""
|
||||||
|
|
||||||
|
# This switch controls whether or not cgroups version 1 controllers are
|
||||||
|
# individually mounted under
|
||||||
|
# /sys/fs/cgroup in hybrid or legacy mode.
|
||||||
|
#rc_controller_cgroups="YES"
|
||||||
|
|
||||||
|
# The following setting turns on the memory.use_hierarchy setting in the
|
||||||
|
# root memory cgroup for cgroups v1.
|
||||||
|
# It must be set to yes in this file if you want this functionality.
|
||||||
|
#rc_cgroup_memory_use_hierarchy="NO"
|
||||||
|
|
||||||
|
# The following settings allow you to set up values for the cgroups version 1
|
||||||
|
# controllers for your services.
|
||||||
|
# They can be set in this file;, however, if you do this, the settings
|
||||||
|
# will apply to all of your services.
|
||||||
|
# If you want different settings for each service, place the settings in
|
||||||
|
# /etc/conf.d/foo for service foo.
|
||||||
|
# The format is to specify the names of the settings followed by their
|
||||||
|
# values. Each variable can hold multiple settings.
|
||||||
|
# For example, you would use this to set the cpu.shares setting in the
|
||||||
|
# cpu controller to 512 for your service.
|
||||||
|
# rc_cgroup_cpu="
|
||||||
|
# cpu.shares 512
|
||||||
|
# "
|
||||||
|
#
|
||||||
|
# For more information about the adjustments that can be made with
|
||||||
|
# cgroups version 1, see Documentation/cgroups-v1/* in the linux kernel
|
||||||
|
# source tree.
|
||||||
|
|
||||||
|
# Set the blkio controller settings for this service.
|
||||||
|
#rc_cgroup_blkio=""
|
||||||
|
|
||||||
|
# Set the cpu controller settings for this service.
|
||||||
|
#rc_cgroup_cpu=""
|
||||||
|
|
||||||
|
# Add this service to the cpuacct controller (any value means yes).
|
||||||
|
#rc_cgroup_cpuacct=""
|
||||||
|
|
||||||
|
# Set the cpuset controller settings for this service.
|
||||||
|
#rc_cgroup_cpuset=""
|
||||||
|
|
||||||
|
# Set the devices controller settings for this service.
|
||||||
|
#rc_cgroup_devices=""
|
||||||
|
|
||||||
|
# Set the hugetlb controller settings for this service.
|
||||||
|
#rc_cgroup_hugetlb=""
|
||||||
|
|
||||||
|
# Set the memory controller settings for this service.
|
||||||
|
#rc_cgroup_memory=""
|
||||||
|
|
||||||
|
# Set the net_cls controller settings for this service.
|
||||||
|
#rc_cgroup_net_cls=""
|
||||||
|
|
||||||
|
# Set the net_prio controller settings for this service.
|
||||||
|
#rc_cgroup_net_prio=""
|
||||||
|
|
||||||
|
# Set the pids controller settings for this service.
|
||||||
|
#rc_cgroup_pids=""
|
||||||
|
|
||||||
|
# Set this to YES if you want all of the processes in a service's cgroup
|
||||||
|
# killed when the service is stopped or restarted.
|
||||||
|
# Be aware that setting this to yes means all of a service's
|
||||||
|
# child processes will be killed. Keep this in mind if you set this to
|
||||||
|
# yes here instead of for the individual services in
|
||||||
|
# /etc/conf.d/<service>.
|
||||||
|
# To perform this cleanup manually for a stopped service, you can
|
||||||
|
# execute cgroup_cleanup with /etc/init.d/<service> cgroup_cleanup or
|
||||||
|
# rc-service <service> cgroup_cleanup.
|
||||||
|
# If the kernel includes support for cgroup2's cgroup.kill, this is used
|
||||||
|
# to reliably teardown the cgroup.
|
||||||
|
# If this fails, the process followed in this cleanup is the following:
|
||||||
|
# 1. send stopsig (sigterm if it isn't set) to all processes left in the
|
||||||
|
# cgroup immediately followed by sigcont.
|
||||||
|
# 2. Send sighup to all processes in the cgroup if rc_send_sighup is
|
||||||
|
# yes.
|
||||||
|
# 3. delay for rc_timeout_stopsec seconds.
|
||||||
|
# 4. send sigkill to all processes in the cgroup unless disabled by
|
||||||
|
# setting rc_send_sigkill to no.
|
||||||
|
# rc_cgroup_cleanup="NO"
|
||||||
|
|
||||||
|
# If this is yes, we will send sighup to the processes in the cgroup
|
||||||
|
# immediately after stopsig and sigcont.
|
||||||
|
#rc_send_sighup="NO"
|
||||||
|
|
||||||
|
# This is the amount of time in seconds that we delay after sending sigcont
|
||||||
|
# and optionally sighup, before we optionally send sigkill to all
|
||||||
|
# processes in the # cgroup.
|
||||||
|
# The default is 90 seconds.
|
||||||
|
#rc_timeout_stopsec="90"
|
||||||
|
|
||||||
|
# If this is set to no, we do not send sigkill to all processes in the
|
||||||
|
# cgroup.
|
||||||
|
#rc_send_sigkill="YES"
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# SUPERVISE DAEMON CONFIGURATION VARIABLES
|
||||||
|
# These variables sets more reasonable defaults for supervise-daemon(8).
|
||||||
|
# They may be overriden on a per service basis.
|
||||||
|
|
||||||
|
# Wait this number of seconds before restarting a daemon after it crashes.
|
||||||
|
respawn_delay=2
|
||||||
|
|
||||||
|
# Sets the maximum number of times a daemon will be respawned during a respawn
|
||||||
|
# period. If a daemon dies more than this number of times during a respawn
|
||||||
|
# period, supervise-daemon(8) will give up trying to respawn it and exit.
|
||||||
|
# 0 means unlimited.
|
||||||
|
respawn_max=5
|
||||||
|
|
||||||
|
# Sets the length in seconds of a respawn period.
|
||||||
|
respawn_period=1800
|
||||||
|
|
||||||
|
# Bananarchy starts independent OpenRC services in parallel. The stock local
|
||||||
|
# service is patched to avoid "after *", which deadlocks with rc_parallel=YES.
|
||||||
|
# X startup is also bounded by etc/conf.d/udev-settle.
|
||||||
|
rc_parallel="YES"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/etc/init.d/bananarchy-cover-display
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/etc/init.d/bananarchy-lid
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/etc/init.d/bananarchy-sshd-debug
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/etc/init.d/bananarchy-volume-keys
|
||||||
@@ -124,6 +124,16 @@ fi
|
|||||||
# long-lived "nmcli device monitor" poller is started at idle. Disable the
|
# long-lived "nmcli device monitor" poller is started at idle. Disable the
|
||||||
# superd unit too, in case an older session enabled it.
|
# superd unit too, in case an older session enabled it.
|
||||||
superctl disable sxmo_networkmonitor >/dev/null 2>&1 || true
|
superctl disable sxmo_networkmonitor >/dev/null 2>&1 || true
|
||||||
|
superctl stop sxmo_networkmonitor >/dev/null 2>&1 || true
|
||||||
|
bananarchy_kill_matches() {
|
||||||
|
pattern="$1"
|
||||||
|
for pid in $(ps | awk -v p="$pattern" 'index($0, p) && $0 !~ /awk/ {print $1}'); do
|
||||||
|
[ "$pid" = "$$" ] && continue
|
||||||
|
kill "$pid" >/dev/null 2>&1 || true
|
||||||
|
done
|
||||||
|
}
|
||||||
|
bananarchy_kill_matches "nmcli device monitor"
|
||||||
|
bananarchy_kill_matches "sxmo_networkmonitor.sh"
|
||||||
|
|
||||||
# The daemon that display notifications popup messages
|
# The daemon that display notifications popup messages
|
||||||
superctl start sxmo_notificationmonitor
|
superctl start sxmo_notificationmonitor
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Bananarchy: the documented "user / 147147" USB SSH login must work.
|
||||||
|
# The stock sshd_config only ships these as commented defaults and the
|
||||||
|
# postmarketOS policy drop-in enables PAM, so state them explicitly.
|
||||||
|
PasswordAuthentication yes
|
||||||
|
KbdInteractiveAuthentication yes
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# USB-only diagnostic SSH listener. Uses the non-PAM /usr/sbin/sshd (this
|
||||||
|
# file deliberately contains no UsePAM directive, which that binary rejects)
|
||||||
|
# so a broken PAM stack can never lock the developer out of the phone.
|
||||||
|
Port 2222
|
||||||
|
ListenAddress 172.16.42.1:2222
|
||||||
|
HostKey /etc/ssh/ssh_host_ed25519_key
|
||||||
|
PidFile /run/sshd-debug.pid
|
||||||
|
PermitRootLogin yes
|
||||||
|
PasswordAuthentication yes
|
||||||
|
KbdInteractiveAuthentication no
|
||||||
|
PubkeyAuthentication yes
|
||||||
|
AuthorizedKeysFile .ssh/authorized_keys
|
||||||
|
PermitEmptyPasswords no
|
||||||
|
UseDNS no
|
||||||
|
AllowTcpForwarding no
|
||||||
|
GatewayPorts no
|
||||||
|
X11Forwarding no
|
||||||
|
Subsystem sftp internal-sftp
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# Let the user session drive the Nokia 2720 Flip external panel.
|
||||||
|
# The daemon itself runs as root, but xcover and the Sxmo hooks talk to it
|
||||||
|
# over /run/bananarchy/cover.sock (mode 0660, group user).
|
||||||
|
SUBSYSTEM=="graphics", KERNEL=="fb1", GROUP="video", MODE="0660"
|
||||||
|
SUBSYSTEM=="spidev", KERNEL=="spidev*", GROUP="video", MODE="0660"
|
||||||
|
SUBSYSTEM=="gpio", KERNEL=="gpiochip*", GROUP="video", MODE="0660"
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Input event nodes must carry the seat tag so elogind can hand them to the
|
||||||
|
# non-root X server through TakeDevice. Without it Xorg enumerates zero
|
||||||
|
# physical devices and the keypad appears completely dead. udev must be
|
||||||
|
# running in the sysinit runlevel for any rule to take effect.
|
||||||
|
SUBSYSTEM=="input", KERNEL=="event*", TAG+="seat", GROUP="input", MODE="0660"
|
||||||
@@ -119,8 +119,20 @@ if [ -z "$SXMO_NO_MODEM" ] && command -v ModemManager > /dev/null; then
|
|||||||
sxmo_wakelock.sh lock sxmo_modem_warming_up 120s
|
sxmo_wakelock.sh lock sxmo_modem_warming_up 120s
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# It watch network changes and update the status bar icon by example
|
# Network status changes are event-driven through the NetworkManager
|
||||||
superctl start sxmo_networkmonitor
|
# dispatcher 30-bananarchy-network-status.sh. Keep the old nmcli device
|
||||||
|
# monitor poller stopped.
|
||||||
|
superctl disable sxmo_networkmonitor >/dev/null 2>&1 || true
|
||||||
|
superctl stop sxmo_networkmonitor >/dev/null 2>&1 || true
|
||||||
|
bananarchy_kill_matches() {
|
||||||
|
pattern="$1"
|
||||||
|
for pid in $(ps | awk -v p="$pattern" 'index($0, p) && $0 !~ /awk/ {print $1}'); do
|
||||||
|
[ "$pid" = "$$" ] && continue
|
||||||
|
kill "$pid" >/dev/null 2>&1 || true
|
||||||
|
done
|
||||||
|
}
|
||||||
|
bananarchy_kill_matches "nmcli device monitor"
|
||||||
|
bananarchy_kill_matches "sxmo_networkmonitor.sh"
|
||||||
|
|
||||||
# The daemon that display notifications popup messages
|
# The daemon that display notifications popup messages
|
||||||
superctl start sxmo_notificationmonitor
|
superctl start sxmo_notificationmonitor
|
||||||
|
|||||||
Binary file not shown.
@@ -0,0 +1,41 @@
|
|||||||
|
# Nokia 2720 Flip (nokia-beatles) 1.3-inch 240x240 external GC9305 panel.
|
||||||
|
#
|
||||||
|
# Derived from the KaiOS 3.10 downstream DTS in the archived postmarketOS
|
||||||
|
# linux-nokia-beatles package (0004-dts-adaptations.patch):
|
||||||
|
# spi_gc9305_v2_qvga_ext_cmd, qcom,mdss-spi-on-command:
|
||||||
|
# fe, ef, 3a 05, 35 00, 2a 00 00 00 ef, 2b 00 00 00 ef, 2c,
|
||||||
|
# delay 120, 11, 29, 2c
|
||||||
|
# qcom,mdss-spi-panel-width = 240, height = 240, bpp = 16.
|
||||||
|
#
|
||||||
|
# The register/gamma block below is the one already proven on this device's
|
||||||
|
# internal GC9305 panel (nokia,beatles-gc9305-panel.txt); the two column/page
|
||||||
|
# windows are set to 0..239 for the square cover panel. The blob is consumed
|
||||||
|
# by panel-mipi-dbi-spi (kernel) or by bananarchy-coverd's spidev backend.
|
||||||
|
#
|
||||||
|
# This init sequence is derived from vendor sources but has NOT yet been
|
||||||
|
# verified on 2720 Flip hardware; see NOKIA-2720-FLIP.md.
|
||||||
|
|
||||||
|
command 0xfe
|
||||||
|
command 0xef
|
||||||
|
command 0x36 0x00 # MADCTL
|
||||||
|
command 0x3a 0x55 # 65K 16-bit RGB565
|
||||||
|
command 0x35 0x00 # TE v-blanking
|
||||||
|
command 0xb2 0x0c 0x0c 0x00 0x33 0x33 # porch setting
|
||||||
|
command 0xb7 0x75 # gate control VGH/VGL
|
||||||
|
command 0xbb 0x34 # Vcoms
|
||||||
|
command 0xc0 0x2c # LCM control
|
||||||
|
command 0xc2 0x01 # VDV/VRH enable
|
||||||
|
command 0xc3 0x0d # VRH set
|
||||||
|
command 0xc4 0x20 # VDV set
|
||||||
|
command 0xc6 0xef # frame rate
|
||||||
|
command 0x44 0x00 0x00 # tearing scan line
|
||||||
|
command 0xd0 0xa4 0xa1 # power control 1
|
||||||
|
command 0xe0 0xd0 0x02 0x09 0x0d 0x0e 0x19 0x30 0x51 0x43 0x09 0x14 0x13 0x18 0x21
|
||||||
|
command 0xe1 0xd0 0x02 0x09 0x0d 0x0d 0x18 0x32 0x46 0x42 0x09 0x13 0x13 0x17 0x21
|
||||||
|
command 0x2a 0x00 0x00 0x00 0xef # column address 0..239
|
||||||
|
command 0x2b 0x00 0x00 0x00 0xef # page address 0..239
|
||||||
|
command 0x2c # memory write
|
||||||
|
command 0x11 # sleep out
|
||||||
|
delay 120
|
||||||
|
command 0x29 # display on
|
||||||
|
command 0x2c
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Symlink
+1
@@ -0,0 +1 @@
|
|||||||
|
/bin/busybox
|
||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Bridge Sxmo hooks to the cover display daemon. Safe no-op on non-flip
|
||||||
|
# devices and when the daemon is not running.
|
||||||
|
set -u
|
||||||
|
EVENT="${1:-refresh}"
|
||||||
|
shift 2>/dev/null || true
|
||||||
|
[ "$(cat /usr/share/bananarchy/lid-profile 2>/dev/null)" = "flip" ] || exit 0
|
||||||
|
case "$EVENT" in
|
||||||
|
notification)
|
||||||
|
/usr/bin/bananarchy-coverctl NOTIFY "Notification" >/dev/null 2>&1 || true
|
||||||
|
;;
|
||||||
|
ring)
|
||||||
|
/usr/bin/bananarchy-coverctl CALL incoming "${1:--}" "-" >/dev/null 2>&1 || true
|
||||||
|
;;
|
||||||
|
missed)
|
||||||
|
/usr/bin/bananarchy-coverctl CALL missed "${1:--}" "-" >/dev/null 2>&1 || true
|
||||||
|
;;
|
||||||
|
call|active)
|
||||||
|
/usr/bin/bananarchy-coverctl CALL active "${1:--}" "-" >/dev/null 2>&1 || true
|
||||||
|
;;
|
||||||
|
hangup|ended)
|
||||||
|
/usr/bin/bananarchy-coverctl CALL none "-" "-" >/dev/null 2>&1 || true
|
||||||
|
;;
|
||||||
|
sms)
|
||||||
|
/usr/bin/bananarchy-coverctl SMS "${1:-1}" >/dev/null 2>&1 || true
|
||||||
|
;;
|
||||||
|
screenoff)
|
||||||
|
/usr/bin/bananarchy-coverctl REFRESH >/dev/null 2>&1 || true
|
||||||
|
;;
|
||||||
|
wake|refresh|theme)
|
||||||
|
/usr/bin/bananarchy-coverctl RELOAD_THEME >/dev/null 2>&1 || true
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
/usr/bin/bananarchy-coverctl REFRESH >/dev/null 2>&1 || true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
exit 0
|
||||||
Executable
BIN
Binary file not shown.
Executable
+4
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Publish a notification on the 2720 Flip cover display via the daemon IPC.
|
||||||
|
set -eu
|
||||||
|
exec /usr/bin/bananarchy-coverctl -s /run/bananarchy/cover.sock NOTIFY "$*"
|
||||||
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
+71
@@ -0,0 +1,71 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Collect everything needed to diagnose an unresponsive 2720 Flip keypad.
|
||||||
|
# Writes a compact report to stdout (redirect it to a file to keep it).
|
||||||
|
set -u
|
||||||
|
echo "=== bananarchy keypad diagnostics $(date) ==="
|
||||||
|
echo
|
||||||
|
echo "--- kernel ---"
|
||||||
|
uname -a
|
||||||
|
echo
|
||||||
|
echo "--- input devices ---"
|
||||||
|
cat /proc/bus/input/devices 2>/dev/null || echo "(no /proc/bus/input/devices)"
|
||||||
|
echo
|
||||||
|
echo "--- input event nodes ---"
|
||||||
|
ls -l /dev/input/event* 2>/dev/null || echo "(no event nodes)"
|
||||||
|
echo
|
||||||
|
echo "--- udev tags ---"
|
||||||
|
for dev in /dev/input/event*; do
|
||||||
|
[ -e "$dev" ] || continue
|
||||||
|
name=$(udevadm info --query=property --name="$dev" 2>/dev/null | grep '^NAME=' | head -1)
|
||||||
|
tags=$(udevadm info --query=property --name="$dev" 2>/dev/null | grep -E '^ID_INPUT(_KEY|_KEYBOARD|_SWITCH)?=' | tr '\n' ' ')
|
||||||
|
echo "$dev ${name:-NAME=} $tags"
|
||||||
|
done
|
||||||
|
echo
|
||||||
|
echo "--- switch state (SW_LID / SW_KEYPAD_SLIDE) ---"
|
||||||
|
for dev in /dev/input/event*; do
|
||||||
|
[ -e "$dev" ] || continue
|
||||||
|
sw=$(udevadm info --query=property --name="$dev" 2>/dev/null | grep -c 'ID_INPUT_SWITCH=1')
|
||||||
|
[ "$sw" = "0" ] && continue
|
||||||
|
printf '%s: ' "$dev"
|
||||||
|
evtest --query "$dev" EV_SW SW_LID 2>/dev/null || echo "(evtest unavailable)"
|
||||||
|
done
|
||||||
|
echo
|
||||||
|
echo "--- kernel messages ---"
|
||||||
|
dmesg 2>/dev/null | grep -iE 'keypad|matrix|gpio-keys|input:|libinput' | tail -40 || echo "(dmesg unavailable)"
|
||||||
|
echo
|
||||||
|
echo "--- X input devices ---"
|
||||||
|
if command -v libinput >/dev/null 2>&1; then
|
||||||
|
DISPLAY=${DISPLAY:-:0} libinput list-devices 2>&1 | head -60
|
||||||
|
else
|
||||||
|
echo "(libinput CLI unavailable)"
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
echo "--- Xorg log ---"
|
||||||
|
grep -iE 'keypad|input|libinput|Ignoring|no devices' /var/log/Xorg.0.log 2>/dev/null | tail -40 || echo "(no Xorg log)"
|
||||||
|
echo
|
||||||
|
echo "--- raw event probe (5 s, press keys now) ---"
|
||||||
|
keypad_dev=""
|
||||||
|
for dev in /dev/input/event*; do
|
||||||
|
[ -e "$dev" ] || continue
|
||||||
|
name=$(udevadm info --query=property --name="$dev" 2>/dev/null | grep '^NAME=' | head -1)
|
||||||
|
case "$name" in *keypad*) keypad_dev="$dev" ;; esac
|
||||||
|
done
|
||||||
|
if [ -n "$keypad_dev" ] && command -v evtest >/dev/null 2>&1; then
|
||||||
|
timeout 5 evtest "$keypad_dev" 2>&1 | head -30
|
||||||
|
else
|
||||||
|
echo "keypad device: ${keypad_dev:-not found}; evtest: $(command -v evtest || echo missing)"
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
echo "--- volume keys ---"
|
||||||
|
echo "XKB: $(DISPLAY=${DISPLAY:-:0} xkbcomp :0 - 2>/dev/null | grep -c XF86AudioRaiseVolume) XF86AudioRaiseVolume bindings"
|
||||||
|
for dev in /dev/input/event*; do
|
||||||
|
[ -e "$dev" ] || continue
|
||||||
|
name=$(udevadm info --query=property --name="$dev" 2>/dev/null | grep '^NAME=' | head -1)
|
||||||
|
case "$name" in *gpio-keys*|*resin*) echo "$dev $name (KEY_VOLUMEUP / KEY_VOLUMEDOWN)" ;; esac
|
||||||
|
done
|
||||||
|
echo "logical volume: $(sxmo_audio.sh vol get 2>/dev/null)"
|
||||||
|
if command -v wpctl >/dev/null 2>&1; then
|
||||||
|
sink=$(wpctl status 2>/dev/null | sed -n '/Sinks:/,/Sources:/p' | sed -n 's/^[^0-9]*\([0-9][0-9]*\)\..*/\1/p' | head -n 1)
|
||||||
|
[ -n "$sink" ] && echo "pipewire sink $sink: $(wpctl get-volume "$sink" 2>/dev/null)"
|
||||||
|
fi
|
||||||
|
echo "=== end ==="
|
||||||
Executable
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -69,8 +69,30 @@ rm -f "$XDG_RUNTIME_DIR/sxmo.led.lock" "$XDG_RUNTIME_DIR"/sxmo_bat_state_* 2>/de
|
|||||||
# of idle blanking, or /etc/bananarchy-no-deep-standby to opt out of suspend.
|
# of idle blanking, or /etc/bananarchy-no-deep-standby to opt out of suspend.
|
||||||
rm -f "$XDG_CACHE_HOME/sxmo/sxmo.nosuspend"
|
rm -f "$XDG_CACHE_HOME/sxmo/sxmo.nosuspend"
|
||||||
[ -n "${DBUS_SESSION_BUS_ADDRESS:-}" ] && printf "%s\n" "$DBUS_SESSION_BUS_ADDRESS" > "$XDG_RUNTIME_DIR/dbus.bus"
|
[ -n "${DBUS_SESSION_BUS_ADDRESS:-}" ] && printf "%s\n" "$DBUS_SESSION_BUS_ADDRESS" > "$XDG_RUNTIME_DIR/dbus.bus"
|
||||||
|
# A flip phone that boots open must start unlocked with a live keypad. The
|
||||||
|
# root lid daemon publishes the debounced hall state before tinydm starts;
|
||||||
|
# default to open if that file is unavailable so X never stalls on xlocker.
|
||||||
|
_lid_state="open"
|
||||||
|
if [ "$(cat /usr/share/bananarchy/lid-profile 2>/dev/null)" = "flip" ]; then
|
||||||
|
_lid_wait=0
|
||||||
|
while [ "$_lid_wait" -lt 20 ] && [ ! -r /run/bananarchy/lid-state ]; do
|
||||||
|
sleep 0.1
|
||||||
|
_lid_wait=$((_lid_wait + 1))
|
||||||
|
done
|
||||||
|
if [ -r /run/bananarchy/lid-state ]; then
|
||||||
|
read -r _lid_state < /run/bananarchy/lid-state 2>/dev/null || _lid_state="open"
|
||||||
|
fi
|
||||||
|
if [ "$_lid_state" = "closed" ]; then
|
||||||
printf "1\n" > /tmp/bananarchy_screen_locked
|
printf "1\n" > /tmp/bananarchy_screen_locked
|
||||||
printf "lock\n" > "$XDG_RUNTIME_DIR/sxmo.state"
|
printf "screenoff\n" > "$SXMO_STATE"
|
||||||
|
else
|
||||||
|
rm -f /tmp/bananarchy_screen_locked
|
||||||
|
printf "unlock\n" > "$SXMO_STATE"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
printf "1\n" > /tmp/bananarchy_screen_locked
|
||||||
|
printf "lock\n" > "$SXMO_STATE"
|
||||||
|
fi
|
||||||
|
|
||||||
_init_bl=""
|
_init_bl=""
|
||||||
if [ -r "$XDG_CONFIG_HOME/sxmo/brightness" ]; then
|
if [ -r "$XDG_CONFIG_HOME/sxmo/brightness" ]; then
|
||||||
@@ -93,6 +115,11 @@ elif [ -r /tmp/sxmo_saved_kbd_brightness ]; then
|
|||||||
fi
|
fi
|
||||||
printf "%s\n" "${_init_kbd:-255}" > /tmp/sxmo_saved_kbd_brightness
|
printf "%s\n" "${_init_kbd:-255}" > /tmp/sxmo_saved_kbd_brightness
|
||||||
printf "%s\n" "${_init_kbd:-255}" > /sys/class/leds/white:kbd_backlight/brightness 2>/dev/null || true
|
printf "%s\n" "${_init_kbd:-255}" > /sys/class/leds/white:kbd_backlight/brightness 2>/dev/null || true
|
||||||
|
if [ "$_lid_state" = "closed" ]; then
|
||||||
|
printf "0\n" > /sys/class/backlight/backlight/brightness 2>/dev/null || true
|
||||||
|
printf "0\n" > /sys/class/leds/white:kbd_backlight/brightness 2>/dev/null || true
|
||||||
|
printf "4\n" > /sys/class/backlight/backlight/bl_power 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
XORG_BIN="Xorg"
|
XORG_BIN="Xorg"
|
||||||
[ -x /tmp/x11/usr/bin/Xorg ] && XORG_BIN="/tmp/x11/usr/bin/Xorg"
|
[ -x /tmp/x11/usr/bin/Xorg ] && XORG_BIN="/tmp/x11/usr/bin/Xorg"
|
||||||
@@ -124,6 +151,7 @@ else
|
|||||||
xset +dpms >/dev/null 2>&1 || true
|
xset +dpms >/dev/null 2>&1 || true
|
||||||
xset dpms 0 0 0 >/dev/null 2>&1 || true
|
xset dpms 0 0 0 >/dev/null 2>&1 || true
|
||||||
fi
|
fi
|
||||||
|
xset r rate 180 30 >/dev/null 2>&1 || true
|
||||||
|
|
||||||
SESSION_PID_FILE="/tmp/bananarchy-x11-session.pid"
|
SESSION_PID_FILE="/tmp/bananarchy-x11-session.pid"
|
||||||
printf "%s\n" "$$" > "$SESSION_PID_FILE"
|
printf "%s\n" "$$" > "$SESSION_PID_FILE"
|
||||||
@@ -140,6 +168,36 @@ if [ -f /tmp/bananarchy_ext_logging ]; then
|
|||||||
else
|
else
|
||||||
( sxmo_hook_start.sh >/dev/null 2>&1 </dev/null & )
|
( sxmo_hook_start.sh >/dev/null 2>&1 </dev/null & )
|
||||||
fi
|
fi
|
||||||
|
if [ "$(cat /usr/share/bananarchy/lid-profile 2>/dev/null)" = "flip" ] && \
|
||||||
|
[ "$_lid_state" != "closed" ]; then
|
||||||
|
# Some Sxmo start hooks still map xlocker from a transient boot lock file.
|
||||||
|
# Keep the first 10 s of an open-lid boot unlocked, then stop interfering.
|
||||||
|
(
|
||||||
|
i=0
|
||||||
|
while [ "$i" -lt 20 ]; do
|
||||||
|
[ "$(cat /run/bananarchy/lid-state 2>/dev/null)" = "closed" ] && break
|
||||||
|
rm -f /tmp/bananarchy_screen_locked
|
||||||
|
printf "unlock\n" > "$SXMO_STATE"
|
||||||
|
if [ -p /tmp/dwm_plugin_locker.fifo ]; then
|
||||||
|
printf "CLOSE\n" > /tmp/dwm_plugin_locker.fifo 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
sleep 0.5
|
||||||
|
i=$((i + 1))
|
||||||
|
done
|
||||||
|
) &
|
||||||
|
fi
|
||||||
|
|
||||||
|
# A cold boot can leave the resident dmenu or xlocker plugin holding an X
|
||||||
|
# keyboard grab before the user sees the desktop. Release both once after
|
||||||
|
# dwm has started; do not keep a background poller alive.
|
||||||
|
(
|
||||||
|
sleep 3
|
||||||
|
/usr/bin/dwm-plugin dmenu close >/dev/null 2>&1 || true
|
||||||
|
if [ -p /tmp/dwm_plugin_locker.fifo ]; then
|
||||||
|
printf "CLOSE\n" > /tmp/dwm_plugin_locker.fifo 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
xdotool key --clearmodifiers Escape >/dev/null 2>&1 || true
|
||||||
|
) &
|
||||||
|
|
||||||
first_iter=1
|
first_iter=1
|
||||||
while [ "$(cat "$SESSION_PID_FILE" 2>/dev/null)" = "$$" ]; do
|
while [ "$(cat "$SESSION_PID_FILE" 2>/dev/null)" = "$$" ]; do
|
||||||
|
|||||||
Binary file not shown.
@@ -470,17 +470,39 @@ EOF
|
|||||||
if [ "$eff_pct" -gt 0 ]; then
|
if [ "$eff_pct" -gt 0 ]; then
|
||||||
printf "0\n" > /tmp/sxmo_pw_sink_muted 2>/dev/null || true
|
printf "0\n" > /tmp/sxmo_pw_sink_muted 2>/dev/null || true
|
||||||
pactl set-sink-mute @DEFAULT_SINK@ 0 >/dev/null 2>&1 || true
|
pactl set-sink-mute @DEFAULT_SINK@ 0 >/dev/null 2>&1 || true
|
||||||
if [ "$dev" = "Bluetooth" ]; then
|
bananarchy_set_sink_volume "$eff_pct"
|
||||||
pactl set-sink-volume @DEFAULT_SINK@ "${eff_pct}%" >/dev/null 2>&1 || true
|
|
||||||
else
|
|
||||||
pactl set-sink-volume @DEFAULT_SINK@ 100% >/dev/null 2>&1 || true
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
printf "1\n" > /tmp/sxmo_pw_sink_muted 2>/dev/null || true
|
printf "1\n" > /tmp/sxmo_pw_sink_muted 2>/dev/null || true
|
||||||
pactl set-sink-mute @DEFAULT_SINK@ 1 >/dev/null 2>&1 || true
|
pactl set-sink-mute @DEFAULT_SINK@ 1 >/dev/null 2>&1 || true
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Bananarchy: the MSM8905 mainline kernel exposes no ALSA card yet, so the
|
||||||
|
# amixer csets below are no-ops and PipeWire's null sink is the real output.
|
||||||
|
# @DEFAULT_SINK@ does not resolve when wireplumber has no default configured
|
||||||
|
# node, so resolve the first live sink id and set its volume directly.
|
||||||
|
bananarchy_set_sink_volume() {
|
||||||
|
pct="$1"
|
||||||
|
if [ -z "${XDG_RUNTIME_DIR:-}" ]; then
|
||||||
|
XDG_RUNTIME_DIR="/run/user/$(id -u)"
|
||||||
|
export XDG_RUNTIME_DIR
|
||||||
|
fi
|
||||||
|
if command -v wpctl >/dev/null 2>&1; then
|
||||||
|
sink="$(wpctl status 2>/dev/null | sed -n '/Sinks:/,/Sources:/p' \
|
||||||
|
| sed -n 's/^[^0-9]*\([0-9][0-9]*\)\..*/\1/p' | head -n 1)"
|
||||||
|
if [ -n "$sink" ]; then
|
||||||
|
wpctl set-volume "$sink" "${pct}%" >/dev/null 2>&1 || true
|
||||||
|
if [ "$pct" -le 0 ]; then
|
||||||
|
wpctl set-mute "$sink" 1 >/dev/null 2>&1 || true
|
||||||
|
else
|
||||||
|
wpctl set-mute "$sink" 0 >/dev/null 2>&1 || true
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
pactl set-sink-volume @DEFAULT_SINK@ "${pct}%" >/dev/null 2>&1 || true
|
||||||
|
}
|
||||||
|
|
||||||
apply_vol_out() {
|
apply_vol_out() {
|
||||||
dev="$(normalize_out_dev "${1:-$(fast_out_dev)}")"
|
dev="$(normalize_out_dev "${1:-$(fast_out_dev)}")"
|
||||||
pct="$(clamp_pct "${2:-$(read_dev_vol "$dev")}" 85)"
|
pct="$(clamp_pct "${2:-$(read_dev_vol "$dev")}" 85)"
|
||||||
@@ -568,13 +590,14 @@ EOF
|
|||||||
if [ "$pw_muted" != "0" ]; then
|
if [ "$pw_muted" != "0" ]; then
|
||||||
printf "0\n" > /tmp/sxmo_pw_sink_muted 2>/dev/null || true
|
printf "0\n" > /tmp/sxmo_pw_sink_muted 2>/dev/null || true
|
||||||
pactl set-sink-mute @DEFAULT_SINK@ 0 >/dev/null 2>&1 || true
|
pactl set-sink-mute @DEFAULT_SINK@ 0 >/dev/null 2>&1 || true
|
||||||
pactl set-sink-volume @DEFAULT_SINK@ 100% >/dev/null 2>&1 || true
|
|
||||||
fi
|
fi
|
||||||
|
bananarchy_set_sink_volume "$eff_pct"
|
||||||
else
|
else
|
||||||
if [ "$pw_muted" != "1" ]; then
|
if [ "$pw_muted" != "1" ]; then
|
||||||
printf "1\n" > /tmp/sxmo_pw_sink_muted 2>/dev/null || true
|
printf "1\n" > /tmp/sxmo_pw_sink_muted 2>/dev/null || true
|
||||||
pactl set-sink-mute @DEFAULT_SINK@ 1 >/dev/null 2>&1 || true
|
pactl set-sink-mute @DEFAULT_SINK@ 1 >/dev/null 2>&1 || true
|
||||||
fi
|
fi
|
||||||
|
bananarchy_set_sink_volume 0
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -849,7 +872,23 @@ volset() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# A direct evdev volume daemon and the X11 binding can both react to one
|
||||||
|
# physical key press. Collapse calls that arrive within 300 ms so the volume
|
||||||
|
# only steps once per press.
|
||||||
|
bananarchy_vol_debounce() {
|
||||||
|
# Timestamp based, no background subshell: a stale lock directory could
|
||||||
|
# otherwise block every future volume step forever.
|
||||||
|
now="$(awk '{printf "%d", $1 * 100}' /proc/uptime 2>/dev/null || printf 0)"
|
||||||
|
last="$(cat /tmp/bananarchy_vol_step 2>/dev/null || printf 0)"
|
||||||
|
[ -n "$now" ] || now=0
|
||||||
|
[ -n "$last" ] || last=0
|
||||||
|
[ $((now - last)) -lt 30 ] && return 1
|
||||||
|
printf '%s\n' "$now" > /tmp/bananarchy_vol_step 2>/dev/null || true
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
volup() {
|
volup() {
|
||||||
|
bananarchy_vol_debounce || return 0
|
||||||
step="${1:-5}"
|
step="${1:-5}"
|
||||||
target_dev="$(normalize_out_dev "${2:-$(fast_out_dev)}")"
|
target_dev="$(normalize_out_dev "${2:-$(fast_out_dev)}")"
|
||||||
cur="$(read_dev_vol "$target_dev")"
|
cur="$(read_dev_vol "$target_dev")"
|
||||||
@@ -859,6 +898,7 @@ volup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
voldown() {
|
voldown() {
|
||||||
|
bananarchy_vol_debounce || return 0
|
||||||
step="${1:-5}"
|
step="${1:-5}"
|
||||||
target_dev="$(normalize_out_dev "${2:-$(fast_out_dev)}")"
|
target_dev="$(normalize_out_dev "${2:-$(fast_out_dev)}")"
|
||||||
cur="$(read_dev_vol "$target_dev")"
|
cur="$(read_dev_vol "$target_dev")"
|
||||||
|
|||||||
Binary file not shown.
@@ -1,2 +1 @@
|
|||||||
earlycon
|
|
||||||
console=ttyMSM0,115200
|
console=ttyMSM0,115200
|
||||||
@@ -1,2 +1 @@
|
|||||||
earlycon
|
|
||||||
console=ttyMSM0,115200
|
console=ttyMSM0,115200
|
||||||
@@ -1,2 +1 @@
|
|||||||
earlycon
|
|
||||||
console=ttyMSM0,115200
|
console=ttyMSM0,115200
|
||||||
@@ -1,2 +1 @@
|
|||||||
earlycon
|
|
||||||
console=ttyMSM0,115200
|
console=ttyMSM0,115200
|
||||||
@@ -1,2 +1 @@
|
|||||||
earlycon
|
|
||||||
console=ttyMSM0,115200
|
console=ttyMSM0,115200
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# The 2720 Flip GPIO matrix keypad must be seen as a keyboard by Xorg's
|
||||||
|
# libinput backend even when udev's input_id builtin only reports EV_SW on
|
||||||
|
# the companion gpio-keys device. Force the tags and keep the device nodes
|
||||||
|
# readable by the "input" group (the X session runs as "user").
|
||||||
|
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="keypad", \
|
||||||
|
ENV{ID_INPUT}="1", ENV{ID_INPUT_KEY}="1", ENV{ID_INPUT_KEYBOARD}="1", \
|
||||||
|
GROUP="input", MODE="0660"
|
||||||
|
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="gpio-keys", \
|
||||||
|
ENV{ID_INPUT}="1", GROUP="input", MODE="0660"
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# Bind the GPIO matrix keypad explicitly. MatchIsKeyboard relies on udev's
|
||||||
|
# ID_INPUT_KEYBOARD tag, which can be missing on a matrix keypad whose key
|
||||||
|
# bitmask only contains phone-specific keycodes; MatchProduct alone still
|
||||||
|
# lets xf86-input-libinput enumerate the device's real EV_KEY capabilities.
|
||||||
|
Section "InputClass"
|
||||||
|
Identifier "Bananarchy matrix keypad"
|
||||||
|
MatchProduct "keypad"
|
||||||
|
MatchDevicePath "/dev/input/event*"
|
||||||
|
Driver "libinput"
|
||||||
|
Option "Ignore" "false"
|
||||||
|
Option "XkbRules" "evdev"
|
||||||
|
Option "XkbModel" "pc105"
|
||||||
|
Option "XkbLayout" "us"
|
||||||
|
EndSection
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
flip
|
||||||
@@ -132,6 +132,16 @@ fi
|
|||||||
# long-lived "nmcli device monitor" poller is started at idle. Disable the
|
# long-lived "nmcli device monitor" poller is started at idle. Disable the
|
||||||
# superd unit too, in case an older session enabled it.
|
# superd unit too, in case an older session enabled it.
|
||||||
superctl disable sxmo_networkmonitor >/dev/null 2>&1 || true
|
superctl disable sxmo_networkmonitor >/dev/null 2>&1 || true
|
||||||
|
superctl stop sxmo_networkmonitor >/dev/null 2>&1 || true
|
||||||
|
bananarchy_kill_matches() {
|
||||||
|
pattern="$1"
|
||||||
|
for pid in $(ps | awk -v p="$pattern" 'index($0, p) && $0 !~ /awk/ {print $1}'); do
|
||||||
|
[ "$pid" = "$$" ] && continue
|
||||||
|
kill "$pid" >/dev/null 2>&1 || true
|
||||||
|
done
|
||||||
|
}
|
||||||
|
bananarchy_kill_matches "nmcli device monitor"
|
||||||
|
bananarchy_kill_matches "sxmo_networkmonitor.sh"
|
||||||
|
|
||||||
# The daemon that display notifications popup messages
|
# The daemon that display notifications popup messages
|
||||||
superctl start sxmo_notificationmonitor
|
superctl start sxmo_notificationmonitor
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
--- a/devices/nokia-argon/qcom-msm8905-nokia-argon.dts 2026-10-18 12:03:41.241108254 +0300
|
# Bananarchy device tree derivation: nokia-beatles and nokia-coconut start
|
||||||
+++ b/devices/nokia-beatles/qcom-msm8905-nokia-beatles.dts 2026-10-18 12:03:41.241443705 +0300
|
# from the mainline qcom-msm8905-nokia-argon.dts. This patch is documentation
|
||||||
@@ -4,8 +4,8 @@
|
# of that derivation; the DTBs in images/ are compiled directly from the
|
||||||
|
# devices/*/qcom-*.dts files by scripts/build-kernel-audio.sh.
|
||||||
|
|
||||||
|
--- a/devices/nokia-argon/qcom-msm8905-nokia-argon.dts
|
||||||
|
+++ b/devices/nokia-beatles/qcom-msm8905-nokia-beatles.dts
|
||||||
|
@@ -4,10 +4,20 @@
|
||||||
#address-cells = <0x01>;
|
#address-cells = <0x01>;
|
||||||
#size-cells = <0x01>;
|
#size-cells = <0x01>;
|
||||||
interrupt-parent = <0x01>;
|
interrupt-parent = <0x01>;
|
||||||
@@ -10,8 +15,71 @@
|
|||||||
+ compatible = "nokia,beatles", "nokia,argon", "qcom,msm8905", "qcom,msm8909";
|
+ compatible = "nokia,beatles", "nokia,argon", "qcom,msm8905", "qcom,msm8909";
|
||||||
chassis-type = "handset";
|
chassis-type = "handset";
|
||||||
|
|
||||||
|
+ /* Qualcomm aboot selects an appended DTB by these IDs. All three values
|
||||||
|
+ * are copied verbatim from the MSM8905 QRD SKUB DTB (index 33) in the
|
||||||
|
+ * stock 2720 recovery image. Keep only that exact board-id pair: older
|
||||||
|
+ * aboot revisions inspect the first pair only, so adding lk2nd's
|
||||||
|
+ * 0x0b/0x100 variant makes the DTB look like a different board and the
|
||||||
|
+ * bootloader never jumps to the kernel. */
|
||||||
|
+ qcom,msm-id = <0x14b 0x00>;
|
||||||
|
+ qcom,board-id = <0x1000b 0x100>;
|
||||||
|
+ qcom,pmic-id = <0x1000d 0x00 0x00 0x00>;
|
||||||
|
+
|
||||||
aliases {
|
aliases {
|
||||||
@@ -1733,7 +1733,7 @@
|
mmc0 = "/soc@0/sdhci@7824000";
|
||||||
|
mmc1 = "/soc@0/sdhci@7864000";
|
||||||
|
@@ -195,9 +205,13 @@
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
+ /* Stock aboot rewrites /memory:reg from the SMEM RAM partition table.
|
||||||
|
+ * Keep the mainline node name (libfdt resolves /memory to it) but ship the
|
||||||
|
+ * real 512 MiB size as a fallback, so a bootloader that fails to patch the
|
||||||
|
+ * node still gives Linux usable RAM instead of a zero-sized memory bank. */
|
||||||
|
memory@80000000 {
|
||||||
|
device_type = "memory";
|
||||||
|
- reg = <0x80000000 0x00>;
|
||||||
|
+ reg = <0x80000000 0x20000000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
pmu {
|
||||||
|
@@ -1016,7 +1030,7 @@
|
||||||
|
};
|
||||||
|
|
||||||
|
matrix-keypad-col-default-state {
|
||||||
|
- pins = "gpio52", "gpio56", "gpio7", "gpio99", "gpio6";
|
||||||
|
+ pins = "gpio52", "gpio56", "gpio7", "gpio99", "gpio6", "gpio1";
|
||||||
|
function = "gpio";
|
||||||
|
drive-strength = <0x02>;
|
||||||
|
bias-disable;
|
||||||
|
@@ -1030,6 +1044,17 @@
|
||||||
|
bias-pull-down;
|
||||||
|
phandle = <0x6e>;
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+ /* External (cover) panel: TE gpio21, reset gpio23,
|
||||||
|
+ * SPI bus switch gpio13. Used by the cover-panel.dtsi
|
||||||
|
+ * fragment and by bananarchy-coverd's spidev backend. */
|
||||||
|
+ cover-panel-gpios-default-state {
|
||||||
|
+ pins = "gpio21", "gpio23", "gpio13";
|
||||||
|
+ function = "gpio";
|
||||||
|
+ drive-strength = <0x02>;
|
||||||
|
+ bias-pull-down;
|
||||||
|
+ phandle = <0x92>;
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
clock-controller@1800000 {
|
||||||
|
@@ -1150,7 +1175,7 @@
|
||||||
|
debounce = <0x3d09>;
|
||||||
|
bias-pull-up;
|
||||||
|
status = "okay";
|
||||||
|
- linux,code = <0x6c>;
|
||||||
|
+ linux,code = <0x72>; /* KEY_VOLUMEDOWN */
|
||||||
|
};
|
||||||
|
|
||||||
|
watchdog {
|
||||||
|
@@ -1838,7 +1863,7 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
display@0 {
|
display@0 {
|
||||||
@@ -20,8 +88,90 @@
|
|||||||
reg = <0x00>;
|
reg = <0x00>;
|
||||||
backlight = <0x6b>;
|
backlight = <0x6b>;
|
||||||
reset-gpios = <0x27 0x19 0x00>;
|
reset-gpios = <0x27 0x19 0x00>;
|
||||||
--- a/devices/nokia-argon/qcom-msm8905-nokia-argon.dts 2026-10-18 12:03:41.241108254 +0300
|
@@ -2287,30 +2312,36 @@
|
||||||
+++ b/devices/nokia-tough/qcom-msm8905-nokia-coconut.dts 2026-10-18 12:03:41.241598417 +0300
|
pinctrl-0 = <0x86 0x87>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
|
||||||
|
- key-up {
|
||||||
|
+ /* gpio90 is the side volume-up rocker on the 2720 Flip. */
|
||||||
|
+ key-volup {
|
||||||
|
wakeup-source;
|
||||||
|
gpios = <0x27 0x5a 0x01>;
|
||||||
|
- linux,code = <0x67>;
|
||||||
|
+ linux,code = <0x73>; /* KEY_VOLUMEUP -> XF86AudioRaiseVolume */
|
||||||
|
debounce-interval = <0x0f>;
|
||||||
|
linux,can-disable;
|
||||||
|
};
|
||||||
|
|
||||||
|
- key-back {
|
||||||
|
+ /* gpio98 is the red end/power key. */
|
||||||
|
+ key-end {
|
||||||
|
wakeup-source;
|
||||||
|
gpios = <0x27 0x62 0x01>;
|
||||||
|
- linux,code = <0x0e>;
|
||||||
|
+ linux,code = <0x74>; /* KEY_POWER -> XF86PowerOff */
|
||||||
|
debounce-interval = <0x0f>;
|
||||||
|
linux,can-disable;
|
||||||
|
};
|
||||||
|
|
||||||
|
- switch-lid-close {
|
||||||
|
+ /* gpio92: closed-lid hall sensor (EV_SW SW_LID = 1). */
|
||||||
|
+ hall-lid-closed {
|
||||||
|
wakeup-source;
|
||||||
|
gpios = <0x27 0x5c 0x01>;
|
||||||
|
linux,input-type = <0x05>;
|
||||||
|
linux,code = <0x00>;
|
||||||
|
};
|
||||||
|
|
||||||
|
- switch-lid-open {
|
||||||
|
+ /* gpio36: open-lid hall sensor (EV_SW SW_KEYPAD_SLIDE = 1),
|
||||||
|
+ * also wired to the internal/external panel SPI switch. */
|
||||||
|
+ hall-lid-open {
|
||||||
|
+ wakeup-source;
|
||||||
|
gpios = <0x27 0x24 0x01>;
|
||||||
|
linux,input-type = <0x05>;
|
||||||
|
linux,code = <0x0a>;
|
||||||
|
@@ -2325,8 +2356,36 @@
|
||||||
|
pinctrl-0 = <0x88 0x89>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
row-gpios = <0x27 0x61 0x01 0x27 0x60 0x01 0x27 0x5f 0x01 0x27 0x5e 0x01>;
|
||||||
|
- col-gpios = <0x27 0x34 0x01 0x27 0x38 0x01 0x27 0x07 0x01 0x27 0x63 0x01 0x27 0x06 0x01>;
|
||||||
|
- linux,keymap = <0x1bd 0x10002 0x20005 0x30008 0x4020a 0x1000069 0x1010003 0x1020006 0x1030009 0x104000b 0x20002b8 0x2010004 0x2020007 0x203000a 0x204020b 0x300001c 0x301006a 0x30202b9>;
|
||||||
|
+ col-gpios = <0x27 0x34 0x01 0x27 0x38 0x01 0x27 0x07 0x01 0x27 0x63 0x01 0x27 0x06 0x01 0x27 0x01 0x01>;
|
||||||
|
+ /* Physical matrix from the KaiOS downstream DTS (4 rows x 6 cols),
|
||||||
|
+ * mapped to the canonical keycodes Bananarchy's X11 stack binds:
|
||||||
|
+ * soft left -> KEY_COMPOSE (XKB 135, XK_Menu), soft right -> KEY_BACK
|
||||||
|
+ * (XKB 166, XF86Back), center -> KEY_ENTER, call -> KEY_PICKUP_PHONE.
|
||||||
|
+ * See X_KEYPAD_MAPPING.md and NOKIA-2720-FLIP.md. */
|
||||||
|
+ linux,keymap = <
|
||||||
|
+ 0x1bd /* (0,0) call KEY_PICKUP_PHONE */
|
||||||
|
+ 0x10002 /* (0,1) 1 */
|
||||||
|
+ 0x20005 /* (0,2) 4 */
|
||||||
|
+ 0x30008 /* (0,3) 7 */
|
||||||
|
+ 0x4020a /* (0,4) * KEY_NUMERIC_STAR */
|
||||||
|
+ 0x500d4 /* (0,5) extra KEY_CAMERA -> XF86WebCam */
|
||||||
|
+ 0x1000069 /* (1,0) D-pad left KEY_LEFT */
|
||||||
|
+ 0x1010003 /* (1,1) 2 */
|
||||||
|
+ 0x1020006 /* (1,2) 5 */
|
||||||
|
+ 0x1030009 /* (1,3) 8 */
|
||||||
|
+ 0x104000b /* (1,4) 0 */
|
||||||
|
+ 0x105000e /* (1,5) clear KEY_BACKSPACE */
|
||||||
|
+ 0x200007f /* (2,0) soft left KEY_COMPOSE -> XK_Menu */
|
||||||
|
+ 0x2010004 /* (2,1) 3 */
|
||||||
|
+ 0x2020007 /* (2,2) 6 */
|
||||||
|
+ 0x203000a /* (2,3) 9 */
|
||||||
|
+ 0x204020b /* (2,4) # KEY_NUMERIC_POUND */
|
||||||
|
+ 0x300001c /* (3,0) D-pad OK KEY_ENTER -> Return */
|
||||||
|
+ 0x301006a /* (3,1) D-pad right KEY_RIGHT */
|
||||||
|
+ 0x302009e /* (3,2) soft right KEY_BACK -> XF86Back */
|
||||||
|
+ 0x3030067 /* (3,3) D-pad up KEY_UP */
|
||||||
|
+ 0x304006c /* (3,4) D-pad down KEY_DOWN */
|
||||||
|
+ >;
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
--- a/devices/nokia-argon/qcom-msm8905-nokia-argon.dts
|
||||||
|
+++ b/devices/nokia-tough/qcom-msm8905-nokia-coconut.dts
|
||||||
@@ -4,8 +4,8 @@
|
@@ -4,8 +4,8 @@
|
||||||
#address-cells = <0x01>;
|
#address-cells = <0x01>;
|
||||||
#size-cells = <0x01>;
|
#size-cells = <0x01>;
|
||||||
@@ -33,7 +183,7 @@
|
|||||||
chassis-type = "handset";
|
chassis-type = "handset";
|
||||||
|
|
||||||
aliases {
|
aliases {
|
||||||
@@ -1733,7 +1733,7 @@
|
@@ -1838,7 +1838,7 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
display@0 {
|
display@0 {
|
||||||
@@ -42,3 +192,21 @@
|
|||||||
reg = <0x00>;
|
reg = <0x00>;
|
||||||
backlight = <0x6b>;
|
backlight = <0x6b>;
|
||||||
reset-gpios = <0x27 0x19 0x00>;
|
reset-gpios = <0x27 0x19 0x00>;
|
||||||
|
|
||||||
|
@@ -1886,6 +1911,15 @@
|
||||||
|
clock-frequency = "", "#(";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+ /* External (cover) GC9305 shares the QUP5 SPI lines.
|
||||||
|
+ * bananarchy-coverd drives gpio13 to route them to the cover
|
||||||
|
+ * panel, then talks to it through /dev/spidev0.1. spi-qup
|
||||||
|
+ * has 4 native chip selects and toggles the single physical
|
||||||
|
+ * CS line, so reg=1 gives the daemon a second logical device. */
|
||||||
|
+ spidev@1 {
|
||||||
|
+ compatible = "rohm,dh2228fv";
|
||||||
|
+ reg = <0x01>;
|
||||||
|
+ spi-max-frequency = <0x2faf080>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
};
|
||||||
@@ -2524,7 +2524,7 @@ CONFIG_SPI_QUP=y
|
|||||||
#
|
#
|
||||||
# SPI Multiplexer support
|
# SPI Multiplexer support
|
||||||
#
|
#
|
||||||
# CONFIG_SPI_MUX is not set
|
CONFIG_SPI_MUX=m
|
||||||
|
|
||||||
#
|
#
|
||||||
# SPI Protocol Masters
|
# SPI Protocol Masters
|
||||||
@@ -6070,6 +6070,17 @@ CONFIG_NVMEM_QCOM_QFPROM=y
|
|||||||
# CONFIG_FPGA is not set
|
# CONFIG_FPGA is not set
|
||||||
# CONFIG_FSI is not set
|
# CONFIG_FSI is not set
|
||||||
# CONFIG_TEE is not set
|
# CONFIG_TEE is not set
|
||||||
|
CONFIG_MULTIPLEXER=m
|
||||||
|
|
||||||
|
#
|
||||||
|
# Multiplexer drivers
|
||||||
|
#
|
||||||
|
# CONFIG_MUX_ADG792A is not set
|
||||||
|
# CONFIG_MUX_ADGS1408 is not set
|
||||||
|
CONFIG_MUX_GPIO=m
|
||||||
|
# CONFIG_MUX_MMIO is not set
|
||||||
|
# end of Multiplexer drivers
|
||||||
|
|
||||||
CONFIG_PM_OPP=y
|
CONFIG_PM_OPP=y
|
||||||
# CONFIG_SIOX is not set
|
# CONFIG_SIOX is not set
|
||||||
# CONFIG_SLIMBUS is not set
|
# CONFIG_SLIMBUS is not set
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Bridge Sxmo hooks to the cover display daemon. Safe no-op on non-flip
|
||||||
|
# devices and when the daemon is not running.
|
||||||
|
set -u
|
||||||
|
EVENT="${1:-refresh}"
|
||||||
|
shift 2>/dev/null || true
|
||||||
|
[ "$(cat /usr/share/bananarchy/lid-profile 2>/dev/null)" = "flip" ] || exit 0
|
||||||
|
case "$EVENT" in
|
||||||
|
notification)
|
||||||
|
/usr/bin/bananarchy-coverctl NOTIFY "Notification" >/dev/null 2>&1 || true
|
||||||
|
;;
|
||||||
|
ring)
|
||||||
|
/usr/bin/bananarchy-coverctl CALL incoming "${1:--}" "-" >/dev/null 2>&1 || true
|
||||||
|
;;
|
||||||
|
missed)
|
||||||
|
/usr/bin/bananarchy-coverctl CALL missed "${1:--}" "-" >/dev/null 2>&1 || true
|
||||||
|
;;
|
||||||
|
call|active)
|
||||||
|
/usr/bin/bananarchy-coverctl CALL active "${1:--}" "-" >/dev/null 2>&1 || true
|
||||||
|
;;
|
||||||
|
hangup|ended)
|
||||||
|
/usr/bin/bananarchy-coverctl CALL none "-" "-" >/dev/null 2>&1 || true
|
||||||
|
;;
|
||||||
|
sms)
|
||||||
|
/usr/bin/bananarchy-coverctl SMS "${1:-1}" >/dev/null 2>&1 || true
|
||||||
|
;;
|
||||||
|
screenoff)
|
||||||
|
/usr/bin/bananarchy-coverctl REFRESH >/dev/null 2>&1 || true
|
||||||
|
;;
|
||||||
|
wake|refresh|theme)
|
||||||
|
/usr/bin/bananarchy-coverctl RELOAD_THEME >/dev/null 2>&1 || true
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
/usr/bin/bananarchy-coverctl REFRESH >/dev/null 2>&1 || true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
exit 0
|
||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
@@ -45060,273 +45060,273 @@ c0d043bc D proc_uid_seq_operations
|
|||||||
c0d043cc D pidns_operations
|
c0d043cc D pidns_operations
|
||||||
c0d043ec D pidns_for_children_operations
|
c0d043ec D pidns_for_children_operations
|
||||||
c0d04414 D kernel_config_data
|
c0d04414 D kernel_config_data
|
||||||
c0d0e56f D kernel_config_data_end
|
c0d0e599 D kernel_config_data_end
|
||||||
c0d0e578 d config_gz_proc_ops
|
c0d0e5a4 d config_gz_proc_ops
|
||||||
c0d0e5e0 d __func__.10
|
c0d0e60c d __func__.10
|
||||||
c0d0e5ec d __func__.7
|
c0d0e618 d __func__.7
|
||||||
c0d0e5fc d __func__.5
|
c0d0e628 d __func__.5
|
||||||
c0d0e610 d __func__.3
|
c0d0e63c d __func__.3
|
||||||
c0d0e620 d audit_feature_names
|
c0d0e64c d audit_feature_names
|
||||||
c0d0e740 d audit_ops
|
c0d0e770 d audit_ops
|
||||||
c0d0e98c d audit_nfcfgs
|
c0d0e9bc d audit_nfcfgs
|
||||||
c0d0ea3c d ntp_name.0
|
c0d0ea6c d ntp_name.0
|
||||||
c0d0ea54 d audit_watch_fsnotify_ops
|
c0d0ea84 d audit_watch_fsnotify_ops
|
||||||
c0d0ea6c d audit_mark_fsnotify_ops
|
c0d0ea9c d audit_mark_fsnotify_ops
|
||||||
c0d0ea84 d audit_tree_ops
|
c0d0eab4 d audit_tree_ops
|
||||||
c0d0ea9c d kprobes_fops
|
c0d0eacc d kprobes_fops
|
||||||
c0d0eb20 d fops_kp
|
c0d0eb50 d fops_kp
|
||||||
c0d0eba4 d kprobe_blacklist_fops
|
c0d0ebd4 d kprobe_blacklist_fops
|
||||||
c0d0ec28 d kprobes_sops
|
c0d0ec58 d kprobes_sops
|
||||||
c0d0ec38 d kprobe_blacklist_sops
|
c0d0ec68 d kprobe_blacklist_sops
|
||||||
c0d0ec70 d seccomp_log_names
|
c0d0eca0 d seccomp_log_names
|
||||||
c0d0ecb8 d seccomp_notify_ops
|
c0d0ece8 d seccomp_notify_ops
|
||||||
c0d0ed3c d mode1_syscalls
|
c0d0ed6c d mode1_syscalls
|
||||||
c0d0ed50 d seccomp_actions_avail
|
c0d0ed80 d seccomp_actions_avail
|
||||||
c0d0ed90 d taskstats_ops
|
c0d0edc0 d taskstats_ops
|
||||||
c0d0edc8 d cgroupstats_cmd_get_policy
|
c0d0edf8 d cgroupstats_cmd_get_policy
|
||||||
c0d0edd8 d taskstats_cmd_get_policy
|
c0d0ee08 d taskstats_cmd_get_policy
|
||||||
c0d0ee0c d empty_hash
|
c0d0ee3c d empty_hash
|
||||||
c0d0ee24 d show_ftrace_seq_ops
|
c0d0ee54 d show_ftrace_seq_ops
|
||||||
c0d0ee34 d ftrace_graph_seq_ops
|
c0d0ee64 d ftrace_graph_seq_ops
|
||||||
c0d0ee44 d this_mod.0
|
c0d0ee74 d this_mod.0
|
||||||
c0d0ee54 d ftrace_filter_fops
|
c0d0ee84 d ftrace_filter_fops
|
||||||
c0d0eed8 d ftrace_notrace_fops
|
c0d0ef08 d ftrace_notrace_fops
|
||||||
c0d0ef5c d ftrace_no_pid_sops
|
c0d0ef8c d ftrace_no_pid_sops
|
||||||
c0d0ef6c d ftrace_pid_sops
|
c0d0ef9c d ftrace_pid_sops
|
||||||
c0d0ef7c d ftrace_pid_fops
|
c0d0efac d ftrace_pid_fops
|
||||||
c0d0f000 d ftrace_no_pid_fops
|
c0d0f030 d ftrace_no_pid_fops
|
||||||
c0d0f084 d ftrace_avail_fops
|
c0d0f0b4 d ftrace_avail_fops
|
||||||
c0d0f108 d ftrace_avail_addrs_fops
|
c0d0f138 d ftrace_avail_addrs_fops
|
||||||
c0d0f18c d ftrace_enabled_fops
|
c0d0f1bc d ftrace_enabled_fops
|
||||||
c0d0f210 d ftrace_touched_fops
|
c0d0f240 d ftrace_touched_fops
|
||||||
c0d0f294 d ftrace_graph_fops
|
c0d0f2c4 d ftrace_graph_fops
|
||||||
c0d0f318 d ftrace_graph_notrace_fops
|
c0d0f348 d ftrace_graph_notrace_fops
|
||||||
c0d0f39c d empty_buckets
|
c0d0f3cc d empty_buckets
|
||||||
c0d0f44c d rb_meta_seq_ops
|
c0d0f47c d rb_meta_seq_ops
|
||||||
c0d0f460 d trace_clocks
|
c0d0f490 d trace_clocks
|
||||||
c0d0f4cc d tracing_buffers_vmops
|
c0d0f4fc d tracing_buffers_vmops
|
||||||
c0d0f504 d buffer_pipe_buf_ops
|
c0d0f534 d buffer_pipe_buf_ops
|
||||||
c0d0f514 d trace_options_fops
|
c0d0f544 d trace_options_fops
|
||||||
c0d0f598 d show_traces_seq_ops
|
c0d0f5c8 d show_traces_seq_ops
|
||||||
c0d0f5a8 d tracing_err_log_seq_ops
|
c0d0f5d8 d tracing_err_log_seq_ops
|
||||||
c0d0f5b8 d show_traces_fops
|
c0d0f5e8 d show_traces_fops
|
||||||
c0d0f63c d set_tracer_fops
|
c0d0f66c d set_tracer_fops
|
||||||
c0d0f6c0 d tracing_cpumask_fops
|
c0d0f6f0 d tracing_cpumask_fops
|
||||||
c0d0f744 d tracing_iter_fops
|
c0d0f774 d tracing_iter_fops
|
||||||
c0d0f7c8 d tracing_fops
|
c0d0f7f8 d tracing_fops
|
||||||
c0d0f84c d tracing_pipe_fops
|
c0d0f87c d tracing_pipe_fops
|
||||||
c0d0f8d0 d tracing_entries_fops
|
c0d0f900 d tracing_entries_fops
|
||||||
c0d0f954 d tracing_total_entries_fops
|
c0d0f984 d tracing_total_entries_fops
|
||||||
c0d0f9d8 d tracing_free_buffer_fops
|
c0d0fa08 d tracing_free_buffer_fops
|
||||||
c0d0fa5c d tracing_mark_fops
|
c0d0fa8c d tracing_mark_fops
|
||||||
c0d0fae0 d tracing_mark_raw_fops
|
c0d0fb10 d tracing_mark_raw_fops
|
||||||
c0d0fb64 d trace_clock_fops
|
c0d0fb94 d trace_clock_fops
|
||||||
c0d0fbe8 d rb_simple_fops
|
c0d0fc18 d rb_simple_fops
|
||||||
c0d0fc6c d trace_time_stamp_mode_fops
|
c0d0fc9c d trace_time_stamp_mode_fops
|
||||||
c0d0fcf0 d buffer_percent_fops
|
c0d0fd20 d buffer_percent_fops
|
||||||
c0d0fd74 d buffer_subbuf_size_fops
|
c0d0fda4 d buffer_subbuf_size_fops
|
||||||
c0d0fdf8 d trace_options_core_fops
|
c0d0fe28 d trace_options_core_fops
|
||||||
c0d0fe7c d last_boot_fops
|
c0d0feac d last_boot_fops
|
||||||
c0d0ff00 d tracing_err_log_fops
|
c0d0ff30 d tracing_err_log_fops
|
||||||
c0d0ff84 d tracing_buffers_fops
|
c0d0ffb4 d tracing_buffers_fops
|
||||||
c0d10008 d tracing_stats_fops
|
c0d10038 d tracing_stats_fops
|
||||||
c0d1008c d tracing_buffer_meta_fops
|
c0d100bc d tracing_buffer_meta_fops
|
||||||
c0d10110 d tracer_seq_ops
|
c0d10140 d tracer_seq_ops
|
||||||
c0d10120 d space.8
|
c0d10150 d space.8
|
||||||
c0d10130 d tracing_thresh_fops
|
c0d10160 d tracing_thresh_fops
|
||||||
c0d101b4 d tracing_readme_fops
|
c0d101e4 d tracing_readme_fops
|
||||||
c0d10238 d tracing_dyn_info_fops
|
c0d10268 d tracing_dyn_info_fops
|
||||||
c0d102bc D trace_min_max_fops
|
c0d102ec D trace_min_max_fops
|
||||||
c0d10340 d readme_msg
|
c0d10370 d readme_msg
|
||||||
c0d11e60 d timerlat_lat_context
|
c0d11e90 d timerlat_lat_context
|
||||||
c0d11e6c d state_char.0
|
c0d11e9c d state_char.0
|
||||||
c0d11e78 d trace_stat_seq_ops
|
c0d11ea8 d trace_stat_seq_ops
|
||||||
c0d11e88 d tracing_stat_fops
|
c0d11eb8 d tracing_stat_fops
|
||||||
c0d11f0c d ftrace_formats_fops
|
c0d11f3c d ftrace_formats_fops
|
||||||
c0d11f90 d show_format_seq_ops
|
c0d11fc0 d show_format_seq_ops
|
||||||
c0d11fa0 d tracing_saved_tgids_seq_ops
|
c0d11fd0 d tracing_saved_tgids_seq_ops
|
||||||
c0d11fb0 d tracing_saved_cmdlines_seq_ops
|
c0d11fe0 d tracing_saved_cmdlines_seq_ops
|
||||||
c0d11fc0 D tracing_saved_cmdlines_size_fops
|
c0d11ff0 D tracing_saved_cmdlines_size_fops
|
||||||
c0d12044 D tracing_saved_cmdlines_fops
|
c0d12074 D tracing_saved_cmdlines_fops
|
||||||
c0d120c8 D tracing_saved_tgids_fops
|
c0d120f8 D tracing_saved_tgids_fops
|
||||||
c0d1214c d CSWTCH.34
|
c0d1217c d CSWTCH.34
|
||||||
c0d12170 d spaces.0
|
c0d121a0 d spaces.0
|
||||||
c0d12198 d graph_depth_fops
|
c0d121c8 d graph_depth_fops
|
||||||
c0d12234 d ftrace_subsystem_filter_fops
|
c0d12264 d ftrace_subsystem_filter_fops
|
||||||
c0d122b8 d ftrace_system_enable_fops
|
c0d122e8 d ftrace_system_enable_fops
|
||||||
c0d1233c d ftrace_tr_enable_fops
|
c0d1236c d ftrace_tr_enable_fops
|
||||||
c0d123c0 d ftrace_show_header_page_fops
|
c0d123f0 d ftrace_show_header_page_fops
|
||||||
c0d12444 d ftrace_show_header_event_fops
|
c0d12474 d ftrace_show_header_event_fops
|
||||||
c0d124c8 d trace_format_seq_ops
|
c0d124f8 d trace_format_seq_ops
|
||||||
c0d124d8 d ftrace_set_event_fops
|
c0d12508 d ftrace_set_event_fops
|
||||||
c0d1255c d ftrace_set_event_pid_fops
|
c0d1258c d ftrace_set_event_pid_fops
|
||||||
c0d125e0 d ftrace_set_event_notrace_pid_fops
|
c0d12610 d ftrace_set_event_notrace_pid_fops
|
||||||
c0d12664 d show_set_event_seq_ops
|
c0d12694 d show_set_event_seq_ops
|
||||||
c0d12674 d show_event_seq_ops
|
c0d126a4 d show_event_seq_ops
|
||||||
c0d12684 d show_set_no_pid_seq_ops
|
c0d126b4 d show_set_no_pid_seq_ops
|
||||||
c0d12694 d show_set_pid_seq_ops
|
c0d126c4 d show_set_pid_seq_ops
|
||||||
c0d126a4 d ftrace_event_format_fops
|
c0d126d4 d ftrace_event_format_fops
|
||||||
c0d12728 d ftrace_enable_fops
|
c0d12758 d ftrace_enable_fops
|
||||||
c0d127ac d ftrace_event_filter_fops
|
c0d127dc d ftrace_event_filter_fops
|
||||||
c0d12830 d ftrace_event_id_fops
|
c0d12860 d ftrace_event_id_fops
|
||||||
c0d128b4 d ftrace_avail_fops
|
c0d128e4 d ftrace_avail_fops
|
||||||
c0d12a20 d ops
|
c0d12a50 d ops
|
||||||
c0d12a44 d event_triggers_seq_ops
|
c0d12a74 d event_triggers_seq_ops
|
||||||
c0d12a54 D event_trigger_fops
|
c0d12a84 D event_trigger_fops
|
||||||
c0d12d50 d bpf_key_sig_kfunc_set
|
c0d12d80 d bpf_key_sig_kfunc_set
|
||||||
c0d12d5c d bpf_kprobe_multi_kfunc_set
|
c0d12d8c d bpf_kprobe_multi_kfunc_set
|
||||||
c0d12d68 D bpf_get_current_task_proto
|
c0d12d98 D bpf_get_current_task_proto
|
||||||
c0d12da4 D bpf_get_current_task_btf_proto
|
c0d12dd4 D bpf_get_current_task_btf_proto
|
||||||
c0d12de0 D bpf_task_pt_regs_proto
|
c0d12e10 D bpf_task_pt_regs_proto
|
||||||
c0d12e1c d bpf_perf_event_read_proto
|
c0d12e4c d bpf_perf_event_read_proto
|
||||||
c0d12e58 d bpf_trace_printk_proto
|
c0d12e88 d bpf_trace_printk_proto
|
||||||
c0d12e94 D bpf_probe_read_user_proto
|
c0d12ec4 D bpf_probe_read_user_proto
|
||||||
c0d12ed0 D bpf_probe_read_user_str_proto
|
c0d12f00 D bpf_probe_read_user_str_proto
|
||||||
c0d12f0c d bpf_probe_read_compat_str_proto
|
c0d12f3c d bpf_probe_read_compat_str_proto
|
||||||
c0d12f48 d bpf_probe_read_compat_proto
|
c0d12f78 d bpf_probe_read_compat_proto
|
||||||
c0d12f84 D bpf_probe_read_kernel_str_proto
|
c0d12fb4 D bpf_probe_read_kernel_str_proto
|
||||||
c0d12fc0 d bpf_send_signal_proto
|
c0d12ff0 d bpf_send_signal_proto
|
||||||
c0d12ffc d bpf_send_signal_thread_proto
|
c0d1302c d bpf_send_signal_thread_proto
|
||||||
c0d13038 d bpf_perf_event_read_value_proto
|
c0d13068 d bpf_perf_event_read_value_proto
|
||||||
c0d13074 D bpf_snprintf_btf_proto
|
c0d130a4 D bpf_snprintf_btf_proto
|
||||||
c0d130b0 d bpf_trace_vprintk_proto
|
c0d130e0 d bpf_trace_vprintk_proto
|
||||||
c0d130ec d bpf_get_func_ip_proto_tracing
|
c0d1311c d bpf_get_func_ip_proto_tracing
|
||||||
c0d13128 d bpf_get_branch_snapshot_proto
|
c0d13158 d bpf_get_branch_snapshot_proto
|
||||||
c0d13164 d bpf_probe_write_user_proto
|
c0d13194 d bpf_probe_write_user_proto
|
||||||
c0d131a0 D bpf_probe_read_kernel_proto
|
c0d131d0 D bpf_probe_read_kernel_proto
|
||||||
c0d131dc d __func__.2
|
c0d1320c d __func__.2
|
||||||
c0d131f4 d __func__.0
|
c0d13224 d __func__.0
|
||||||
c0d13210 d bpf_perf_event_output_proto
|
c0d13240 d bpf_perf_event_output_proto
|
||||||
c0d1324c d bpf_get_func_ip_proto_kprobe_multi
|
c0d1327c d bpf_get_func_ip_proto_kprobe_multi
|
||||||
c0d13288 d bpf_get_func_ip_proto_uprobe_multi
|
c0d132b8 d bpf_get_func_ip_proto_uprobe_multi
|
||||||
c0d132c4 d bpf_get_func_ip_proto_kprobe
|
c0d132f4 d bpf_get_func_ip_proto_kprobe
|
||||||
c0d13300 d bpf_get_attach_cookie_proto_kmulti
|
c0d13330 d bpf_get_attach_cookie_proto_kmulti
|
||||||
c0d1333c d bpf_get_attach_cookie_proto_umulti
|
c0d1336c d bpf_get_attach_cookie_proto_umulti
|
||||||
c0d13378 d bpf_get_attach_cookie_proto_trace
|
c0d133a8 d bpf_get_attach_cookie_proto_trace
|
||||||
c0d133b4 d bpf_perf_event_output_proto_tp
|
c0d133e4 d bpf_perf_event_output_proto_tp
|
||||||
c0d133f0 d bpf_get_stackid_proto_tp
|
c0d13420 d bpf_get_stackid_proto_tp
|
||||||
c0d1342c d bpf_get_stack_proto_tp
|
c0d1345c d bpf_get_stack_proto_tp
|
||||||
c0d13468 d bpf_perf_event_output_proto_raw_tp
|
c0d13498 d bpf_perf_event_output_proto_raw_tp
|
||||||
c0d134a4 d bpf_get_stackid_proto_raw_tp
|
c0d134d4 d bpf_get_stackid_proto_raw_tp
|
||||||
c0d134e0 d bpf_get_stack_proto_raw_tp
|
c0d13510 d bpf_get_stack_proto_raw_tp
|
||||||
c0d1351c d bpf_get_attach_cookie_proto_tracing
|
c0d1354c d bpf_get_attach_cookie_proto_tracing
|
||||||
c0d13558 d bpf_perf_prog_read_value_proto
|
c0d13588 d bpf_perf_prog_read_value_proto
|
||||||
c0d13594 d bpf_read_branch_records_proto
|
c0d135c4 d bpf_read_branch_records_proto
|
||||||
c0d135d0 d bpf_get_attach_cookie_proto_pe
|
c0d13600 d bpf_get_attach_cookie_proto_pe
|
||||||
c0d1360c d bpf_d_path_proto
|
c0d1363c d bpf_d_path_proto
|
||||||
c0d13648 d bpf_seq_write_proto
|
c0d13678 d bpf_seq_write_proto
|
||||||
c0d13684 d bpf_get_func_arg_cnt_proto
|
c0d136b4 d bpf_get_func_arg_cnt_proto
|
||||||
c0d136c0 d bpf_get_func_ret_proto
|
c0d136f0 d bpf_get_func_ret_proto
|
||||||
c0d136fc d bpf_get_func_arg_proto
|
c0d1372c d bpf_get_func_arg_proto
|
||||||
c0d13738 d bpf_seq_printf_btf_proto
|
c0d13768 d bpf_seq_printf_btf_proto
|
||||||
c0d13774 d bpf_seq_printf_proto
|
c0d137a4 d bpf_seq_printf_proto
|
||||||
c0d137b0 D perf_event_prog_ops
|
c0d137e0 D perf_event_prog_ops
|
||||||
c0d137b4 D perf_event_verifier_ops
|
c0d137e4 D perf_event_verifier_ops
|
||||||
c0d137d0 D raw_tracepoint_writable_prog_ops
|
c0d13800 D raw_tracepoint_writable_prog_ops
|
||||||
c0d137d4 D raw_tracepoint_writable_verifier_ops
|
c0d13804 D raw_tracepoint_writable_verifier_ops
|
||||||
c0d137f0 D tracing_prog_ops
|
c0d13820 D tracing_prog_ops
|
||||||
c0d137f4 D tracing_verifier_ops
|
c0d13824 D tracing_verifier_ops
|
||||||
c0d13810 D raw_tracepoint_prog_ops
|
c0d13840 D raw_tracepoint_prog_ops
|
||||||
c0d13814 D raw_tracepoint_verifier_ops
|
c0d13844 D raw_tracepoint_verifier_ops
|
||||||
c0d13830 D tracepoint_prog_ops
|
c0d13860 D tracepoint_prog_ops
|
||||||
c0d13834 D tracepoint_verifier_ops
|
c0d13864 D tracepoint_verifier_ops
|
||||||
c0d13850 D kprobe_prog_ops
|
c0d13880 D kprobe_prog_ops
|
||||||
c0d13854 D kprobe_verifier_ops
|
c0d13884 D kprobe_verifier_ops
|
||||||
c0d13870 d str__bpf_trace__trace_system_name
|
c0d138a0 d str__bpf_trace__trace_system_name
|
||||||
c0d138b0 d kprobe_events_ops
|
c0d138e0 d kprobe_events_ops
|
||||||
c0d13934 d kprobe_profile_ops
|
c0d13964 d kprobe_profile_ops
|
||||||
c0d139b8 d profile_seq_op
|
c0d139e8 d profile_seq_op
|
||||||
c0d139c8 d probes_seq_op
|
c0d139f8 d probes_seq_op
|
||||||
c0d139d8 d symbols.0
|
c0d13a08 d symbols.0
|
||||||
c0d139f8 d str__error_report__trace_system_name
|
c0d13a28 d str__error_report__trace_system_name
|
||||||
c0d13a08 d symbols.3
|
c0d13a38 d symbols.3
|
||||||
c0d13a50 d symbols.2
|
c0d13a80 d symbols.2
|
||||||
c0d13a70 d symbols.0
|
c0d13aa0 d symbols.0
|
||||||
c0d13a88 d symbols.1
|
c0d13ab8 d symbols.1
|
||||||
c0d13aa8 d str__power__trace_system_name
|
c0d13ad8 d str__power__trace_system_name
|
||||||
c0d13ab0 d symbols.0
|
c0d13ae0 d symbols.0
|
||||||
c0d13ae0 d str__rpm__trace_system_name
|
c0d13b10 d str__rpm__trace_system_name
|
||||||
c0d13ae4 d dynamic_events_ops
|
c0d13b14 d dynamic_events_ops
|
||||||
c0d13b68 d dyn_event_seq_op
|
c0d13b98 d dyn_event_seq_op
|
||||||
c0d13b98 d probe_fetch_types
|
c0d13bc8 d probe_fetch_types
|
||||||
c0d13d48 d CSWTCH.274
|
c0d13d78 d CSWTCH.274
|
||||||
c0d13d54 d CSWTCH.273
|
c0d13d84 d CSWTCH.273
|
||||||
c0d13d60 d reserved_field_names
|
c0d13d90 d reserved_field_names
|
||||||
c0d13d80 D print_type_format_string
|
c0d13db0 D print_type_format_string
|
||||||
c0d13d88 D print_type_format_symbol
|
c0d13db8 D print_type_format_symbol
|
||||||
c0d13d8c D print_type_format_char
|
c0d13dbc D print_type_format_char
|
||||||
c0d13d94 D print_type_format_x64
|
c0d13dc4 D print_type_format_x64
|
||||||
c0d13d9c D print_type_format_x32
|
c0d13dcc D print_type_format_x32
|
||||||
c0d13da4 D print_type_format_x16
|
c0d13dd4 D print_type_format_x16
|
||||||
c0d13dac D print_type_format_x8
|
c0d13ddc D print_type_format_x8
|
||||||
c0d13db4 D print_type_format_s64
|
c0d13de4 D print_type_format_s64
|
||||||
c0d13db8 D print_type_format_s32
|
c0d13de8 D print_type_format_s32
|
||||||
c0d13dbc D print_type_format_s16
|
c0d13dec D print_type_format_s16
|
||||||
c0d13dc0 D print_type_format_s8
|
c0d13df0 D print_type_format_s8
|
||||||
c0d13dc4 D print_type_format_u64
|
c0d13df4 D print_type_format_u64
|
||||||
c0d13dc8 D print_type_format_u32
|
c0d13df8 D print_type_format_u32
|
||||||
c0d13dcc D print_type_format_u16
|
c0d13dfc D print_type_format_u16
|
||||||
c0d13dd0 D print_type_format_u8
|
c0d13e00 D print_type_format_u8
|
||||||
c0d13df8 d uprobe_events_ops
|
c0d13e28 d uprobe_events_ops
|
||||||
c0d13e7c d uprobe_profile_ops
|
c0d13eac d uprobe_profile_ops
|
||||||
c0d13f00 d profile_seq_op
|
c0d13f30 d profile_seq_op
|
||||||
c0d13f10 d probes_seq_op
|
c0d13f40 d probes_seq_op
|
||||||
c0d13fbc d symbols.8
|
c0d13fec d symbols.8
|
||||||
c0d13ff4 d symbols.7
|
c0d14024 d symbols.7
|
||||||
c0d1402c d symbols.6
|
c0d1405c d symbols.6
|
||||||
c0d14064 d symbols.5
|
c0d14094 d symbols.5
|
||||||
c0d1409c d symbols.4
|
c0d140cc d symbols.4
|
||||||
c0d140d4 d symbols.3
|
c0d14104 d symbols.3
|
||||||
c0d1410c d symbols.2
|
c0d1413c d symbols.2
|
||||||
c0d1413c d symbols.1
|
c0d1416c d symbols.1
|
||||||
c0d1416c d symbols.0
|
c0d1419c d symbols.0
|
||||||
c0d141ac d public_insntable.10
|
c0d141dc d public_insntable.10
|
||||||
c0d142ac d str__xdp__trace_system_name
|
c0d142dc d str__xdp__trace_system_name
|
||||||
c0d142b0 V arena_map_ops
|
c0d142e0 V arena_map_ops
|
||||||
c0d1435c D bpf_tail_call_proto
|
c0d1438c D bpf_tail_call_proto
|
||||||
c0d14410 V bpf_seq_printf_btf_proto
|
c0d14440 V bpf_seq_printf_btf_proto
|
||||||
c0d14c18 d bpf_link_type_strs
|
c0d14c48 d bpf_link_type_strs
|
||||||
c0d14c54 d CSWTCH.401
|
c0d14c84 d CSWTCH.401
|
||||||
c0d14c8c d bpf_audit_str
|
c0d14cbc d bpf_audit_str
|
||||||
c0d14c94 d bpf_map_default_vmops
|
c0d14cc4 d bpf_map_default_vmops
|
||||||
c0d14ccc D bpf_map_offload_ops
|
c0d14cfc D bpf_map_offload_ops
|
||||||
c0d14d78 D bpf_map_fops
|
c0d14da8 D bpf_map_fops
|
||||||
c0d14dfc d bpf_link_fops_poll
|
c0d14e2c d bpf_link_fops_poll
|
||||||
c0d14e80 d bpf_link_fops
|
c0d14eb0 d bpf_link_fops
|
||||||
c0d14f04 D bpf_prog_fops
|
c0d14f34 D bpf_prog_fops
|
||||||
c0d14f88 d bpf_map_types
|
c0d14fb8 d bpf_map_types
|
||||||
c0d15010 d bpf_prog_types
|
c0d15040 d bpf_prog_types
|
||||||
c0d15094 d bpf_tracing_link_lops
|
c0d150c4 d bpf_tracing_link_lops
|
||||||
c0d150b8 d bpf_raw_tp_link_lops
|
c0d150e8 d bpf_raw_tp_link_lops
|
||||||
c0d150dc d bpf_perf_link_lops
|
c0d1510c d bpf_perf_link_lops
|
||||||
c0d15100 d bpf_stats_fops
|
c0d15130 d bpf_stats_fops
|
||||||
c0d15184 d bpf_sys_bpf_proto
|
c0d151b4 d bpf_sys_bpf_proto
|
||||||
c0d151c0 d bpf_sys_close_proto
|
c0d151f0 d bpf_sys_close_proto
|
||||||
c0d151fc d bpf_kallsyms_lookup_name_proto
|
c0d1522c d bpf_kallsyms_lookup_name_proto
|
||||||
c0d15238 D bpf_syscall_prog_ops
|
c0d15268 D bpf_syscall_prog_ops
|
||||||
c0d1523c D bpf_syscall_verifier_ops
|
c0d1526c D bpf_syscall_verifier_ops
|
||||||
c0d15dbc d reg2btf_ids
|
c0d15dec d reg2btf_ids
|
||||||
c0d15e14 d caller_saved
|
c0d15e44 d caller_saved
|
||||||
c0d15e2c d opcode_flip.0
|
c0d15e5c d opcode_flip.0
|
||||||
c0d15ee4 d compatible_reg_types
|
c0d15f14 d compatible_reg_types
|
||||||
c0d15f44 d mem_types
|
c0d15f74 d mem_types
|
||||||
c0d15f70 d bpf_verifier_ops
|
c0d15fa0 d bpf_verifier_ops
|
||||||
c0d16044 d dynptr_types
|
c0d16074 d dynptr_types
|
||||||
c0d16070 d kptr_xchg_dest_types
|
c0d160a0 d kptr_xchg_dest_types
|
||||||
c0d1609c d timer_types
|
c0d160cc d timer_types
|
||||||
c0d160c8 d const_str_ptr_types
|
c0d160f8 d const_str_ptr_types
|
||||||
c0d160f4 d stack_ptr_types
|
c0d16124 d stack_ptr_types
|
||||||
c0d16120 d func_ptr_types
|
c0d16150 d func_ptr_types
|
||||||
c0d1614c d percpu_btf_ptr_types
|
c0d1617c d percpu_btf_ptr_types
|
||||||
c0d16178 d btf_ptr_types
|
c0d161a8 d btf_ptr_types
|
||||||
c0d161a4 d const_map_ptr_types
|
c0d161d4 d const_map_ptr_types
|
||||||
c0d161d0 d ringbuf_mem_types
|
c0d16200 d ringbuf_mem_types
|
||||||
c0d161fc d context_types
|
c0d1622c d context_types
|
||||||
c0d16228 d scalar_types
|
c0d16258 d scalar_types
|
||||||
c0d16254 d fullsock_types
|
c0d16284 d fullsock_types
|
||||||
c0d16280 d spin_lock_types
|
c0d162b0 d spin_lock_types
|
||||||
c0d162ac d btf_id_sock_common_types
|
c0d162dc d btf_id_sock_common_types
|
||||||
c0d162d8 d sock_types
|
c0d16308 d sock_types
|
||||||
c0d16380 d bpf_map_iops
|
c0d16380 d bpf_map_iops
|
||||||
c0d16400 d bpf_link_iops
|
c0d16400 d bpf_link_iops
|
||||||
c0d16480 d bpf_prog_iops
|
c0d16480 d bpf_prog_iops
|
||||||
|
|||||||
Binary file not shown.
@@ -2524,7 +2524,7 @@ CONFIG_SPI_QUP=y
|
|||||||
#
|
#
|
||||||
# SPI Multiplexer support
|
# SPI Multiplexer support
|
||||||
#
|
#
|
||||||
# CONFIG_SPI_MUX is not set
|
CONFIG_SPI_MUX=m
|
||||||
|
|
||||||
#
|
#
|
||||||
# SPI Protocol Masters
|
# SPI Protocol Masters
|
||||||
@@ -6070,6 +6070,17 @@ CONFIG_NVMEM_QCOM_QFPROM=y
|
|||||||
# CONFIG_FPGA is not set
|
# CONFIG_FPGA is not set
|
||||||
# CONFIG_FSI is not set
|
# CONFIG_FSI is not set
|
||||||
# CONFIG_TEE is not set
|
# CONFIG_TEE is not set
|
||||||
|
CONFIG_MULTIPLEXER=m
|
||||||
|
|
||||||
|
#
|
||||||
|
# Multiplexer drivers
|
||||||
|
#
|
||||||
|
# CONFIG_MUX_ADG792A is not set
|
||||||
|
# CONFIG_MUX_ADGS1408 is not set
|
||||||
|
CONFIG_MUX_GPIO=m
|
||||||
|
# CONFIG_MUX_MMIO is not set
|
||||||
|
# end of Multiplexer drivers
|
||||||
|
|
||||||
CONFIG_PM_OPP=y
|
CONFIG_PM_OPP=y
|
||||||
# CONFIG_SIOX is not set
|
# CONFIG_SIOX is not set
|
||||||
# CONFIG_SLIMBUS is not set
|
# CONFIG_SLIMBUS is not set
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -3,14 +3,38 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
BA_TARGET="${1:-nokia-argon}"
|
BA_TARGET="${1:-nokia-argon}"
|
||||||
|
BA_REBUILD="${BA_REBUILD:-0}"
|
||||||
BA_VER="$(./scripts/version.sh --print)"
|
BA_VER="$(./scripts/version.sh --print)"
|
||||||
BA_CODENAME="$(./scripts/version.sh --print-codename)"
|
BA_CODENAME="$(./scripts/version.sh --print-codename)"
|
||||||
RELDIR="bananarchy-${BA_TARGET}-${BA_VER}-${BA_CODENAME}"
|
RELDIR="bananarchy-${BA_TARGET}-${BA_VER}-${BA_CODENAME}"
|
||||||
|
|
||||||
|
NEED_REBUILD=0
|
||||||
|
if [ ! -f "images/bananarchy-${BA_TARGET}.img" ]; then
|
||||||
|
NEED_REBUILD=1
|
||||||
|
fi
|
||||||
|
if [ "$BA_TARGET" = "nokia-beatles" ]; then
|
||||||
|
for f in images/boot-bananarchy-nokia-beatles.img \
|
||||||
|
images/boot-lk2nd-nokia-beatles-display.img; do
|
||||||
|
[ -f "$f" ] || NEED_REBUILD=1
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$BA_REBUILD" = "1" ] || [ "$NEED_REBUILD" = "1" ]; then
|
||||||
./rebuild-image.sh "$BA_TARGET" --mkinitfs
|
./rebuild-image.sh "$BA_TARGET" --mkinitfs
|
||||||
|
if [ "$BA_TARGET" = "nokia-beatles" ] && \
|
||||||
|
[ ! -f images/boot-lk2nd-nokia-beatles-display.img ]; then
|
||||||
|
./scripts/build-lk2nd-beatles.sh --only display
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p "$RELDIR"
|
mkdir -p "$RELDIR"
|
||||||
cp "images/bananarchy-${BA_TARGET}.img" "$RELDIR/"
|
cp "images/bananarchy-${BA_TARGET}.img" "$RELDIR/"
|
||||||
|
if [ "$BA_TARGET" = "nokia-beatles" ]; then
|
||||||
|
cp images/boot-bananarchy-nokia-beatles.img "$RELDIR/"
|
||||||
|
cp images/boot-lk2nd-nokia-beatles-display.img "$RELDIR/"
|
||||||
|
else
|
||||||
cp bootloader/lk2nd-msm8909.img "$RELDIR/"
|
cp bootloader/lk2nd-msm8909.img "$RELDIR/"
|
||||||
|
fi
|
||||||
zip -9r "${RELDIR}.zip" "$RELDIR"
|
zip -9r "${RELDIR}.zip" "$RELDIR"
|
||||||
rm -rf "$RELDIR"
|
rm -rf "$RELDIR"
|
||||||
echo "Release $BA_VER ($BA_CODENAME) for $BA_TARGET packed into ${RELDIR}.zip"
|
echo "Release $BA_VER ($BA_CODENAME) for $BA_TARGET packed into ${RELDIR}.zip"
|
||||||
+18
-2
@@ -92,11 +92,21 @@ ensure_prebuilt_artifacts() {
|
|||||||
[ ! -f "$BANANARCHY_DIR/prebuilt/kernel-6.12.1-msm8916/netfilter/xt_owner.ko.zst" ] || \
|
[ ! -f "$BANANARCHY_DIR/prebuilt/kernel-6.12.1-msm8916/netfilter/xt_owner.ko.zst" ] || \
|
||||||
[ ! -f "$BANANARCHY_DIR/prebuilt/kernel-6.12.1-msm8916/netfilter/nft_redir.ko.zst" ] || \
|
[ ! -f "$BANANARCHY_DIR/prebuilt/kernel-6.12.1-msm8916/netfilter/nft_redir.ko.zst" ] || \
|
||||||
[ ! -f "$BANANARCHY_DIR/prebuilt/kernel-6.12.1-msm8916/leds/leds-msm8905-torch.ko.zst" ] || \
|
[ ! -f "$BANANARCHY_DIR/prebuilt/kernel-6.12.1-msm8916/leds/leds-msm8905-torch.ko.zst" ] || \
|
||||||
[ ! -f "$BANANARCHY_DIR/prebuilt/kernel-6.12.1-msm8916/camera/msm8905-cam.ko.zst" ]; then
|
[ ! -f "$BANANARCHY_DIR/prebuilt/kernel-6.12.1-msm8916/camera/msm8905-cam.ko.zst" ] || \
|
||||||
|
[ ! -f "$BANANARCHY_DIR/prebuilt/kernel-6.12.1-msm8916/mux/mux-core.ko.zst" ] || \
|
||||||
|
[ ! -f "$BANANARCHY_DIR/prebuilt/kernel-6.12.1-msm8916/mux/mux-gpio.ko.zst" ] || \
|
||||||
|
[ ! -f "$BANANARCHY_DIR/prebuilt/kernel-6.12.1-msm8916/spi/spi-mux.ko.zst" ]; then
|
||||||
echo "[auto-deps] Missing prebuilt kernel modules or DTBs; running scripts/build-kernel-audio.sh..."
|
echo "[auto-deps] Missing prebuilt kernel modules or DTBs; running scripts/build-kernel-audio.sh..."
|
||||||
"$BANANARCHY_DIR/scripts/build-kernel-audio.sh"
|
"$BANANARCHY_DIR/scripts/build-kernel-audio.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -x "$BANANARCHY_DIR/prebuilt/bananarchy-daemons/usr/bin/bananarchy-lid" ] || \
|
||||||
|
[ ! -x "$BANANARCHY_DIR/prebuilt/bananarchy-daemons/usr/bin/bananarchy-cover-idle" ] || \
|
||||||
|
[ ! -x "$BANANARCHY_DIR/prebuilt/bananarchy-daemons/usr/bin/bananarchy-volume-keys" ]; then
|
||||||
|
echo "[auto-deps] Missing compiled idle daemons; running scripts/build-bananarchy-daemons.sh..."
|
||||||
|
"$BANANARCHY_DIR/scripts/build-bananarchy-daemons.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -f "$BANANARCHY_DIR/prebuilt/bantam/bantam" ]; then
|
if [ ! -f "$BANANARCHY_DIR/prebuilt/bantam/bantam" ]; then
|
||||||
echo "[auto-deps] Missing prebuilt bantam binary; running scripts/build-bantam.sh..."
|
echo "[auto-deps] Missing prebuilt bantam binary; running scripts/build-bantam.sh..."
|
||||||
"$BANANARCHY_DIR/scripts/build-bantam.sh"
|
"$BANANARCHY_DIR/scripts/build-bantam.sh"
|
||||||
@@ -392,6 +402,8 @@ EOF
|
|||||||
|
|
||||||
echo "[3/5] Creating ext2 boot (256 MiB) and ext4 root filesystems..."
|
echo "[3/5] Creating ext2 boot (256 MiB) and ext4 root filesystems..."
|
||||||
strip_build_residue
|
strip_build_residue
|
||||||
|
mkdir -p "$ROOTFS/sbin"
|
||||||
|
ln -sfn /bin/busybox "$ROOTFS/sbin/init"
|
||||||
APK_CACHE_LEFT="$(ls -A "$ROOTFS/var/cache/apk" 2>/dev/null || true)"
|
APK_CACHE_LEFT="$(ls -A "$ROOTFS/var/cache/apk" 2>/dev/null || true)"
|
||||||
APK_LOGS_LEFT="$(ls "$ROOTFS/var/log"/apk.log* 2>/dev/null || true)"
|
APK_LOGS_LEFT="$(ls "$ROOTFS/var/log"/apk.log* 2>/dev/null || true)"
|
||||||
if [ -n "$APK_CACHE_LEFT" ] || [ -n "$APK_LOGS_LEFT" ]; then
|
if [ -n "$APK_CACHE_LEFT" ] || [ -n "$APK_LOGS_LEFT" ]; then
|
||||||
@@ -429,7 +441,6 @@ EOF
|
|||||||
"/images/bananarchy-$TARGET_DEVICE.sparse.img" \
|
"/images/bananarchy-$TARGET_DEVICE.sparse.img" \
|
||||||
"/images/nokia-argon-sxmo.sparse.img" \
|
"/images/nokia-argon-sxmo.sparse.img" \
|
||||||
"/images/nokia-argon-sxmo.img" \
|
"/images/nokia-argon-sxmo.img" \
|
||||||
"/images/boot-bananarchy-$TARGET_DEVICE.img" \
|
|
||||||
"/images/boot-nokia-argon-sxmo.img"
|
"/images/boot-nokia-argon-sxmo.img"
|
||||||
truncate -s "${TOTAL_MB}M" "$RAW_IMG"
|
truncate -s "${TOTAL_MB}M" "$RAW_IMG"
|
||||||
|
|
||||||
@@ -448,6 +459,11 @@ SFEOF
|
|||||||
dd if="$ROOT_IMG" of="$RAW_IMG" bs=1M seek=$(( 1 + BOOT_MB )) conv=notrunc,sparse status=none
|
dd if="$ROOT_IMG" of="$RAW_IMG" bs=1M seek=$(( 1 + BOOT_MB )) conv=notrunc,sparse status=none
|
||||||
rm -f "$BOOT_IMG" "$ROOT_IMG"
|
rm -f "$BOOT_IMG" "$ROOT_IMG"
|
||||||
|
|
||||||
|
# Export the Android boot image separately. The 2720 Flip needs it in the
|
||||||
|
# 'recovery' partition (Volume Up boot) instead of lk2nd in 'boot'.
|
||||||
|
cp -a "$ROOTFS/boot/boot.img" "/images/boot-bananarchy-$TARGET_DEVICE.img"
|
||||||
|
echo "[+] Exported standalone boot image: /images/boot-bananarchy-$TARGET_DEVICE.img"
|
||||||
|
|
||||||
echo "[5/5] Restoring host user ownership on $ROOTFS for easy host editing..."
|
echo "[5/5] Restoring host user ownership on $ROOTFS for easy host editing..."
|
||||||
chown -R "$HOST_UID:$HOST_GID" "$ROOTFS" "/images"
|
chown -R "$HOST_UID:$HOST_GID" "$ROOTFS" "/images"
|
||||||
chmod -R u+rwX "$ROOTFS"
|
chmod -R u+rwX "$ROOTFS"
|
||||||
|
|||||||
@@ -87,10 +87,19 @@ if command -v docker >/dev/null 2>&1; then
|
|||||||
[ ! -f "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/netfilter/xt_owner.ko.zst" ] || \
|
[ ! -f "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/netfilter/xt_owner.ko.zst" ] || \
|
||||||
[ ! -f "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/netfilter/nft_redir.ko.zst" ] || \
|
[ ! -f "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/netfilter/nft_redir.ko.zst" ] || \
|
||||||
[ ! -f "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/leds/leds-msm8905-torch.ko.zst" ] || \
|
[ ! -f "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/leds/leds-msm8905-torch.ko.zst" ] || \
|
||||||
[ ! -f "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/camera/msm8905-cam.ko.zst" ]; then
|
[ ! -f "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/camera/msm8905-cam.ko.zst" ] || \
|
||||||
|
[ ! -f "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/mux/mux-core.ko.zst" ] || \
|
||||||
|
[ ! -f "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/mux/mux-gpio.ko.zst" ] || \
|
||||||
|
[ ! -f "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/spi/spi-mux.ko.zst" ]; then
|
||||||
echo " -> Missing prebuilt kernel modules or DTBs; running scripts/build-kernel-audio.sh..."
|
echo " -> Missing prebuilt kernel modules or DTBs; running scripts/build-kernel-audio.sh..."
|
||||||
"$BASE_DIR/scripts/build-kernel-audio.sh"
|
"$BASE_DIR/scripts/build-kernel-audio.sh"
|
||||||
fi
|
fi
|
||||||
|
if [ ! -x "$BASE_DIR/prebuilt/bananarchy-daemons/usr/bin/bananarchy-lid" ] || \
|
||||||
|
[ ! -x "$BASE_DIR/prebuilt/bananarchy-daemons/usr/bin/bananarchy-cover-idle" ] || \
|
||||||
|
[ ! -x "$BASE_DIR/prebuilt/bananarchy-daemons/usr/bin/bananarchy-volume-keys" ]; then
|
||||||
|
echo " -> Missing compiled idle daemons; running scripts/build-bananarchy-daemons.sh..."
|
||||||
|
"$BASE_DIR/scripts/build-bananarchy-daemons.sh"
|
||||||
|
fi
|
||||||
if [ ! -f "$BASE_DIR/prebuilt/bantam/bantam" ]; then
|
if [ ! -f "$BASE_DIR/prebuilt/bantam/bantam" ]; then
|
||||||
echo " -> Missing prebuilt bantam binary; running scripts/build-bantam.sh..."
|
echo " -> Missing prebuilt bantam binary; running scripts/build-bantam.sh..."
|
||||||
"$BASE_DIR/scripts/build-bantam.sh"
|
"$BASE_DIR/scripts/build-bantam.sh"
|
||||||
@@ -100,6 +109,45 @@ fi
|
|||||||
echo "[1/4] Installing Bananarchy rootfs overlay (artwork, branding, Sxmo 240x320, UCM, udev)..."
|
echo "[1/4] Installing Bananarchy rootfs overlay (artwork, branding, Sxmo 240x320, UCM, udev)..."
|
||||||
rm -f "$TARGET_ROOTFS/usr/bin/bantam" "$TARGET_ROOTFS/usr/local/bin/bantam" "$TARGET_ROOTFS/etc/doas.d/wheel.conf"
|
rm -f "$TARGET_ROOTFS/usr/bin/bantam" "$TARGET_ROOTFS/usr/local/bin/bantam" "$TARGET_ROOTFS/etc/doas.d/wheel.conf"
|
||||||
cp -af "$BASE_DIR/overlay/rootfs/." "$TARGET_ROOTFS/"
|
cp -af "$BASE_DIR/overlay/rootfs/." "$TARGET_ROOTFS/"
|
||||||
|
rm -f "$TARGET_ROOTFS/usr/bin/bananarchy-lid.py" \
|
||||||
|
"$TARGET_ROOTFS/usr/bin/bananarchy-cover-idle.py" \
|
||||||
|
"$TARGET_ROOTFS/usr/bin/bananarchy-volume-keys.py"
|
||||||
|
for daemon in bananarchy-lid bananarchy-cover-idle bananarchy-volume-keys; do
|
||||||
|
cp -af "$BASE_DIR/prebuilt/bananarchy-daemons/usr/bin/$daemon" \
|
||||||
|
"$TARGET_ROOTFS/usr/bin/$daemon"
|
||||||
|
chmod 0755 "$TARGET_ROOTFS/usr/bin/$daemon"
|
||||||
|
done
|
||||||
|
ln -sfn /bin/busybox "$TARGET_ROOTFS/sbin/init"
|
||||||
|
|
||||||
|
# Some rootfs trees were snapshotted before BusyBox installed its applet
|
||||||
|
# symlinks. /bin/ash is the "user" login shell and /bin/grep is used by
|
||||||
|
# openrc-run.sh; without them sshd rejects the account and the udev service
|
||||||
|
# fails, leaving /dev/input/event* root-owned and untagged so Xorg cannot
|
||||||
|
# attach the keypad. Never overwrite a real binary, only fill in gaps.
|
||||||
|
APPLET_LIST="$BASE_DIR/scripts/busybox-applets.txt"
|
||||||
|
if [ -f "$APPLET_LIST" ]; then
|
||||||
|
while IFS= read -r applet; do
|
||||||
|
[ -n "$applet" ] || continue
|
||||||
|
if [ ! -e "$TARGET_ROOTFS/bin/$applet" ]; then
|
||||||
|
[ ! -L "$TARGET_ROOTFS/bin/$applet" ] || \
|
||||||
|
rm -f "$TARGET_ROOTFS/bin/$applet"
|
||||||
|
ln -s /bin/busybox "$TARGET_ROOTFS/bin/$applet"
|
||||||
|
fi
|
||||||
|
done < "$APPLET_LIST"
|
||||||
|
fi
|
||||||
|
# /sbin was pruned too: reboot/poweroff/halt (Sxmo power menu), syslogd,
|
||||||
|
# klogd, mdev, ip-* helpers and the ifconfig/route tools live there.
|
||||||
|
SBIN_LIST="$BASE_DIR/scripts/busybox-sbin-applets.txt"
|
||||||
|
if [ -f "$SBIN_LIST" ]; then
|
||||||
|
while IFS= read -r applet; do
|
||||||
|
[ -n "$applet" ] || continue
|
||||||
|
if [ ! -e "$TARGET_ROOTFS/sbin/$applet" ]; then
|
||||||
|
[ ! -L "$TARGET_ROOTFS/sbin/$applet" ] || \
|
||||||
|
rm -f "$TARGET_ROOTFS/sbin/$applet"
|
||||||
|
ln -s /bin/busybox "$TARGET_ROOTFS/sbin/$applet"
|
||||||
|
fi
|
||||||
|
done < "$SBIN_LIST"
|
||||||
|
fi
|
||||||
if [ -x "$BASE_DIR/scripts/version.sh" ]; then
|
if [ -x "$BASE_DIR/scripts/version.sh" ]; then
|
||||||
"$BASE_DIR/scripts/version.sh" "$TARGET_ROOTFS"
|
"$BASE_DIR/scripts/version.sh" "$TARGET_ROOTFS"
|
||||||
fi
|
fi
|
||||||
@@ -203,6 +251,16 @@ if [ -d "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/wcn36xx" ] && \
|
|||||||
cp -af "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/wcn36xx/"*.ko.zst \
|
cp -af "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/wcn36xx/"*.ko.zst \
|
||||||
"$TARGET_ROOTFS/lib/modules/6.12.1-msm8916/kernel/drivers/net/wireless/ath/wcn36xx/"
|
"$TARGET_ROOTFS/lib/modules/6.12.1-msm8916/kernel/drivers/net/wireless/ath/wcn36xx/"
|
||||||
fi
|
fi
|
||||||
|
if [ -d "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/mux" ]; then
|
||||||
|
mkdir -p "$TARGET_ROOTFS/lib/modules/6.12.1-msm8916/kernel/drivers/mux"
|
||||||
|
cp -af "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/mux/"*.ko.zst \
|
||||||
|
"$TARGET_ROOTFS/lib/modules/6.12.1-msm8916/kernel/drivers/mux/"
|
||||||
|
fi
|
||||||
|
if [ -d "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/spi" ]; then
|
||||||
|
mkdir -p "$TARGET_ROOTFS/lib/modules/6.12.1-msm8916/kernel/drivers/spi"
|
||||||
|
cp -af "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/spi/"*.ko.zst \
|
||||||
|
"$TARGET_ROOTFS/lib/modules/6.12.1-msm8916/kernel/drivers/spi/"
|
||||||
|
fi
|
||||||
if [ -d "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/codecs" ] && \
|
if [ -d "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/codecs" ] && \
|
||||||
[ -d "$TARGET_ROOTFS/lib/modules/6.12.1-msm8916/kernel/sound/soc/codecs" ]; then
|
[ -d "$TARGET_ROOTFS/lib/modules/6.12.1-msm8916/kernel/sound/soc/codecs" ]; then
|
||||||
cp -af "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/codecs/"*.ko.zst \
|
cp -af "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/codecs/"*.ko.zst \
|
||||||
@@ -329,6 +387,7 @@ rm -rf \
|
|||||||
ln -sf /etc/init.d/kill-plymouth "$TARGET_ROOTFS/etc/runlevels/default/kill-plymouth"
|
ln -sf /etc/init.d/kill-plymouth "$TARGET_ROOTFS/etc/runlevels/default/kill-plymouth"
|
||||||
ln -sf /etc/init.d/bananarchy-power-policy "$TARGET_ROOTFS/etc/runlevels/default/bananarchy-power-policy"
|
ln -sf /etc/init.d/bananarchy-power-policy "$TARGET_ROOTFS/etc/runlevels/default/bananarchy-power-policy"
|
||||||
ln -sf /etc/init.d/bananarchy-time-sync "$TARGET_ROOTFS/etc/runlevels/default/bananarchy-time-sync"
|
ln -sf /etc/init.d/bananarchy-time-sync "$TARGET_ROOTFS/etc/runlevels/default/bananarchy-time-sync"
|
||||||
|
ln -sf /etc/init.d/bananarchy-sshd-debug "$TARGET_ROOTFS/etc/runlevels/default/bananarchy-sshd-debug"
|
||||||
mkdir -p "$TARGET_ROOTFS/var/lib/tinydm"
|
mkdir -p "$TARGET_ROOTFS/var/lib/tinydm"
|
||||||
ln -sf /usr/share/xsessions/sxmo.desktop "$TARGET_ROOTFS/var/lib/tinydm/default-session.desktop"
|
ln -sf /usr/share/xsessions/sxmo.desktop "$TARGET_ROOTFS/var/lib/tinydm/default-session.desktop"
|
||||||
|
|
||||||
@@ -370,4 +429,24 @@ if [ -f "$TARGET_ROOTFS/boot/extlinux/extlinux.conf" ]; then
|
|||||||
sed -i "s|^[[:space:]]*fdt .*|\tfdt /$DTB_FILE|" "$TARGET_ROOTFS/boot/extlinux/extlinux.conf"
|
sed -i "s|^[[:space:]]*fdt .*|\tfdt /$DTB_FILE|" "$TARGET_ROOTFS/boot/extlinux/extlinux.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# sshd's StrictModes rejects authorized_keys when $HOME/.ssh is group/world
|
||||||
|
# writable or the file is owned by the wrong uid. cp -af preserves the source
|
||||||
|
# modes but not numeric uids, so enforce both after the overlay copy.
|
||||||
|
chmod 644 "$TARGET_ROOTFS/etc/pam.d/sshd" \
|
||||||
|
"$TARGET_ROOTFS/etc/ssh/sshd_config.d/90-bananarchy-access.conf" \
|
||||||
|
2>/dev/null || true
|
||||||
|
chown 0:0 "$TARGET_ROOTFS/etc/pam.d/sshd" \
|
||||||
|
"$TARGET_ROOTFS/etc/ssh/sshd_config.d/90-bananarchy-access.conf" \
|
||||||
|
2>/dev/null || true
|
||||||
|
for ssh_home in "$TARGET_ROOTFS/etc/skel/.ssh" \
|
||||||
|
"$TARGET_ROOTFS/home/user/.ssh" \
|
||||||
|
"$TARGET_ROOTFS/root/.ssh"; do
|
||||||
|
[ -d "$ssh_home" ] || continue
|
||||||
|
chmod 700 "$ssh_home"
|
||||||
|
chmod 600 "$ssh_home/authorized_keys" 2>/dev/null || true
|
||||||
|
done
|
||||||
|
chown -R 10000:10000 "$TARGET_ROOTFS/home/user/.ssh" 2>/dev/null || true
|
||||||
|
chown -R 0:0 "$TARGET_ROOTFS/etc/skel/.ssh" "$TARGET_ROOTFS/root/.ssh" \
|
||||||
|
2>/dev/null || true
|
||||||
|
|
||||||
echo "Bananarchy overlay applied to $TARGET_ROOTFS for device $DEVICE."
|
echo "Bananarchy overlay applied to $TARGET_ROOTFS for device $DEVICE."
|
||||||
Executable
+76
@@ -0,0 +1,76 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Build the compiled idle daemons for nokia-beatles and related MSM8909 targets.
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
BASE_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||||
|
SRC_DIR="$BASE_DIR/src/bananarchy-daemons"
|
||||||
|
PREBUILT="$BASE_DIR/prebuilt/bananarchy-daemons/usr/bin"
|
||||||
|
OVERLAY="$BASE_DIR/overlay/rootfs/usr/bin"
|
||||||
|
NAMES="bananarchy-lid bananarchy-cover-idle bananarchy-volume-keys"
|
||||||
|
|
||||||
|
check_artifacts() {
|
||||||
|
for name in $NAMES; do
|
||||||
|
prebuilt="$PREBUILT/$name"
|
||||||
|
overlay="$OVERLAY/$name"
|
||||||
|
[ -x "$prebuilt" ] || {
|
||||||
|
echo "[!] missing compiled daemon: $prebuilt" >&2
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
[ -x "$overlay" ] || {
|
||||||
|
echo "[!] missing overlay daemon: $overlay" >&2
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
cmp -s "$prebuilt" "$overlay" || {
|
||||||
|
echo "[!] compiled daemon drift: $name" >&2
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
if [ "$(head -c 4 "$prebuilt" | od -An -tx1 | tr -d ' \n')" != "7f454c46" ]; then
|
||||||
|
echo "[!] $name is not an ELF binary" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
if ! readelf -h "$prebuilt" 2>/dev/null | grep -q 'Machine:.*ARM'; then
|
||||||
|
echo "[!] $name is not an ARM binary" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo "[ok] compiled idle daemons are ARM ELF binaries and overlay is in sync"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "${1:-}" = "--check" ]; then
|
||||||
|
check_artifacts
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker run --rm --network=host \
|
||||||
|
-e HOST_UID="$(id -u)" \
|
||||||
|
-e HOST_GID="$(id -g)" \
|
||||||
|
-v "$BASE_DIR:/bananarchy" \
|
||||||
|
alpine:3.24 sh -eu -c '
|
||||||
|
cat > /etc/apk/repositories <<EOF
|
||||||
|
https://mirror.nura.eco/postmarketos/v26.06
|
||||||
|
https://dl-cdn.alpinelinux.org/alpine/edge/main
|
||||||
|
https://dl-cdn.alpinelinux.org/alpine/edge/community
|
||||||
|
https://dl-cdn.alpinelinux.org/alpine/edge/testing
|
||||||
|
EOF
|
||||||
|
mkdir -p /etc/apk/keys
|
||||||
|
cp /bananarchy/keys/*.rsa.pub /etc/apk/keys/
|
||||||
|
apk add --no-cache build-base gcc-armv7 binutils-armv7 \
|
||||||
|
musl-dev-armv7 linux-headers >/dev/null
|
||||||
|
mkdir -p /bananarchy/prebuilt/bananarchy-daemons/usr/bin \
|
||||||
|
/bananarchy/overlay/rootfs/usr/bin
|
||||||
|
for name in bananarchy-lid bananarchy-cover-idle bananarchy-volume-keys; do
|
||||||
|
armv7-alpine-linux-musleabihf-gcc -std=c11 -O2 -Wall -Wextra -Werror -s \
|
||||||
|
-I/bananarchy/src/bananarchy-daemons \
|
||||||
|
-o "/bananarchy/prebuilt/bananarchy-daemons/usr/bin/$name" \
|
||||||
|
"/bananarchy/src/bananarchy-daemons/$name.c"
|
||||||
|
cp -a "/bananarchy/prebuilt/bananarchy-daemons/usr/bin/$name" \
|
||||||
|
"/bananarchy/overlay/rootfs/usr/bin/$name"
|
||||||
|
echo "[+] built $name"
|
||||||
|
done
|
||||||
|
chown -R "$HOST_UID:$HOST_GID" \
|
||||||
|
/bananarchy/prebuilt/bananarchy-daemons \
|
||||||
|
/bananarchy/overlay/rootfs/usr/bin/bananarchy-lid \
|
||||||
|
/bananarchy/overlay/rootfs/usr/bin/bananarchy-cover-idle \
|
||||||
|
/bananarchy/overlay/rootfs/usr/bin/bananarchy-volume-keys
|
||||||
|
'
|
||||||
|
check_artifacts
|
||||||
Loaded 100 of 121 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user