Fix unbootable image: restore kernel/module ABI compatibility
The previous battery pass rebuilt the kernel image from a retuned config and produced an image stuck on the lk2nd logo. Two incompatibilities with the linux-postmarketos-qcom-msm8916 module tree (which this repo does not rebuild) were identified: 1. Vermagic: CONFIG_PREEMPT_VOLUNTARY removes CONFIG_PREEMPT_BUILD, so the rebuilt kernel reported "6.12.1-msm8916 SMP mod_unload ARMv7 p2v8" while every package module reports "6.12.1-msm8916 SMP preempt mod_unload ARMv7 p2v8". modprobe refuses all of them, including panel-mipi-dbi, so the display never initialises. 2. Struct layout: CONFIG_SUSPEND selects CONFIG_PM_SLEEP, which adds fields to struct dev_pm_info. Modules built without it use wrong dev->power offsets, so matching vermagic alone is not enough. Restored the known-good kernel config, the serial-console cmdline and the DTB wakeup-source additions. The kernel image is still cross-compiled by build-kernel-audio.sh but from the original config, so vermagic and struct layouts match every module in the rootfs. Reverted the config-level items K1, K6, K7, K8, K13 and K14; implementing them requires vendoring and rebuilding the entire pmaports kernel module tree. Kept: K2 clock-latency-ns, K3/K4/K5 via patch 0006 (rebuilt with the original config), K10 IPv6 sysctl, and all U1-U14 userspace changes. Rebuilt the kernel image/modules/DTBs and images/bananarchy-nokia-argon.img with --mkinitfs. Verified: all modules (package + rebuilt) now report identical vermagic, boot.img contains the new zImage + DTB byte-for-byte, the console cmdline is restored, check-rebuild.sh passes and artifact drift is 0. Docs: CHANGELOG.md (recovery section), MANUAL.md, README.md, AGENTS.md, BATTERY-OPTIMIZATION-ANALYSIS.md (section 11).
This commit is contained in:
1 parent
ad3461babf
commit
0dbb37fba3
127 files changed
+190712
-136883
No files matched your search
@@ -38,7 +38,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-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-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.
|
||||
- `./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` or `CONFIG_MODULE_UNLOAD` in that config without also rebuilding every module from the pmaports kernel package**: vermagic and `struct dev_pm_info` layout must match the untouched package modules.
|
||||
- `./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/generate-artwork.py` — regenerates wallpapers, splashes, and icons from `artwork/icon-large.png`.
|
||||
@@ -62,7 +62,7 @@ All cross-compilation scripts run inside rootless Docker (`alpine:3.24` `armv7`
|
||||
- **Documentation**: keep `README.md`, `MANUAL.md`, `SDK.md`, and `CHANGELOG.md` synchronized with any new user-facing features, SDK functions, or keybindings, and do not leave third-party `.md` files inside `src/` or `edl/`.
|
||||
- **Artifact sources**: `prebuilt/` is the single source of truth for compiled artifacts and `scripts/rootfs-packages.txt` for the `armv7` package set. Never edit `overlay/rootfs/` copies of binaries by hand; run `./scripts/sync-prebuilt-overlay.sh` after changing `prebuilt/`.
|
||||
- **Package hygiene**: keep `scripts/rootfs-packages.txt` free of Rust-based top-level packages (use C `sudo`, never `sudo-rs`) and Wayland-purpose packages; `libwpe` and the `wayland-libs-*` shared libraries stay because GTK3/WebKitGTK link them directly, but no Wayland compositor, backend, or viewer is shipped. `scripts/check-rebuild.sh` enforces this.
|
||||
- **Power management**: idle blanking is `bananarchy-idle-blank.sh` + `sxmo_hook_unlock.sh`'s `idle_locker` (`SXMO_UNLOCK_IDLE_TIME`, default 60 s; `~/.cache/sxmo/sxmo.noidle` opts out). Deep standby is `bananarchy-suspend.sh` / `bananarchy-deep-standby.sh` / `sxmo_autosuspend.sh` / `sxmo_suspend.sh`, gated by `/etc/bananarchy-no-deep-standby` (shipped present = disabled) and `BANANARCHY_SUSPEND_GRACE`; `freeze` is preferred, `mem` requires `/etc/bananarchy-allow-mem-suspend`. Never force `sxmo.noidle`/`sxmo.nosuspend` from the session scripts and never reintroduce the infinite `sxmo_not_suspendable` wakelock. `/etc/bananarchy/` is root-only.
|
||||
- **Power management**: idle blanking is `bananarchy-idle-blank.sh` + `sxmo_hook_unlock.sh`'s `idle_locker` (`SXMO_UNLOCK_IDLE_TIME`, default 60 s; `~/.cache/sxmo/sxmo.noidle` opts out). Deep standby is `bananarchy-suspend.sh` / `bananarchy-deep-standby.sh` / `sxmo_autosuspend.sh` / `sxmo_suspend.sh`, gated by `/etc/bananarchy-no-deep-standby` (shipped present = disabled) and inert until a full custom kernel module tree is shipped. Never force `sxmo.noidle`/`sxmo.nosuspend` from the session scripts and never reintroduce the infinite `sxmo_not_suspendable` wakelock. `/etc/bananarchy/` is root-only.
|
||||
- **Image residue**: `rebuild-image.sh` strips `/var/cache/apk`, all `apk.log*` files, and unused gettext locale trees before `mke2fs` and aborts the build if any apk cache/log remains; never add an `apk` call after that guard.
|
||||
- **No on-device compiler**: `scripts/rootfs-packages.txt` ships no `gcc`/`g++`/`musl-dev`/`make` and no Janet runtime (`janet`, `janet-dev`, `jpm`); cross-compile native code with `scripts/build-*.sh`. On-device development uses the Yabasic FFI SDK (`neoui.yab` / `neonet.yab`), which requires `yabasic`, `libffi`, `libneoui.so`, and `libcurl.so.4` — never remove those. `scripts/check-rebuild.sh` guards both sides.
|
||||
- **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.
|
||||
|
||||
Reference in new issue
Block a user