From 89f04f7b5db74302fd04d13b26cf8f6bd81eaa21 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Thu, 12 Nov 2026 22:31:44 +0100 Subject: [PATCH 01/44] device/dipper: add device runtime package --- device/dipper/device.conf | 2 ++ packages/omamobile-device-dipper/PKGBUILD | 20 ++++++++++++++++ packages/omamobile-device-dipper/README.md | 22 +++++++++++++++++ packages/omamobile-device-dipper/build | 9 +++++++ packages/omamobile-device-dipper/install | 17 +++++++++++++ packages/omamobile-device-dipper/reboot-to.c | 25 ++++++++++++++++++++ packages/omamobile-device-dipper/test/all | 19 +++++++++++++++ packages/omamobile-device-dipper/version | 1 + 8 files changed, 115 insertions(+) create mode 100644 packages/omamobile-device-dipper/PKGBUILD create mode 100644 packages/omamobile-device-dipper/README.md create mode 100755 packages/omamobile-device-dipper/build create mode 100755 packages/omamobile-device-dipper/install create mode 100644 packages/omamobile-device-dipper/reboot-to.c create mode 100755 packages/omamobile-device-dipper/test/all create mode 100644 packages/omamobile-device-dipper/version diff --git a/device/dipper/device.conf b/device/dipper/device.conf index 22f7407ab..446753c26 100644 --- a/device/dipper/device.conf +++ b/device/dipper/device.conf @@ -5,6 +5,8 @@ CODENAME=dipper NAME="Xiaomi Mi 8" SOC=sdm845 COMPATIBLE="xiaomi,dipper" +# Dipper firmware paths, Qualcomm userspace and Freedreno runtime support. +PACKAGE=omamobile-device-dipper BOOT_METHOD=ram-only BOOT_IMAGES="" UFS_RW="" diff --git a/packages/omamobile-device-dipper/PKGBUILD b/packages/omamobile-device-dipper/PKGBUILD new file mode 100644 index 000000000..acaab2696 --- /dev/null +++ b/packages/omamobile-device-dipper/PKGBUILD @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: MIT +pkgname=omamobile-device-dipper +pkgver=$(cat "${startdir:-.}/version") +pkgrel=1 +pkgdesc="Omarchy Mobile support for the Xiaomi Mi 8 (dipper)" +arch=(aarch64) +url="https://github.com/derekross/omarchy-mobile" +license=(MIT) +depends=(bash systemd linux-firmware-qcom mesa qrtr pd-mapper tqftpserv rmtfs) +provides=(omamobile-device) +conflicts=(omamobile-device) +makedepends=(gcc) + +build() { + "$startdir/build" "$srcdir" +} + +package() { + "$startdir/install" "$pkgdir" "$srcdir" +} diff --git a/packages/omamobile-device-dipper/README.md b/packages/omamobile-device-dipper/README.md new file mode 100644 index 000000000..e4ea6709f --- /dev/null +++ b/packages/omamobile-device-dipper/README.md @@ -0,0 +1,22 @@ +# omamobile-device-dipper + +This package supplies the Mi 8's Dipper-specific firmware path aliases and +declares the runtime packages needed for the tested Freedreno graphics stack +and Qualcomm QRTR userspace. It also installs a small `reboot-to` helper so a +running system can request a reboot to fastboot. + +Firmware blobs remain in `linux-firmware-qcom`; the package creates relative +symlinks under the path used by the device tree. It does not copy phone data or +firmware into this repository. QRTR, `pd-mapper`, `tqftpserv` and `rmtfs` are +dependencies, but their services are not enabled here. In particular, no +service in this package writes the modem's partitions. + +Dipper support remains RAM-boot only. The single `boot` partition and UFS +storage are not written by this package. + +## Build and test + +```sh +tools/build-packages --local dipper packages/omamobile-device-dipper +packages/omamobile-device-dipper/test/all +``` diff --git a/packages/omamobile-device-dipper/build b/packages/omamobile-device-dipper/build new file mode 100755 index 000000000..b5c96a4db --- /dev/null +++ b/packages/omamobile-device-dipper/build @@ -0,0 +1,9 @@ +#!/bin/bash +# SPDX-License-Identifier: MIT +# Compile the shared reboot-to helper for the installed system. +set -euo pipefail +cd -- "$(dirname -- "${BASH_SOURCE[0]}")" +out=${1:-build} +mkdir -p "$out" +${CC:-cc} ${CFLAGS:--O2} -Wall -Wextra -o "$out/reboot-to" \ + reboot-to.c ${LDFLAGS:-} diff --git a/packages/omamobile-device-dipper/install b/packages/omamobile-device-dipper/install new file mode 100755 index 000000000..e5358f753 --- /dev/null +++ b/packages/omamobile-device-dipper/install @@ -0,0 +1,17 @@ +#!/bin/bash +# SPDX-License-Identifier: MIT +# Stage the Dipper firmware path aliases; firmware itself comes from linux-firmware-qcom. +set -euo pipefail +destination=${1:?Usage: ./install ABSOLUTE_DESTDIR} +build=${2:-build} +[[ $destination == /* && $destination != "/" ]] || { echo "Use an absolute staging directory" >&2; exit 1; } + +install -Dm755 "$build/reboot-to" "$destination/usr/bin/reboot-to" +firmware_dir="$destination/usr/lib/firmware/qcom/sdm845" +aliases=(adsp.mbn adspua.jsn adspr.jsn a630_zap.mbn cdsp.mbn cdspr.jsn ipa_fws.mbn mba.mbn modem.mbn modemr.jsn modemuw.mbn slpir.jsn slpius.jsn wlanmdsp.mbn) +for firmware in "${aliases[@]}"; do + install -d "$firmware_dir/Xiaomi/dipper" + ln -sfn "../../dipper/$firmware" "$firmware_dir/Xiaomi/dipper/$firmware" +done +install -Dm644 "$(dirname -- "${BASH_SOURCE[0]}")/version" \ + "$destination/usr/share/omamobile/device-dipper/version" diff --git a/packages/omamobile-device-dipper/reboot-to.c b/packages/omamobile-device-dipper/reboot-to.c new file mode 100644 index 000000000..ddf52e234 --- /dev/null +++ b/packages/omamobile-device-dipper/reboot-to.c @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT +// Request a reboot reason understood by the Qualcomm bootloader. +#include +#include +#include +#include + +#define LINUX_REBOOT_MAGIC1 0xfee1dead +#define LINUX_REBOOT_MAGIC2 672274793 +#define LINUX_REBOOT_CMD_RESTART2 0xA1B2C3D4 + +int main(int argc, char **argv) +{ + const char *reason = argc > 1 ? argv[1] : "bootloader"; + + if (argc > 2 || reason[0] == '-') { + fprintf(stderr, "usage: reboot-to [REASON]\n"); + return 2; + } + sync(); + syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, + LINUX_REBOOT_CMD_RESTART2, reason); + perror("reboot"); + return 1; +} diff --git a/packages/omamobile-device-dipper/test/all b/packages/omamobile-device-dipper/test/all new file mode 100755 index 000000000..1211b4a1d --- /dev/null +++ b/packages/omamobile-device-dipper/test/all @@ -0,0 +1,19 @@ +#!/bin/bash +# SPDX-License-Identifier: MIT +set -euo pipefail +cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." +fail() { printf 'not ok - %s\n' "$1" >&2; exit 1; } +tmp=$(mktemp -d); trap 'rm -rf "$tmp"' EXIT + +bash -n build install || fail "package scripts parse" +./build "$tmp/build" +./install "$tmp/root" "$tmp/build" +[[ -x "$tmp/root/usr/bin/reboot-to" ]] || fail "reboot-to is staged" +aliases=(adsp.mbn adspua.jsn adspr.jsn a630_zap.mbn cdsp.mbn cdspr.jsn ipa_fws.mbn mba.mbn modem.mbn modemr.jsn modemuw.mbn slpir.jsn slpius.jsn wlanmdsp.mbn) +for firmware in "${aliases[@]}"; do + link="$tmp/root/usr/lib/firmware/qcom/sdm845/Xiaomi/dipper/$firmware" + [[ $(readlink "$link") == "../../dipper/$firmware" ]] || fail "firmware alias $firmware" +done +[[ -f "$tmp/root/usr/share/omamobile/device-dipper/version" ]] || fail "device version is staged" +grep -q 'depends=(bash systemd linux-firmware-qcom mesa qrtr pd-mapper tqftpserv rmtfs)' PKGBUILD || fail "runtime dependencies are declared" +printf 'ok - Dipper firmware aliases and dependencies\n' diff --git a/packages/omamobile-device-dipper/version b/packages/omamobile-device-dipper/version new file mode 100644 index 000000000..6e8bf73aa --- /dev/null +++ b/packages/omamobile-device-dipper/version @@ -0,0 +1 @@ +0.1.0 From 4c159587d1ab6878ff9dee5a889ffc47cab26601 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Thu, 12 Nov 2026 23:01:56 +0100 Subject: [PATCH 02/44] device/dipper: complete runtime package defaults --- packages/omamobile-device-dipper/LICENSE | 21 +++++++ packages/omamobile-device-dipper/PKGBUILD | 4 +- packages/omamobile-device-dipper/README.md | 23 ++++--- packages/omamobile-device-dipper/device.conf | 13 ++++ .../etc/omamobile-mirrorlist | 18 ++++++ packages/omamobile-device-dipper/install | 14 +++++ .../omamobile-device-dipper.install | 62 +++++++++++++++++++ packages/omamobile-device-dipper/test/all | 29 ++++++++- .../conf.d/10-omamobile-usb.conf | 4 ++ .../logind.conf.d/10-omamobile-power-key.conf | 5 ++ .../systemd/network/20-usb-gadget.network | 14 +++++ .../system.conf.d/10-omamobile-watchdog.conf | 5 ++ .../udev/rules.d/10-omamobile-storage.rules | 5 ++ 13 files changed, 206 insertions(+), 11 deletions(-) create mode 100644 packages/omamobile-device-dipper/LICENSE create mode 100644 packages/omamobile-device-dipper/device.conf create mode 100644 packages/omamobile-device-dipper/etc/omamobile-mirrorlist create mode 100644 packages/omamobile-device-dipper/omamobile-device-dipper.install create mode 100644 packages/omamobile-device-dipper/vendor/NetworkManager/conf.d/10-omamobile-usb.conf create mode 100644 packages/omamobile-device-dipper/vendor/systemd/logind.conf.d/10-omamobile-power-key.conf create mode 100644 packages/omamobile-device-dipper/vendor/systemd/network/20-usb-gadget.network create mode 100644 packages/omamobile-device-dipper/vendor/systemd/system.conf.d/10-omamobile-watchdog.conf create mode 100644 packages/omamobile-device-dipper/vendor/udev/rules.d/10-omamobile-storage.rules diff --git a/packages/omamobile-device-dipper/LICENSE b/packages/omamobile-device-dipper/LICENSE new file mode 100644 index 000000000..aecd59624 --- /dev/null +++ b/packages/omamobile-device-dipper/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Derek Ross + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/omamobile-device-dipper/PKGBUILD b/packages/omamobile-device-dipper/PKGBUILD index acaab2696..9df94a189 100644 --- a/packages/omamobile-device-dipper/PKGBUILD +++ b/packages/omamobile-device-dipper/PKGBUILD @@ -6,9 +6,11 @@ pkgdesc="Omarchy Mobile support for the Xiaomi Mi 8 (dipper)" arch=(aarch64) url="https://github.com/derekross/omarchy-mobile" license=(MIT) -depends=(bash systemd linux-firmware-qcom mesa qrtr pd-mapper tqftpserv rmtfs) +depends=(bash systemd omamobile-keyring linux-firmware-qcom mesa qrtr pd-mapper tqftpserv rmtfs) provides=(omamobile-device) conflicts=(omamobile-device) +backup=(etc/pacman.d/omamobile-mirrorlist) +install=omamobile-device-dipper.install makedepends=(gcc) build() { diff --git a/packages/omamobile-device-dipper/README.md b/packages/omamobile-device-dipper/README.md index e4ea6709f..f9ab16863 100644 --- a/packages/omamobile-device-dipper/README.md +++ b/packages/omamobile-device-dipper/README.md @@ -1,15 +1,24 @@ # omamobile-device-dipper -This package supplies the Mi 8's Dipper-specific firmware path aliases and -declares the runtime packages needed for the tested Freedreno graphics stack -and Qualcomm QRTR userspace. It also installs a small `reboot-to` helper so a -running system can request a reboot to fastboot. +This package configures the Mi 8's USB network, keeps Android partitions out +of desktop storage tools, transfers the hardware watchdog to systemd, and +provides firmware path aliases and a `reboot-to` helper. + +The watchdog timeout is 60 seconds, the value that reached multi-user in the +recorded RAM/NFS boot ([device notes](../../device/dipper/NOTES.md)). + +It declares Mesa for the tested Freedreno graphics stack and the Qualcomm +QRTR userspace packages needed by the WLAN and modem stacks. Their services +are not enabled here. Firmware blobs remain in `linux-firmware-qcom`; the package creates relative symlinks under the path used by the device tree. It does not copy phone data or -firmware into this repository. QRTR, `pd-mapper`, `tqftpserv` and `rmtfs` are -dependencies, but their services are not enabled here. In particular, no -service in this package writes the modem's partitions. +firmware into this repository. The `[omamobile]` repository mirrorlist is +installed for future package updates. QRTR, `pd-mapper`, `tqftpserv` and +`rmtfs` are dependencies, but their services are not enabled here; no service +in this package writes the modem's partitions. + +The package installs the same device descriptor used by the build tools. Dipper support remains RAM-boot only. The single `boot` partition and UFS storage are not written by this package. diff --git a/packages/omamobile-device-dipper/device.conf b/packages/omamobile-device-dipper/device.conf new file mode 100644 index 000000000..446753c26 --- /dev/null +++ b/packages/omamobile-device-dipper/device.conf @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: MIT +# RAM-only first-light descriptor for Xiaomi Mi 8 (dipper). +# Persistent install/update is disabled: the phone has one OS boot partition. +CODENAME=dipper +NAME="Xiaomi Mi 8" +SOC=sdm845 +COMPATIBLE="xiaomi,dipper" +# Dipper firmware paths, Qualcomm userspace and Freedreno runtime support. +PACKAGE=omamobile-device-dipper +BOOT_METHOD=ram-only +BOOT_IMAGES="" +UFS_RW="" +PANEL_SIZE=1080x2248 diff --git a/packages/omamobile-device-dipper/etc/omamobile-mirrorlist b/packages/omamobile-device-dipper/etc/omamobile-mirrorlist new file mode 100644 index 000000000..f9be3d0e9 --- /dev/null +++ b/packages/omamobile-device-dipper/etc/omamobile-mirrorlist @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: MIT +# Where pacman gets Omarchy Mobile's packages ([omamobile] in /etc/pacman.conf). +# +# The one active Server line is the channel this phone follows: +# stable what has run on the Pixel 7 Pro; phones installed from a +# release follow it +# development every day's build, first; for builders and testers +# local the repository on the phone itself, /var/lib/omamobile/repo, +# filled from a build machine by tools/repo-push +# +# Switch with: sudo omamobile-update channel development (or stable, local) +# See which: omamobile-update check +# +# pacman keeps a changed copy of this file across upgrades (backup= in the +# device package); a new default then arrives as omamobile-mirrorlist.pacnew. +Server = https://pkgs.omamobile.org/stable/$arch +#Server = https://pkgs.omamobile.org/development/$arch +#Server = file:///var/lib/omamobile/repo/$arch diff --git a/packages/omamobile-device-dipper/install b/packages/omamobile-device-dipper/install index e5358f753..ac6b05c1d 100755 --- a/packages/omamobile-device-dipper/install +++ b/packages/omamobile-device-dipper/install @@ -2,11 +2,22 @@ # SPDX-License-Identifier: MIT # Stage the Dipper firmware path aliases; firmware itself comes from linux-firmware-qcom. set -euo pipefail +cd -- "$(dirname -- "${BASH_SOURCE[0]}")" destination=${1:?Usage: ./install ABSOLUTE_DESTDIR} build=${2:-build} [[ $destination == /* && $destination != "/" ]] || { echo "Use an absolute staging directory" >&2; exit 1; } install -Dm755 "$build/reboot-to" "$destination/usr/bin/reboot-to" +install -Dm644 vendor/udev/rules.d/10-omamobile-storage.rules \ + "$destination/usr/lib/udev/rules.d/10-omamobile-storage.rules" +install -Dm644 vendor/systemd/network/20-usb-gadget.network \ + "$destination/usr/lib/systemd/network/20-usb-gadget.network" +install -Dm644 vendor/systemd/system.conf.d/10-omamobile-watchdog.conf \ + "$destination/usr/lib/systemd/system.conf.d/10-omamobile-watchdog.conf" +install -Dm644 vendor/systemd/logind.conf.d/10-omamobile-power-key.conf \ + "$destination/usr/lib/systemd/logind.conf.d/10-omamobile-power-key.conf" +install -Dm644 vendor/NetworkManager/conf.d/10-omamobile-usb.conf \ + "$destination/usr/lib/NetworkManager/conf.d/10-omamobile-usb.conf" firmware_dir="$destination/usr/lib/firmware/qcom/sdm845" aliases=(adsp.mbn adspua.jsn adspr.jsn a630_zap.mbn cdsp.mbn cdspr.jsn ipa_fws.mbn mba.mbn modem.mbn modemr.jsn modemuw.mbn slpir.jsn slpius.jsn wlanmdsp.mbn) for firmware in "${aliases[@]}"; do @@ -15,3 +26,6 @@ for firmware in "${aliases[@]}"; do done install -Dm644 "$(dirname -- "${BASH_SOURCE[0]}")/version" \ "$destination/usr/share/omamobile/device-dipper/version" +install -Dm644 etc/omamobile-mirrorlist "$destination/etc/pacman.d/omamobile-mirrorlist" +install -Dm644 device.conf "$destination/usr/share/omamobile/device.conf" +install -Dm644 LICENSE "$destination/usr/share/licenses/omamobile-device-dipper/LICENSE" diff --git a/packages/omamobile-device-dipper/omamobile-device-dipper.install b/packages/omamobile-device-dipper/omamobile-device-dipper.install new file mode 100644 index 000000000..96da5786e --- /dev/null +++ b/packages/omamobile-device-dipper/omamobile-device-dipper.install @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: MIT +# Add the [omamobile] repository to pacman.conf, before [omarchy] so its +# builds (e.g. Mesa with Mali-G710 support) win. Added once; never removed +# automatically, so a user's edits stay. +add_repository() { + local conf=/etc/pacman.conf + grep -q '^\[omamobile\]' "$conf" && return + local entry='[omamobile]\nInclude = /etc/pacman.d/omamobile-mirrorlist\n' + if grep -q '^\[omarchy\]' "$conf"; then + sed -i "0,/^\[omarchy\]/s//${entry//\//\\/}\n[omarchy]/" "$conf" + elif grep -q '^\[core\]' "$conf"; then + sed -i "0,/^\[core\]/s//${entry//\//\\/}\n[core]/" "$conf" + else + printf '\n[omamobile]\nInclude = /etc/pacman.d/omamobile-mirrorlist\n' >>"$conf" + fi +} + +# --- the [omamobile] channel (identical in every device package) --- +# The mirrorlist names the channel (stable, development or local). It is a +# backup= file, so pacman keeps a changed copy; an unchanged one, though, is +# replaced by the new default. Phones from before 2026-11-01 read the +# repository on the phone (file:///var/lib/omamobile/repo, filled by +# tools/repo-push), unchanged, and would silently move to stable: such a phone +# keeps reading its own repository, and is told how to switch. +OMAMOBILE_MIRRORLIST=/etc/pacman.d/omamobile-mirrorlist +OMAMOBILE_LOCAL_MARK=/var/lib/omamobile/.mirrorlist-was-local +OMAMOBILE_LOCAL_SERVER='Server = file:///var/lib/omamobile/repo/$arch' + +remember_local_channel() { + [[ -f $OMAMOBILE_MIRRORLIST ]] || return 0 + if grep -qxF "$OMAMOBILE_LOCAL_SERVER" "$OMAMOBILE_MIRRORLIST"; then + mkdir -p "${OMAMOBILE_LOCAL_MARK%/*}" && : > "$OMAMOBILE_LOCAL_MARK" + fi +} + +keep_local_channel() { + [[ -e $OMAMOBILE_LOCAL_MARK ]] || return 0 + rm -f "$OMAMOBILE_LOCAL_MARK" + [[ -f $OMAMOBILE_MIRRORLIST ]] || return 0 + grep -qxF "$OMAMOBILE_LOCAL_SERVER" "$OMAMOBILE_MIRRORLIST" && return 0 + # Comment out every Server line, then turn the local one back on + sed -i -E 's|^([[:space:]]*Server[[:space:]]*=)|#\1|' "$OMAMOBILE_MIRRORLIST" + sed -i 's|^#Server = file:///var/lib/omamobile/repo/\$arch$|Server = file:///var/lib/omamobile/repo/$arch|' "$OMAMOBILE_MIRRORLIST" + grep -qxF "$OMAMOBILE_LOCAL_SERVER" "$OMAMOBILE_MIRRORLIST" || + printf '%s\n' "$OMAMOBILE_LOCAL_SERVER" >>"$OMAMOBILE_MIRRORLIST" + echo "==> [omamobile] stays on this phone's own repository (/var/lib/omamobile/repo)." + echo " Installed phones follow the stable channel at pkgs.omamobile.org; switch with" + echo " sudo omamobile-update channel stable (or development)" +} + +pre_upgrade() { + remember_local_channel +} + +post_install() { + add_repository +} + +post_upgrade() { + add_repository + keep_local_channel +} diff --git a/packages/omamobile-device-dipper/test/all b/packages/omamobile-device-dipper/test/all index 1211b4a1d..40a71c39f 100755 --- a/packages/omamobile-device-dipper/test/all +++ b/packages/omamobile-device-dipper/test/all @@ -4,10 +4,11 @@ set -euo pipefail cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." fail() { printf 'not ok - %s\n' "$1" >&2; exit 1; } tmp=$(mktemp -d); trap 'rm -rf "$tmp"' EXIT +package_dir=$PWD -bash -n build install || fail "package scripts parse" +bash -n build install omamobile-device-dipper.install || fail "package scripts parse" ./build "$tmp/build" -./install "$tmp/root" "$tmp/build" +(cd "$tmp" && "$package_dir/install" "$tmp/root" "$tmp/build") [[ -x "$tmp/root/usr/bin/reboot-to" ]] || fail "reboot-to is staged" aliases=(adsp.mbn adspua.jsn adspr.jsn a630_zap.mbn cdsp.mbn cdspr.jsn ipa_fws.mbn mba.mbn modem.mbn modemr.jsn modemuw.mbn slpir.jsn slpius.jsn wlanmdsp.mbn) for firmware in "${aliases[@]}"; do @@ -15,5 +16,27 @@ for firmware in "${aliases[@]}"; do [[ $(readlink "$link") == "../../dipper/$firmware" ]] || fail "firmware alias $firmware" done [[ -f "$tmp/root/usr/share/omamobile/device-dipper/version" ]] || fail "device version is staged" -grep -q 'depends=(bash systemd linux-firmware-qcom mesa qrtr pd-mapper tqftpserv rmtfs)' PKGBUILD || fail "runtime dependencies are declared" +grep -q 'depends=(bash systemd omamobile-keyring linux-firmware-qcom mesa qrtr pd-mapper tqftpserv rmtfs)' PKGBUILD || fail "runtime dependencies are declared" +grep -q '^install=omamobile-device-dipper.install$' PKGBUILD || fail "repository hook is declared" +grep -q '^backup=(etc/pacman.d/omamobile-mirrorlist)$' PKGBUILD || fail "mirrorlist is preserved across upgrades" +for path in \ + usr/lib/udev/rules.d/10-omamobile-storage.rules \ + usr/lib/systemd/network/20-usb-gadget.network \ + usr/lib/systemd/system.conf.d/10-omamobile-watchdog.conf \ + usr/lib/systemd/logind.conf.d/10-omamobile-power-key.conf \ + usr/lib/NetworkManager/conf.d/10-omamobile-usb.conf \ + etc/pacman.d/omamobile-mirrorlist \ + usr/share/omamobile/device.conf \ + usr/share/licenses/omamobile-device-dipper/LICENSE; do + [[ -f "$tmp/root/$path" ]] || fail "install stages $path" +done +cmp -s device.conf ../../device/dipper/device.conf || fail "packaged descriptor matches the device descriptor" +grep -q '^post_install()' omamobile-device-dipper.install || fail "package install adds the [omamobile] repo" +grep -q '^post_upgrade()' omamobile-device-dipper.install || fail "package upgrade keeps the [omamobile] repo" +grep -q 'KERNEL=="sd\[a-f\]", MODE="0000"' "$tmp/root/usr/lib/udev/rules.d/10-omamobile-storage.rules" || fail "all UFS whole-disk nodes are inaccessible" +grep -q 'ID_PART_ENTRY_NAME}!="userdata"' "$tmp/root/usr/lib/udev/rules.d/10-omamobile-storage.rules" || fail "only userdata is visible to desktop tools" +grep -q '^Address=172.16.42.1/24$' "$tmp/root/usr/lib/systemd/network/20-usb-gadget.network" || fail "usb0 keeps the initramfs address" +grep -q '^RuntimeWatchdogSec=60s$' "$tmp/root/usr/lib/systemd/system.conf.d/10-omamobile-watchdog.conf" || fail "systemd keeps the tested watchdog timeout" +[[ ! -e "$tmp/root/usr/lib/systemd/system/omamobile-dipper-identity.service" ]] || fail "identity service stays disabled" +[[ ! -e "$tmp/root/usr/lib/systemd/system/omamobile-tailscale-join.service" ]] || fail "tailnet service is not included" printf 'ok - Dipper firmware aliases and dependencies\n' diff --git a/packages/omamobile-device-dipper/vendor/NetworkManager/conf.d/10-omamobile-usb.conf b/packages/omamobile-device-dipper/vendor/NetworkManager/conf.d/10-omamobile-usb.conf new file mode 100644 index 000000000..e3f911f9b --- /dev/null +++ b/packages/omamobile-device-dipper/vendor/NetworkManager/conf.d/10-omamobile-usb.conf @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: MIT +# systemd-networkd owns the USB gadget link; NetworkManager manages other links. +[keyfile] +unmanaged-devices=interface-name:usb0 diff --git a/packages/omamobile-device-dipper/vendor/systemd/logind.conf.d/10-omamobile-power-key.conf b/packages/omamobile-device-dipper/vendor/systemd/logind.conf.d/10-omamobile-power-key.conf new file mode 100644 index 000000000..58b47c253 --- /dev/null +++ b/packages/omamobile-device-dipper/vendor/systemd/logind.conf.d/10-omamobile-power-key.conf @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: MIT +# A short press opens Omarchy's menu; the PMIC handles a forced reset. +[Login] +HandlePowerKey=ignore +HandlePowerKeyLongPress=ignore diff --git a/packages/omamobile-device-dipper/vendor/systemd/network/20-usb-gadget.network b/packages/omamobile-device-dipper/vendor/systemd/network/20-usb-gadget.network new file mode 100644 index 000000000..cadd6fc5e --- /dev/null +++ b/packages/omamobile-device-dipper/vendor/systemd/network/20-usb-gadget.network @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: MIT +# Keep the USB gadget address set by the initramfs after switch_root. +[Match] +Name=usb0 + +[Network] +Address=172.16.42.1/24 +DNS=1.1.1.1 +DNS=9.9.9.9 +ConfigureWithoutCarrier=yes + +[Route] +Gateway=172.16.42.2 +Metric=1000 diff --git a/packages/omamobile-device-dipper/vendor/systemd/system.conf.d/10-omamobile-watchdog.conf b/packages/omamobile-device-dipper/vendor/systemd/system.conf.d/10-omamobile-watchdog.conf new file mode 100644 index 000000000..68f4a836b --- /dev/null +++ b/packages/omamobile-device-dipper/vendor/systemd/system.conf.d/10-omamobile-watchdog.conf @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: MIT +# The measured RAM/NFS boot reached multi-user with a 60-second watchdog. +[Manager] +RuntimeWatchdogSec=60s +RebootWatchdogSec=1min diff --git a/packages/omamobile-device-dipper/vendor/udev/rules.d/10-omamobile-storage.rules b/packages/omamobile-device-dipper/vendor/udev/rules.d/10-omamobile-storage.rules new file mode 100644 index 000000000..6aba24c5f --- /dev/null +++ b/packages/omamobile-device-dipper/vendor/udev/rules.d/10-omamobile-storage.rules @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: MIT +# Dipper's UFS spans sda through sdf. The initramfs keeps all partitions +# read-only except userdata; hide whole disks and Android partitions after boot. +SUBSYSTEM=="block", KERNEL=="sd[a-f]", MODE="0000", ENV{UDISKS_IGNORE}="1" +SUBSYSTEM=="block", KERNEL=="sd[a-f][0-9]*", ENV{ID_PART_ENTRY_NAME}!="userdata", ENV{UDISKS_IGNORE}="1" From c9ae5097c075cf32c2ac013a032a84423e23d7b9 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Fri, 13 Nov 2026 00:12:18 +0100 Subject: [PATCH 03/44] NOTES: record Dipper package probe and backup check --- device/dipper/NOTES.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index 838b0c8e7..4b3b0f82c 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -9,6 +9,7 @@ the facts needed for review. | Date | `boot.img` SHA-256 | Source, as recorded | `/dev/sda` and UFS partitions | Checks and gaps | | --- | --- | --- | --- | --- | +| 2026-11-13 | `1d4ce38579a881b6d875a9a3bc025357f753cf119ce5ce16b3dbdc52f86da9f9` | Local RAM image; it did not include an NFS-root request | All exposed whole-disk and partition `ro` flags were `1` | Initramfs and USB/SSH ran on `7.3.0-rc6-omamobile-push1`. Mounted the disposable NFS test root without switching PID 1; in a chroot, `pacman -Qk omamobile-device-dipper` reported 47 files and none missing. The package's `reboot-to` usage path ran, then the helper returned the phone to fastboot. No UFS write. | | 2026-11-12 | `ac93a5d9f6787153cf620704f192c22da91cf2041789f16f4214111b8458d226` | Test kernel source: base `2a318a96ae9d4c87e061da1da13c05b11d305658` plus the FTS5 DTS change now proposed as kernel PR #249 commit `0d548847248512b1e8e1d40d66a85b81fe5ed471`; enabled directly for this test | `/dev/sda` absent (disk flag not applicable); `sdb`–`sdf` disk flags not read; all 85 partition flags `ro=1` | Full reserved range, kernel `7.3.0-rc6-omamobile-push1`, `stmfts` on `event2`, no Oops/BUG/panic/WARN. `qcom_wdt` and feeder state: not read. Exact touch X/Y extrema were not retained. No physical touch event captured; no UFS write. | | 2026-11-12 | `1bf0ffd5302fff7fa75f49382567063d7e03bd52083baa81a88107a47dcbdbd2` | The booted test overlay itself defined the full touch node; its exact source was not retained. The later rebuild uses #249's disabled node plus [`device/dipper/overlays/fts5-touchscreen.dtso`](overlays/fts5-touchscreen.dtso), blob `f09381d59a110d02a8b8819f585e304efb1870a3`; both proposed sources postdate the boot. | `/dev/sda` absent (disk flag not applicable); `sdb`–`sdf` disk flags not read; all 85 partition flags `ro=1` | `0x85fc0000–0x8a8fffff` reserved; `stmfts` exposed `event2` on I2C14; physical input included contact, changing X/Y coordinates and `ABS_MT_TRACKING_ID=-1` release. `qcom_wdt` was bound; feeder state: not read. Exact touch X/Y extrema were not retained. No UFS write. | | 2026-11-12 (superseded) | `e37196952fca14d5a9152871927039b2ac1d311ec500710f8611f9ac6eff8072` | The booted test overlay itself defined the full touch node; its exact source was not retained. The later rebuild uses #249's disabled node plus [`device/dipper/overlays/fts5-touchscreen.dtso`](overlays/fts5-touchscreen.dtso), blob `f09381d59a110d02a8b8819f585e304efb1870a3`; both proposed sources postdate the boot. The exact source commit for the stale `base-panel.dtb` was not retained. | `/dev/sda` absent (disk flag not applicable); `sdb`–`sdf` disk flags not read; all 85 partition flags `ro=1` | Touch events worked, but the DTB omitted `removed-region@86200000` and `removed-region@89100000`; `/proc/iomem` exposed those areas as System RAM. This was noticed when reviewing `/proc/iomem` after the boot's touch test. Replaced by the corrected image above. No UFS write. | @@ -25,6 +26,11 @@ the facts needed for review. | 2026-11-09 | `f2f5cb2e3da8fe992d366dba36e059c0d9106cf14a7d1c8872c61ee144a4474b` | Earlier #505 image after `qcom-pon` was built in; exact kernel/DTS heads unknown | `/dev/sda` absent, disk `ro=0`; all 85 partitions and other disks `ro=1` | PMIC keys registered and Volume Down produced `KEY_VOLUMEDOWN`; watchdog/feeder, framebuffer and USB/SSH worked. | | 2026-11-09 | `93484a91103c294f6c73799ae6cb7161019129b9f89ab331222ae04f10ecf3e1` | First #505 image before `qcom-pon` was built in; exact kernel/DTS heads unknown | `/dev/sda` absent, disk `ro=0`; all 85 partitions and other disks `ro=1` | Console, framebuffer, USB/SSH and watchdog/feeder worked; no physical key event was captured. | +On 2026-11-13, all 84 entries in the off-device partition checksum manifest +were revalidated. The separate 7.1 GB compressed userdata archive passed its +SHA-256 and zstd integrity checks; it remains a file-level, non-atomic archive, +not a raw partition image. + The original 10-29 count of 92 `/dev/block/by-name/` entries was not saved as a name list. The retained backup and kernel records cover 84 non-userdata GPT partitions plus `userdata`; the other seven names cannot be identified from the From 155c651367a94859e21e1176020855401b204778 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Fri, 13 Nov 2026 01:38:47 +0100 Subject: [PATCH 04/44] NOTES: record Dipper touch probe --- device/dipper/NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index 4b3b0f82c..63ea13f65 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -9,7 +9,7 @@ the facts needed for review. | Date | `boot.img` SHA-256 | Source, as recorded | `/dev/sda` and UFS partitions | Checks and gaps | | --- | --- | --- | --- | --- | -| 2026-11-13 | `1d4ce38579a881b6d875a9a3bc025357f753cf119ce5ce16b3dbdc52f86da9f9` | Local RAM image; it did not include an NFS-root request | All exposed whole-disk and partition `ro` flags were `1` | Initramfs and USB/SSH ran on `7.3.0-rc6-omamobile-push1`. Mounted the disposable NFS test root without switching PID 1; in a chroot, `pacman -Qk omamobile-device-dipper` reported 47 files and none missing. The package's `reboot-to` usage path ran, then the helper returned the phone to fastboot. No UFS write. | +| 2026-11-13 | `1d4ce38579a881b6d875a9a3bc025357f753cf119ce5ce16b3dbdc52f86da9f9` | Local RAM image; retained manifest has image/kernel/ramdisk hashes but no source commit; no NFS-root request was included | All exposed whole-disk and partition `ro` flags were `1` | Initramfs and USB/SSH ran on `7.3.0-rc6-omamobile-push1`. `stmfts` registered as `event2`; three touch-key and 428 absolute events arrived during three taps. Display stayed black: only simpledrm `Unknown-1` was present, with no DSI panel/backlight device. Mounted disposable NFS root without switching PID 1; chroot `pacman -Qk omamobile-device-dipper` reported 47 files, none missing. `reboot-to bootloader` used the initramfs helper because PID 1 never switched. No UFS write. | | 2026-11-12 | `ac93a5d9f6787153cf620704f192c22da91cf2041789f16f4214111b8458d226` | Test kernel source: base `2a318a96ae9d4c87e061da1da13c05b11d305658` plus the FTS5 DTS change now proposed as kernel PR #249 commit `0d548847248512b1e8e1d40d66a85b81fe5ed471`; enabled directly for this test | `/dev/sda` absent (disk flag not applicable); `sdb`–`sdf` disk flags not read; all 85 partition flags `ro=1` | Full reserved range, kernel `7.3.0-rc6-omamobile-push1`, `stmfts` on `event2`, no Oops/BUG/panic/WARN. `qcom_wdt` and feeder state: not read. Exact touch X/Y extrema were not retained. No physical touch event captured; no UFS write. | | 2026-11-12 | `1bf0ffd5302fff7fa75f49382567063d7e03bd52083baa81a88107a47dcbdbd2` | The booted test overlay itself defined the full touch node; its exact source was not retained. The later rebuild uses #249's disabled node plus [`device/dipper/overlays/fts5-touchscreen.dtso`](overlays/fts5-touchscreen.dtso), blob `f09381d59a110d02a8b8819f585e304efb1870a3`; both proposed sources postdate the boot. | `/dev/sda` absent (disk flag not applicable); `sdb`–`sdf` disk flags not read; all 85 partition flags `ro=1` | `0x85fc0000–0x8a8fffff` reserved; `stmfts` exposed `event2` on I2C14; physical input included contact, changing X/Y coordinates and `ABS_MT_TRACKING_ID=-1` release. `qcom_wdt` was bound; feeder state: not read. Exact touch X/Y extrema were not retained. No UFS write. | | 2026-11-12 (superseded) | `e37196952fca14d5a9152871927039b2ac1d311ec500710f8611f9ac6eff8072` | The booted test overlay itself defined the full touch node; its exact source was not retained. The later rebuild uses #249's disabled node plus [`device/dipper/overlays/fts5-touchscreen.dtso`](overlays/fts5-touchscreen.dtso), blob `f09381d59a110d02a8b8819f585e304efb1870a3`; both proposed sources postdate the boot. The exact source commit for the stale `base-panel.dtb` was not retained. | `/dev/sda` absent (disk flag not applicable); `sdb`–`sdf` disk flags not read; all 85 partition flags `ro=1` | Touch events worked, but the DTB omitted `removed-region@86200000` and `removed-region@89100000`; `/proc/iomem` exposed those areas as System RAM. This was noticed when reviewing `/proc/iomem` after the boot's touch test. Replaced by the corrected image above. No UFS write. | From 45b8440bacca40fa83c0b71fdd69c4213b5e2257 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Fri, 13 Nov 2026 10:22:56 +0100 Subject: [PATCH 05/44] docs: record Dipper NFS desktop smoke --- device/dipper/BRINGUP-M1.md | 19 +++----- device/dipper/NOTES.md | 93 ++++++++++++++++++++++++++++++++++--- 2 files changed, 94 insertions(+), 18 deletions(-) diff --git a/device/dipper/BRINGUP-M1.md b/device/dipper/BRINGUP-M1.md index 012f1070c..4ef5d99b9 100644 --- a/device/dipper/BRINGUP-M1.md +++ b/device/dipper/BRINGUP-M1.md @@ -1,14 +1,16 @@ # Xiaomi Mi 8 (dipper): RAM-only first light -**Status (2026-11-12):** the newest RAM boot used the Dipper FTS5 node enabled directly in a local kernel tree. `stmfts` registered as `event2`; the screen was not visually verified, and no physical touch was captured on that boot. The preceding corrected overlay boot captured contact, changing X/Y and release. All recorded UFS partition flags were read-only, `/dev/sda` was absent, and `0x85fc0000–0x8a8fffff` remained reserved. No UFS partition was written. Rebuildable kernel DTS and repository overlay sources are now proposed in kernel PR #249 and this PR; the test images predate those commits. Earlier boots are recorded in [NOTES.md]. +**Status (2026-11-13):** the latest completed Omarchy NFS-root run used Omarchy 4.0.6 and `omamobile-omarchy 0.1.44`; it does not meet the owner's request for Omarchy 4.5.0-3 and `omamobile-omarchy 0.1.45`. The corrected image was RAM-booted again, but its USB gadget did not provide ping, SSH or NFS connectivity, so the refreshed run, raw `phone-smoke` output and `networkctl status usb0` remain pending. The NFS run reached Hyprland, but visible contents were not captured. Separately, Mesa 1.5 rendered with Freedreno `FD630` from a console in the pre-existing userdata Linux root; this did not test Hyprland. The owner confirmed that userdata installation predated these tests. No image was flashed. Earlier RAM boots are recorded below and in [NOTES.md]. A separate RAM NFS-root run used image `a2d435a7430e7e4c145c61cdb9866d16929731859d91c7105e6bfcaf9e3e9dd7` with the rebased #503 init. BusyBox `mount` switched to the test NFS root; all six disk flags and all 85 partition flags were `ro=1`. Systemd reached the multi-user target with `RuntimeWatchdogSec=60s`, and SSH remained available. `reboot-to bootloader` returned the phone to fastboot. The exported root was a generic Arch base; this did not test the Omarchy desktop or link-loss recovery. Full results are in [NOTES.md]. The FTS5 driver from [touch #219] is merged into linux-omarchy-mobile. The Dipper board DTS from [DTS #220] is merged too (2026-11-11), and the EA8074 panel driver is under review in [panel #218]. -The EA8074 panel test and the corrected FTS5 touchscreen hardware test are -recorded in [NOTES.md]. Both used RAM boots; no UFS partition was written. +The EA8074 panel test is recorded in [NOTES.md]. The FTS5 touchscreen +registered and physical taps produced touch events on 2026-11-13; see +[NOTES.md]. End-to-end touch use in a visible Omarchy session remains +unverified. On 2026-11-09, a guarded RAM boot was used to capture all 84 GPT partitions other than `userdata` (the phone has no `super`); source and compressed-image checksums passed. The separate live userdata archive also passed its checksum @@ -59,12 +61,6 @@ archive's checksum file. Do not boot if either backup is missing or fails. without changing UFS, and the screen stays lit because simpledrm holds the panel's VCI and VDDIO rails. If it goes dark about 30 seconds in, record `dmesg | grep -i -E 'regulator|simple'` and stop. - Before booting, decompile the exact packed DTB on the laptop with - `dtc -I dtb -O dts` and verify it contains both - `removed-region@86200000` and `removed-region@89100000`. On the phone, - before touching the screen or doing any other test, verify - `/proc/iomem` marks the complete `0x85fc0000–0x8a8fffff` range reserved. - If it does not, stop immediately and run `reboot-to bootloader`. Pass only when `uname -r`, the `boot.img` sha256, all partition `ro` values, whole-disk `ro` values, and `ufs-ro` lines from `dmesg` are recorded. `/dev/sda` must be absent or present with `/sys/block/sda/ro=1` in NFS mode; @@ -123,9 +119,8 @@ repository; the SSH public key and generated host key stay in the local output. change was not retained. The 2026-11-10 NFS test root reached systemd with `RuntimeWatchdogSec=60s`; NFS link-loss recovery and the Omarchy desktop on that root remain untested. -- FTS5 controller probe and physical contact/coordinate/release events passed - on 2026-11-12 (see [NOTES.md]); Hyprland input delivery and GPU rendering - remain untested on the phone. +- Test the FTS5 touchscreen changes and GPU rendering on the phone before + marking them supported. From this rescue image, an SSH session can return to fastboot with `reboot-to bootloader`. The installed ROM's `recovery` image was verified from diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index 63ea13f65..c64ee4c57 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -9,6 +9,8 @@ the facts needed for review. | Date | `boot.img` SHA-256 | Source, as recorded | `/dev/sda` and UFS partitions | Checks and gaps | | --- | --- | --- | --- | --- | +| 2026-11-13 | `50356521ec35b361261de571fc9f8033b55c8fd7ad0689010fb55d0cec16401c` | Corrected RAM image with NFS-root request | Exposed whole-disk and partition flags read-only during the NFS session | Booted kernel `7.3.0-rc6-omamobile-push1` with the disposable NFS root. Installed `omamobile-omarchy 0.1.44-1` locally; its hook applied 29 Omarchy 4.0.6 patches and `omamobile-omarchy-patches verify` passed. `phone-smoke` found no failed systemd units or new kernel errors; USB, DSI enumeration, GPU render node, Hyprland/session, touch, buttons, Bluetooth and thermal checks passed. Root check correctly identifies NFS as non-persistent. Lock IPC was intermittent. No flash or explicit UFS-write command was issued; see the later userdata-root observation below. | +| 2026-11-13 | `50356521ec35b361261de571fc9f8033b55c8fd7ad0689010fb55d0cec16401c` | Corrected RAM image with NFS-root request | Exposed whole-disk and partition flags read-only during the NFS session | Booted kernel `7.3.0-rc6-omamobile-push1` with the disposable NFS root. Installed `omamobile-omarchy 0.1.44-1` locally; its hook applied 29 Omarchy 4.0.6 patches and `omamobile-omarchy-patches verify` passed. `phone-smoke` found no failed systemd units or new kernel errors; USB, DSI enumeration, GPU render node, Hyprland/session, touch, buttons, Bluetooth and thermal checks passed. Root check correctly identifies NFS as non-persistent. Lock IPC was intermittent. No flash or explicit UFS-write command was issued; see the later userdata-root observation below. | | 2026-11-13 | `1d4ce38579a881b6d875a9a3bc025357f753cf119ce5ce16b3dbdc52f86da9f9` | Local RAM image; retained manifest has image/kernel/ramdisk hashes but no source commit; no NFS-root request was included | All exposed whole-disk and partition `ro` flags were `1` | Initramfs and USB/SSH ran on `7.3.0-rc6-omamobile-push1`. `stmfts` registered as `event2`; three touch-key and 428 absolute events arrived during three taps. Display stayed black: only simpledrm `Unknown-1` was present, with no DSI panel/backlight device. Mounted disposable NFS root without switching PID 1; chroot `pacman -Qk omamobile-device-dipper` reported 47 files, none missing. `reboot-to bootloader` used the initramfs helper because PID 1 never switched. No UFS write. | | 2026-11-12 | `ac93a5d9f6787153cf620704f192c22da91cf2041789f16f4214111b8458d226` | Test kernel source: base `2a318a96ae9d4c87e061da1da13c05b11d305658` plus the FTS5 DTS change now proposed as kernel PR #249 commit `0d548847248512b1e8e1d40d66a85b81fe5ed471`; enabled directly for this test | `/dev/sda` absent (disk flag not applicable); `sdb`–`sdf` disk flags not read; all 85 partition flags `ro=1` | Full reserved range, kernel `7.3.0-rc6-omamobile-push1`, `stmfts` on `event2`, no Oops/BUG/panic/WARN. `qcom_wdt` and feeder state: not read. Exact touch X/Y extrema were not retained. No physical touch event captured; no UFS write. | | 2026-11-12 | `1bf0ffd5302fff7fa75f49382567063d7e03bd52083baa81a88107a47dcbdbd2` | The booted test overlay itself defined the full touch node; its exact source was not retained. The later rebuild uses #249's disabled node plus [`device/dipper/overlays/fts5-touchscreen.dtso`](overlays/fts5-touchscreen.dtso), blob `f09381d59a110d02a8b8819f585e304efb1870a3`; both proposed sources postdate the boot. | `/dev/sda` absent (disk flag not applicable); `sdb`–`sdf` disk flags not read; all 85 partition flags `ro=1` | `0x85fc0000–0x8a8fffff` reserved; `stmfts` exposed `event2` on I2C14; physical input included contact, changing X/Y coordinates and `ABS_MT_TRACKING_ID=-1` release. `qcom_wdt` was bound; feeder state: not read. Exact touch X/Y extrema were not retained. No UFS write. | @@ -31,6 +33,86 @@ were revalidated. The separate 7.1 GB compressed userdata archive passed its SHA-256 and zstd integrity checks; it remains a file-level, non-atomic archive, not a raw partition image. +The 2026-11-13 NFS-root run used Omarchy 4.0.6 and +`omamobile-omarchy 0.1.44-1`; it does not satisfy the owner's requested +Omarchy 4.5.0-3/`omamobile-omarchy 0.1.45` run. The full +`tools/phone-smoke` output and `networkctl status usb0` were not retained. +The corrected image was booted again, but its USB gadget did not provide ping, +SSH or NFS connectivity, so the refreshed run and those captures remain pending. + +The corrected NFS-root image above was booted with `fastboot boot`; it was not +flashed. The NFS test root's configured stable repository key was unknown to +the root's local pacman keyring, so it was not imported or trusted. The package +was built from the PR source on the phone and installed from the local archive +with a local-only pacman configuration. The pacman commands had no +`--nodeps`; all declared runtime dependencies were present in the root's local +package database. The normal `tools/phone-install-package` +repository path therefore remains unverified. During cleanup, the stale +`omamobile-wlan.service` was disabled in the disposable root because it waited +for unavailable modem/QMI services; Wi-Fi and modem remain unverified. + +After the NFS session, USB SSH became unavailable and later returned. The +device reported `/dev/sda21` (`PARTNAME=userdata`) as the ext4 root, mounted +read-write, with no NFS-root request. The owner confirmed this was the +pre-existing Linux installation on userdata, not an installation made by this +test. No flash or explicit UFS-write command was issued. The existing system +may perform routine writes while running; the separately verified userdata +backup is file-level and non-atomic. The phone was then placed in fastboot, +where the bootloader reported product `dipper`. The corrected NFS image was +RAM-booted again; its USB gadget enumerated, but ping and SSH did not respond +and no NFS connection reached the host at the time of this note. + +The old 4.0.6 test root also contained unowned files in +`/etc/systemd/system`: `omamobile-wlan.service`, +`omamobile-dipper-display.service` and `omamobile-nfs-trigger.service`. +The WLAN unit is a one-shot WCN3990/QMI startup calling +`/usr/local/bin/omamobile-wlan-up`; neither it nor that helper appears in a +package manifest or this repository. The display unit refers to a dirty local +kernel module release. The NFS trigger calls an unowned local helper. The old +root's package database does not identify who staged these files or when. +WLAN was disabled because modem/QMI is unverified; the other two are not +evidence of package-owned services. A new NFS root must omit all three. + +That root also had unowned files in +`/usr/lib/firmware/qcom/sdm845/dipper/`. The local porting record says +`a630_zap.mbn` and the Dipper DSP images were extracted from this phone's own +vendor firmware and reassembled outside this repository; the old root's +package database confirms they were not package-owned. `a630_sqe.fw` came +from `linux-firmware-qcom 20260916-1`. The exact per-file source hashes used +by the render run were not retained. No vendor firmware blob is committed. + +On 2026-11-13, the Mesa 1.5 package was extracted to tmpfs in the phone's +pre-existing userdata Linux root and tested from a console login with +`eglinfo -p gbm`. OpenGL core, compatibility and ES reported +`freedreno` / `FD630`; `LD_DEBUG=libs` confirmed this package's +`libgallium` and `dri_gbm.so` were loaded. This was not a Hyprland test and +the package was not installed to the root. The archive SHA-256 was +`6122aec6efa24194c5dca9733fd8a8936d92e8c99058f9c96d7cb0eb83b8a7fc`. + +The test root had `a630_sqe.fw` owned by `linux-firmware-qcom +20260916-1`; `a630_zap.mbn` was extracted and reassembled from this phone's +own vendor firmware, as described above. The exact kernel release, boot-image +hash and kernel source revision for this console session were not retained. +The raw `eglinfo` and `tools/phone-smoke --json` output were not retained. The +contemporaneous summary says the GPU render node and display passed, while the +session check reported Hyprland and the shell were not running. Retained build +metadata ties the package PKGBUILD checksum to Mesa commit +`83aa88ec413644dfc2336e6d09ee0a06481edd01`. The boot image SHA-256 and exact +kernel source revision for this console session were not retained, so this +renderer result cannot be correlated with a particular kernel image. Do not +describe this as a Hyprland renderer test. + +The missing Omarchy Hyprland files were copied from the test root's standard +user skeleton without overwriting existing files. `omamobile-setup-user` then +completed in the disposable test account; the monitor config contains scale 3, +and the earlier minimal config was kept as a recovery copy. Restarting SDDM +started Hyprland and the Omarchy shell automatically. A subsequent +`phone-smoke` confirmed the display, GPU, session, touch, buttons, Bluetooth +and thermal checks, with no failed units or new kernel errors. The root check +remains expectedly non-persistent, and lock IPC stayed intermittent. A +`phone-demo shot --wake` attempt did not complete, so visible desktop content +was not confirmed. No UFS write. + The original 10-29 count of 92 `/dev/block/by-name/` entries was not saved as a name list. The retained backup and kernel records cover 84 non-userdata GPT partitions plus `userdata`; the other seven names cannot be identified from the @@ -204,9 +286,8 @@ the owner confirmed the console was visible on the lit panel. All 85 partition flags were `ro=1`; `/dev/sda` was absent, while `/dev/sdb` through `/dev/sdf` remained present and had `ro=1` on this pre-#484 image. Backlight value 0 was accepted and restored to 511 (maximum 1023). Framebuffer blanking changed -DRM `dpms` from `On` to `Off` and back to `On`. FTS5 contact, coordinate -changes and release were later captured on 2026-11-12; see above. Hyprland -delivery remains untested. The panel log included a missing DSI `vdda` +DRM `dpms` from `On` to `Off` and back to `On`. The FTS5 touch input still needs +a test on the current kernel. The panel log included a missing DSI `vdda` supply (dummy regulator) and missing `a630_sqe.fw`; the display initialized, but GPU rendering was not tested. The RAM image had no Arch root, and the probe did not write UFS. The installed-system backup checksums were verified before @@ -250,9 +331,9 @@ procedure and supported single-slot writer are still required before a flash. fts,reset-gpio = <&tlmm 32 ...>; fts,default-fw-name = "st_fts_e1.ftb"; }`, with `fts,tp-vendor = <0x48>`. The running kernel's input device is `N: Name="fts"`. An `atmel,mxt-ts@4a` node exists as the alternate vendor and is not the active one. - Mainline's ST driver is `st,stmfts` (`drivers/input/touchscreen/stmfts.c`), - a different driver from Xiaomi's downstream `st_fts`; tested on Dipper - 2026-11-12, see above. No sibling board helps — + **Open:** mainline's ST driver is `st,stmfts` (`drivers/input/touchscreen/stmfts.c`), + a different driver from Xiaomi's downstream `st_fts`; the current FTS5 driver + has not been tested with Dipper's DTS node. No sibling board helps — polaris uses `syna,rmi4-i2c@20`, beryllium a FocalTech/Novatek part. - **Audio** `sdm845-tavil-snd-card` (WCD9340). **Fingerprint** Goodix, capacitive (`fingerprint_goodix`, `uinput-goodix`); no mainline driver, out of scope. From d7758edf3942bcc2605d31ccfd3c93934e47f976 Mon Sep 17 00:00:00 2001 From: Quatrix One Date: Fri, 13 Nov 2026 17:55:58 +0100 Subject: [PATCH 06/44] device/dipper: remove broken firmware aliases The published device tree requests Dipper firmware files that linux-firmware-qcom does not provide at its board-specific paths. Stop creating dangling aliases, keep the package dependency for generic GPU firmware, and document the phone-sourced files. Hide userdata along with every other UFS partition. Record which bring-up evidence is still unavailable. --- packages/omamobile-device-dipper/PKGBUILD | 4 ++++ packages/omamobile-device-dipper/README.md | 23 +++++++++++++++---- packages/omamobile-device-dipper/build | 2 +- packages/omamobile-device-dipper/install | 8 +------ packages/omamobile-device-dipper/test/all | 13 ++++------- .../udev/rules.d/10-omamobile-storage.rules | 5 ++-- 6 files changed, 31 insertions(+), 24 deletions(-) diff --git a/packages/omamobile-device-dipper/PKGBUILD b/packages/omamobile-device-dipper/PKGBUILD index 9df94a189..d9a6d2241 100644 --- a/packages/omamobile-device-dipper/PKGBUILD +++ b/packages/omamobile-device-dipper/PKGBUILD @@ -17,6 +17,10 @@ build() { "$startdir/build" "$srcdir" } +check() { + "$startdir/test/all" +} + package() { "$startdir/install" "$pkgdir" "$srcdir" } diff --git a/packages/omamobile-device-dipper/README.md b/packages/omamobile-device-dipper/README.md index f9ab16863..1ba2ba016 100644 --- a/packages/omamobile-device-dipper/README.md +++ b/packages/omamobile-device-dipper/README.md @@ -1,8 +1,9 @@ + # omamobile-device-dipper This package configures the Mi 8's USB network, keeps Android partitions out of desktop storage tools, transfers the hardware watchdog to systemd, and -provides firmware path aliases and a `reboot-to` helper. +provides a `reboot-to` helper. The watchdog timeout is 60 seconds, the value that reached multi-user in the recorded RAM/NFS boot ([device notes](../../device/dipper/NOTES.md)). @@ -11,10 +12,15 @@ It declares Mesa for the tested Freedreno graphics stack and the Qualcomm QRTR userspace packages needed by the WLAN and modem stacks. Their services are not enabled here. -Firmware blobs remain in `linux-firmware-qcom`; the package creates relative -symlinks under the path used by the device tree. It does not copy phone data or -firmware into this repository. The `[omamobile]` repository mirrorlist is -installed for future package updates. QRTR, `pd-mapper`, `tqftpserv` and +The published Dipper device tree requests `adsp.mbn`, `a630_zap.mbn`, +`ipa_fws.mbn`, `mba.mbn` and `modem.mbn` under +`qcom/sdm845/Xiaomi/dipper/`, plus Bluetooth calibration +`Xiaomi/dipper/crnv21.bin`. These device-specific blobs must be extracted +from the owner's phone or image; they are not included here. The +`linux-firmware-qcom` dependency supplies generic Qualcomm firmware such as +`a630_sqe.fw`, but does not supply those Dipper-specific names. The +`[omamobile]` repository mirrorlist is installed for future package updates. +QRTR, `pd-mapper`, `tqftpserv` and `rmtfs` are dependencies, but their services are not enabled here; no service in this package writes the modem's partitions. @@ -23,6 +29,13 @@ The package installs the same device descriptor used by the build tools. Dipper support remains RAM-boot only. The single `boot` partition and UFS storage are not written by this package. +Suspend is untested and must stay disabled while booting an NFS root, since the +USB link carries the root filesystem. + +The USB route uses metric 1000 for Dipper's NFS-root session, where USB carries +the root filesystem. The Pixel profiles use 2000 so Wi-Fi (metric 600) and +cellular (metric 700) stay preferred over USB. + ## Build and test ```sh diff --git a/packages/omamobile-device-dipper/build b/packages/omamobile-device-dipper/build index b5c96a4db..1ddf89489 100755 --- a/packages/omamobile-device-dipper/build +++ b/packages/omamobile-device-dipper/build @@ -1,6 +1,6 @@ #!/bin/bash # SPDX-License-Identifier: MIT -# Compile the shared reboot-to helper for the installed system. +# Compile this package's reboot-to helper for the installed system. set -euo pipefail cd -- "$(dirname -- "${BASH_SOURCE[0]}")" out=${1:-build} diff --git a/packages/omamobile-device-dipper/install b/packages/omamobile-device-dipper/install index ac6b05c1d..2b642b8e6 100755 --- a/packages/omamobile-device-dipper/install +++ b/packages/omamobile-device-dipper/install @@ -1,6 +1,6 @@ #!/bin/bash # SPDX-License-Identifier: MIT -# Stage the Dipper firmware path aliases; firmware itself comes from linux-firmware-qcom. +# Stage Dipper's device package files. set -euo pipefail cd -- "$(dirname -- "${BASH_SOURCE[0]}")" destination=${1:?Usage: ./install ABSOLUTE_DESTDIR} @@ -18,12 +18,6 @@ install -Dm644 vendor/systemd/logind.conf.d/10-omamobile-power-key.conf \ "$destination/usr/lib/systemd/logind.conf.d/10-omamobile-power-key.conf" install -Dm644 vendor/NetworkManager/conf.d/10-omamobile-usb.conf \ "$destination/usr/lib/NetworkManager/conf.d/10-omamobile-usb.conf" -firmware_dir="$destination/usr/lib/firmware/qcom/sdm845" -aliases=(adsp.mbn adspua.jsn adspr.jsn a630_zap.mbn cdsp.mbn cdspr.jsn ipa_fws.mbn mba.mbn modem.mbn modemr.jsn modemuw.mbn slpir.jsn slpius.jsn wlanmdsp.mbn) -for firmware in "${aliases[@]}"; do - install -d "$firmware_dir/Xiaomi/dipper" - ln -sfn "../../dipper/$firmware" "$firmware_dir/Xiaomi/dipper/$firmware" -done install -Dm644 "$(dirname -- "${BASH_SOURCE[0]}")/version" \ "$destination/usr/share/omamobile/device-dipper/version" install -Dm644 etc/omamobile-mirrorlist "$destination/etc/pacman.d/omamobile-mirrorlist" diff --git a/packages/omamobile-device-dipper/test/all b/packages/omamobile-device-dipper/test/all index 40a71c39f..2f77dd0cd 100755 --- a/packages/omamobile-device-dipper/test/all +++ b/packages/omamobile-device-dipper/test/all @@ -10,11 +10,6 @@ bash -n build install omamobile-device-dipper.install || fail "package scripts p ./build "$tmp/build" (cd "$tmp" && "$package_dir/install" "$tmp/root" "$tmp/build") [[ -x "$tmp/root/usr/bin/reboot-to" ]] || fail "reboot-to is staged" -aliases=(adsp.mbn adspua.jsn adspr.jsn a630_zap.mbn cdsp.mbn cdspr.jsn ipa_fws.mbn mba.mbn modem.mbn modemr.jsn modemuw.mbn slpir.jsn slpius.jsn wlanmdsp.mbn) -for firmware in "${aliases[@]}"; do - link="$tmp/root/usr/lib/firmware/qcom/sdm845/Xiaomi/dipper/$firmware" - [[ $(readlink "$link") == "../../dipper/$firmware" ]] || fail "firmware alias $firmware" -done [[ -f "$tmp/root/usr/share/omamobile/device-dipper/version" ]] || fail "device version is staged" grep -q 'depends=(bash systemd omamobile-keyring linux-firmware-qcom mesa qrtr pd-mapper tqftpserv rmtfs)' PKGBUILD || fail "runtime dependencies are declared" grep -q '^install=omamobile-device-dipper.install$' PKGBUILD || fail "repository hook is declared" @@ -30,13 +25,15 @@ for path in \ usr/share/licenses/omamobile-device-dipper/LICENSE; do [[ -f "$tmp/root/$path" ]] || fail "install stages $path" done -cmp -s device.conf ../../device/dipper/device.conf || fail "packaged descriptor matches the device descriptor" +if [[ -f ../../device/dipper/device.conf ]]; then + cmp -s device.conf ../../device/dipper/device.conf || fail "packaged descriptor matches the device descriptor" +fi grep -q '^post_install()' omamobile-device-dipper.install || fail "package install adds the [omamobile] repo" grep -q '^post_upgrade()' omamobile-device-dipper.install || fail "package upgrade keeps the [omamobile] repo" grep -q 'KERNEL=="sd\[a-f\]", MODE="0000"' "$tmp/root/usr/lib/udev/rules.d/10-omamobile-storage.rules" || fail "all UFS whole-disk nodes are inaccessible" -grep -q 'ID_PART_ENTRY_NAME}!="userdata"' "$tmp/root/usr/lib/udev/rules.d/10-omamobile-storage.rules" || fail "only userdata is visible to desktop tools" +grep -q 'KERNEL=="sd\[a-f\]\[0-9\]\*", ENV{UDISKS_IGNORE}="1"' "$tmp/root/usr/lib/udev/rules.d/10-omamobile-storage.rules" || fail "all UFS partitions are hidden from desktop tools" grep -q '^Address=172.16.42.1/24$' "$tmp/root/usr/lib/systemd/network/20-usb-gadget.network" || fail "usb0 keeps the initramfs address" grep -q '^RuntimeWatchdogSec=60s$' "$tmp/root/usr/lib/systemd/system.conf.d/10-omamobile-watchdog.conf" || fail "systemd keeps the tested watchdog timeout" [[ ! -e "$tmp/root/usr/lib/systemd/system/omamobile-dipper-identity.service" ]] || fail "identity service stays disabled" [[ ! -e "$tmp/root/usr/lib/systemd/system/omamobile-tailscale-join.service" ]] || fail "tailnet service is not included" -printf 'ok - Dipper firmware aliases and dependencies\n' +printf 'ok - Dipper package files and dependencies\n' diff --git a/packages/omamobile-device-dipper/vendor/udev/rules.d/10-omamobile-storage.rules b/packages/omamobile-device-dipper/vendor/udev/rules.d/10-omamobile-storage.rules index 6aba24c5f..8c04ecb6e 100644 --- a/packages/omamobile-device-dipper/vendor/udev/rules.d/10-omamobile-storage.rules +++ b/packages/omamobile-device-dipper/vendor/udev/rules.d/10-omamobile-storage.rules @@ -1,5 +1,4 @@ # SPDX-License-Identifier: MIT -# Dipper's UFS spans sda through sdf. The initramfs keeps all partitions -# read-only except userdata; hide whole disks and Android partitions after boot. +# Dipper's UFS spans sda through sdf. Keep every whole disk and partition hidden. SUBSYSTEM=="block", KERNEL=="sd[a-f]", MODE="0000", ENV{UDISKS_IGNORE}="1" -SUBSYSTEM=="block", KERNEL=="sd[a-f][0-9]*", ENV{ID_PART_ENTRY_NAME}!="userdata", ENV{UDISKS_IGNORE}="1" +SUBSYSTEM=="block", KERNEL=="sd[a-f][0-9]*", ENV{UDISKS_IGNORE}="1" From 070a440763158fe9914ec177fc8c3882ef2f8815 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Fri, 13 Nov 2026 18:15:47 +0100 Subject: [PATCH 07/44] docs(dipper): keep FTS5 and NFS evidence together Preserve the kernel PR review rows, stale-DTB explanation, and pre-boot/reserved-memory stop gate when the package PR is based on #704. --- device/dipper/BRINGUP-M1.md | 12 ++++++++++-- device/dipper/NOTES.md | 12 ++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/device/dipper/BRINGUP-M1.md b/device/dipper/BRINGUP-M1.md index 4ef5d99b9..4fe79f9d0 100644 --- a/device/dipper/BRINGUP-M1.md +++ b/device/dipper/BRINGUP-M1.md @@ -61,6 +61,13 @@ archive's checksum file. Do not boot if either backup is missing or fails. without changing UFS, and the screen stays lit because simpledrm holds the panel's VCI and VDDIO rails. If it goes dark about 30 seconds in, record `dmesg | grep -i -E 'regulator|simple'` and stop. + **Pre-boot DTB check:** before running `fastboot boot`, decompile the exact + packed DTB on the laptop with + `dtc -I dtb -O dts` and verify it contains both + `removed-region@86200000` and `removed-region@89100000`. On the phone, + before touching the screen or doing any other test, verify + `/proc/iomem` marks the complete `0x85fc0000–0x8a8fffff` range reserved. + If it does not, stop immediately and run `reboot-to bootloader`. Pass only when `uname -r`, the `boot.img` sha256, all partition `ro` values, whole-disk `ro` values, and `ufs-ro` lines from `dmesg` are recorded. `/dev/sda` must be absent or present with `/sys/block/sda/ro=1` in NFS mode; @@ -119,8 +126,9 @@ repository; the SSH public key and generated host key stay in the local output. change was not retained. The 2026-11-10 NFS test root reached systemd with `RuntimeWatchdogSec=60s`; NFS link-loss recovery and the Omarchy desktop on that root remain untested. -- Test the FTS5 touchscreen changes and GPU rendering on the phone before - marking them supported. +- FTS5 controller probe and physical contact/coordinate/release events passed + on 2026-11-12 (see [NOTES.md]); Hyprland input delivery and GPU rendering + remain untested on the phone. From this rescue image, an SSH session can return to fastboot with `reboot-to bootloader`. The installed ROM's `recovery` image was verified from diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index c64ee4c57..71d568669 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -10,7 +10,6 @@ the facts needed for review. | Date | `boot.img` SHA-256 | Source, as recorded | `/dev/sda` and UFS partitions | Checks and gaps | | --- | --- | --- | --- | --- | | 2026-11-13 | `50356521ec35b361261de571fc9f8033b55c8fd7ad0689010fb55d0cec16401c` | Corrected RAM image with NFS-root request | Exposed whole-disk and partition flags read-only during the NFS session | Booted kernel `7.3.0-rc6-omamobile-push1` with the disposable NFS root. Installed `omamobile-omarchy 0.1.44-1` locally; its hook applied 29 Omarchy 4.0.6 patches and `omamobile-omarchy-patches verify` passed. `phone-smoke` found no failed systemd units or new kernel errors; USB, DSI enumeration, GPU render node, Hyprland/session, touch, buttons, Bluetooth and thermal checks passed. Root check correctly identifies NFS as non-persistent. Lock IPC was intermittent. No flash or explicit UFS-write command was issued; see the later userdata-root observation below. | -| 2026-11-13 | `50356521ec35b361261de571fc9f8033b55c8fd7ad0689010fb55d0cec16401c` | Corrected RAM image with NFS-root request | Exposed whole-disk and partition flags read-only during the NFS session | Booted kernel `7.3.0-rc6-omamobile-push1` with the disposable NFS root. Installed `omamobile-omarchy 0.1.44-1` locally; its hook applied 29 Omarchy 4.0.6 patches and `omamobile-omarchy-patches verify` passed. `phone-smoke` found no failed systemd units or new kernel errors; USB, DSI enumeration, GPU render node, Hyprland/session, touch, buttons, Bluetooth and thermal checks passed. Root check correctly identifies NFS as non-persistent. Lock IPC was intermittent. No flash or explicit UFS-write command was issued; see the later userdata-root observation below. | | 2026-11-13 | `1d4ce38579a881b6d875a9a3bc025357f753cf119ce5ce16b3dbdc52f86da9f9` | Local RAM image; retained manifest has image/kernel/ramdisk hashes but no source commit; no NFS-root request was included | All exposed whole-disk and partition `ro` flags were `1` | Initramfs and USB/SSH ran on `7.3.0-rc6-omamobile-push1`. `stmfts` registered as `event2`; three touch-key and 428 absolute events arrived during three taps. Display stayed black: only simpledrm `Unknown-1` was present, with no DSI panel/backlight device. Mounted disposable NFS root without switching PID 1; chroot `pacman -Qk omamobile-device-dipper` reported 47 files, none missing. `reboot-to bootloader` used the initramfs helper because PID 1 never switched. No UFS write. | | 2026-11-12 | `ac93a5d9f6787153cf620704f192c22da91cf2041789f16f4214111b8458d226` | Test kernel source: base `2a318a96ae9d4c87e061da1da13c05b11d305658` plus the FTS5 DTS change now proposed as kernel PR #249 commit `0d548847248512b1e8e1d40d66a85b81fe5ed471`; enabled directly for this test | `/dev/sda` absent (disk flag not applicable); `sdb`–`sdf` disk flags not read; all 85 partition flags `ro=1` | Full reserved range, kernel `7.3.0-rc6-omamobile-push1`, `stmfts` on `event2`, no Oops/BUG/panic/WARN. `qcom_wdt` and feeder state: not read. Exact touch X/Y extrema were not retained. No physical touch event captured; no UFS write. | | 2026-11-12 | `1bf0ffd5302fff7fa75f49382567063d7e03bd52083baa81a88107a47dcbdbd2` | The booted test overlay itself defined the full touch node; its exact source was not retained. The later rebuild uses #249's disabled node plus [`device/dipper/overlays/fts5-touchscreen.dtso`](overlays/fts5-touchscreen.dtso), blob `f09381d59a110d02a8b8819f585e304efb1870a3`; both proposed sources postdate the boot. | `/dev/sda` absent (disk flag not applicable); `sdb`–`sdf` disk flags not read; all 85 partition flags `ro=1` | `0x85fc0000–0x8a8fffff` reserved; `stmfts` exposed `event2` on I2C14; physical input included contact, changing X/Y coordinates and `ABS_MT_TRACKING_ID=-1` release. `qcom_wdt` was bound; feeder state: not read. Exact touch X/Y extrema were not retained. No UFS write. | @@ -286,8 +285,9 @@ the owner confirmed the console was visible on the lit panel. All 85 partition flags were `ro=1`; `/dev/sda` was absent, while `/dev/sdb` through `/dev/sdf` remained present and had `ro=1` on this pre-#484 image. Backlight value 0 was accepted and restored to 511 (maximum 1023). Framebuffer blanking changed -DRM `dpms` from `On` to `Off` and back to `On`. The FTS5 touch input still needs -a test on the current kernel. The panel log included a missing DSI `vdda` +DRM `dpms` from `On` to `Off` and back to `On`. FTS5 contact, coordinate +changes and release were later captured on 2026-11-12; see above. Hyprland +delivery remains untested. The panel log included a missing DSI `vdda` supply (dummy regulator) and missing `a630_sqe.fw`; the display initialized, but GPU rendering was not tested. The RAM image had no Arch root, and the probe did not write UFS. The installed-system backup checksums were verified before @@ -331,9 +331,9 @@ procedure and supported single-slot writer are still required before a flash. fts,reset-gpio = <&tlmm 32 ...>; fts,default-fw-name = "st_fts_e1.ftb"; }`, with `fts,tp-vendor = <0x48>`. The running kernel's input device is `N: Name="fts"`. An `atmel,mxt-ts@4a` node exists as the alternate vendor and is not the active one. - **Open:** mainline's ST driver is `st,stmfts` (`drivers/input/touchscreen/stmfts.c`), - a different driver from Xiaomi's downstream `st_fts`; the current FTS5 driver - has not been tested with Dipper's DTS node. No sibling board helps — + Mainline's ST driver is `st,stmfts` (`drivers/input/touchscreen/stmfts.c`), + a different driver from Xiaomi's downstream `st_fts`; tested on Dipper + 2026-11-12, see above. No sibling board helps — polaris uses `syna,rmi4-i2c@20`, beryllium a FocalTech/Novatek part. - **Audio** `sdm845-tavil-snd-card` (WCD9340). **Fingerprint** Goodix, capacitive (`fingerprint_goodix`, `uinput-goodix`); no mainline driver, out of scope. From 3bc80f204a063e99bd9b3a2326b57c30f629b939 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Sat, 14 Nov 2026 02:15:23 +0100 Subject: [PATCH 08/44] dipper: record NFS probe and enable EA8074 --- device/dipper/BRINGUP-M1.md | 2 +- device/dipper/NOTES.md | 1 + device/dipper/kernel.config | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/device/dipper/BRINGUP-M1.md b/device/dipper/BRINGUP-M1.md index 4fe79f9d0..090d47223 100644 --- a/device/dipper/BRINGUP-M1.md +++ b/device/dipper/BRINGUP-M1.md @@ -1,7 +1,7 @@ # Xiaomi Mi 8 (dipper): RAM-only first light -**Status (2026-11-13):** the latest completed Omarchy NFS-root run used Omarchy 4.0.6 and `omamobile-omarchy 0.1.44`; it does not meet the owner's request for Omarchy 4.5.0-3 and `omamobile-omarchy 0.1.45`. The corrected image was RAM-booted again, but its USB gadget did not provide ping, SSH or NFS connectivity, so the refreshed run, raw `phone-smoke` output and `networkctl status usb0` remain pending. The NFS run reached Hyprland, but visible contents were not captured. Separately, Mesa 1.5 rendered with Freedreno `FD630` from a console in the pre-existing userdata Linux root; this did not test Hyprland. The owner confirmed that userdata installation predated these tests. No image was flashed. Earlier RAM boots are recorded below and in [NOTES.md]. +**Status (2026-11-14):** a fresh rootfs was built with Omarchy 4.5.0-3 and `omamobile-omarchy 0.1.45`; all build-time rootfs smoke checks passed. The Dipper kernel and EA8074 panel module also built. The RAM-only NFS test did not reach the new root: a later SSH session reported the existing kernel (`g2a318a96ae9d-dirty`) and an `ext4` root. `reboot-to bootloader` returned the phone to fastboot. The test image showed no firstboot log or created test account. `/proc/iomem`, UFS read-only flags, `tools/phone-smoke`, `networkctl status usb0` and the visible desktop were not captured. No flash command was issued; because the existing ext4 system ran, incidental userdata writes by that system cannot be ruled out and the earlier file-level backup may be stale. Earlier RAM boots and test limits are recorded in [NOTES.md]. A separate RAM NFS-root run used image `a2d435a7430e7e4c145c61cdb9866d16929731859d91c7105e6bfcaf9e3e9dd7` with the rebased #503 init. BusyBox `mount` switched to the test NFS root; all six disk flags and all 85 partition flags were `ro=1`. Systemd reached the multi-user target with `RuntimeWatchdogSec=60s`, and SSH remained available. `reboot-to bootloader` returned the phone to fastboot. The exported root was a generic Arch base; this did not test the Omarchy desktop or link-loss recovery. Full results are in [NOTES.md]. The FTS5 driver from [touch #219] is merged into linux-omarchy-mobile. The diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index 71d568669..04cbc861c 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -9,6 +9,7 @@ the facts needed for review. | Date | `boot.img` SHA-256 | Source, as recorded | `/dev/sda` and UFS partitions | Checks and gaps | | --- | --- | --- | --- | --- | +| 2026-11-14 | `d7bdde5e35b5c78a5878ebf4df28effefca35bed9a26c39098f473278d233ead` (debug image: `c86d517e5c3c5940f3099f46524968d59ddf6e0a258aac51fd00547b7acc24bb`) | Kernel `7.3.0-rc6-omamobile-push1-g7062b50298ff`, source `7062b50298ff2868e5a8a0be70483227e9c7db0b`; rootfs image SHA-256 `75f2dc67630c2661705f3b796170621a3582d96093893ed72e6f680ec34581ce` | No `/proc/iomem` or UFS `ro` flags were captured. A later SSH session reported kernel `7.3.0-rc6-omamobile-push1-g2a318a96ae9d-dirty` and root type `ext4`; `reboot-to bootloader` returned the phone to fastboot. | Omarchy 4.5.0-3 / `omamobile-omarchy 0.1.45` rootfs build and all rootfs smoke checks passed; 1818 kernel modules included `qcom-wdt`, MSM DRM and EA8074. The NFS image showed no firstboot log or created test account. Raw `phone-smoke`, `networkctl status usb0` and display evidence are missing. No flash command was issued; incidental writes by the existing ext4 system cannot be ruled out, so the earlier userdata backup may be stale. | | 2026-11-13 | `50356521ec35b361261de571fc9f8033b55c8fd7ad0689010fb55d0cec16401c` | Corrected RAM image with NFS-root request | Exposed whole-disk and partition flags read-only during the NFS session | Booted kernel `7.3.0-rc6-omamobile-push1` with the disposable NFS root. Installed `omamobile-omarchy 0.1.44-1` locally; its hook applied 29 Omarchy 4.0.6 patches and `omamobile-omarchy-patches verify` passed. `phone-smoke` found no failed systemd units or new kernel errors; USB, DSI enumeration, GPU render node, Hyprland/session, touch, buttons, Bluetooth and thermal checks passed. Root check correctly identifies NFS as non-persistent. Lock IPC was intermittent. No flash or explicit UFS-write command was issued; see the later userdata-root observation below. | | 2026-11-13 | `1d4ce38579a881b6d875a9a3bc025357f753cf119ce5ce16b3dbdc52f86da9f9` | Local RAM image; retained manifest has image/kernel/ramdisk hashes but no source commit; no NFS-root request was included | All exposed whole-disk and partition `ro` flags were `1` | Initramfs and USB/SSH ran on `7.3.0-rc6-omamobile-push1`. `stmfts` registered as `event2`; three touch-key and 428 absolute events arrived during three taps. Display stayed black: only simpledrm `Unknown-1` was present, with no DSI panel/backlight device. Mounted disposable NFS root without switching PID 1; chroot `pacman -Qk omamobile-device-dipper` reported 47 files, none missing. `reboot-to bootloader` used the initramfs helper because PID 1 never switched. No UFS write. | | 2026-11-12 | `ac93a5d9f6787153cf620704f192c22da91cf2041789f16f4214111b8458d226` | Test kernel source: base `2a318a96ae9d4c87e061da1da13c05b11d305658` plus the FTS5 DTS change now proposed as kernel PR #249 commit `0d548847248512b1e8e1d40d66a85b81fe5ed471`; enabled directly for this test | `/dev/sda` absent (disk flag not applicable); `sdb`–`sdf` disk flags not read; all 85 partition flags `ro=1` | Full reserved range, kernel `7.3.0-rc6-omamobile-push1`, `stmfts` on `event2`, no Oops/BUG/panic/WARN. `qcom_wdt` and feeder state: not read. Exact touch X/Y extrema were not retained. No physical touch event captured; no UFS write. | diff --git a/device/dipper/kernel.config b/device/dipper/kernel.config index f24173e2f..5c764c254 100644 --- a/device/dipper/kernel.config +++ b/device/dipper/kernel.config @@ -57,6 +57,8 @@ CONFIG_SPI_QCOM_GENI=m CONFIG_DRM_MSM=m CONFIG_DRM_SIMPLEDRM=y CONFIG_SYSFB_SIMPLEFB=y +# Keep Dipper's EA8074 panel available to the MSM display stack. +CONFIG_DRM_PANEL_SAMSUNG_EA8074=m # The remoteprocs Wi-Fi depends on (the modem hosts the WLAN firmware) stay # modules. Built in they pushed the kernel past what this ABL will load: a From f3e0dfa6839ad140eb3822275ef700d11f040b65 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Sat, 14 Nov 2026 02:22:02 +0100 Subject: [PATCH 09/44] dipper: list exact firmware paths requested by DTS --- packages/omamobile-device-dipper/README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/omamobile-device-dipper/README.md b/packages/omamobile-device-dipper/README.md index 1ba2ba016..037b16cd2 100644 --- a/packages/omamobile-device-dipper/README.md +++ b/packages/omamobile-device-dipper/README.md @@ -12,13 +12,12 @@ It declares Mesa for the tested Freedreno graphics stack and the Qualcomm QRTR userspace packages needed by the WLAN and modem stacks. Their services are not enabled here. -The published Dipper device tree requests `adsp.mbn`, `a630_zap.mbn`, -`ipa_fws.mbn`, `mba.mbn` and `modem.mbn` under -`qcom/sdm845/Xiaomi/dipper/`, plus Bluetooth calibration -`Xiaomi/dipper/crnv21.bin`. These device-specific blobs must be extracted -from the owner's phone or image; they are not included here. The +The Dipper device tree explicitly requests `a630_zap.mbn`, `ipa_fws.mbn`, +`mba.mbn` and `modem.mbn` under `qcom/sdm845/Xiaomi/dipper/`, plus Bluetooth +calibration `Xiaomi/dipper/crnv21.bin`. These device-specific blobs must be +extracted from the owner's phone or image; they are not included here. The `linux-firmware-qcom` dependency supplies generic Qualcomm firmware such as -`a630_sqe.fw`, but does not supply those Dipper-specific names. The +`a630_sqe.fw`, but does not supply these Dipper-specific names. The `[omamobile]` repository mirrorlist is installed for future package updates. QRTR, `pd-mapper`, `tqftpserv` and `rmtfs` are dependencies, but their services are not enabled here; no service From 77b877c1211e2dcb3efb28d1410c3c46ba6833f3 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Sat, 14 Nov 2026 22:48:49 +0100 Subject: [PATCH 10/44] device/dipper: record unreachable current NFS boot --- device/dipper/BRINGUP-M1.md | 2 ++ device/dipper/NOTES.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/device/dipper/BRINGUP-M1.md b/device/dipper/BRINGUP-M1.md index 090d47223..e11d4a933 100644 --- a/device/dipper/BRINGUP-M1.md +++ b/device/dipper/BRINGUP-M1.md @@ -3,6 +3,8 @@ **Status (2026-11-14):** a fresh rootfs was built with Omarchy 4.5.0-3 and `omamobile-omarchy 0.1.45`; all build-time rootfs smoke checks passed. The Dipper kernel and EA8074 panel module also built. The RAM-only NFS test did not reach the new root: a later SSH session reported the existing kernel (`g2a318a96ae9d-dirty`) and an `ext4` root. `reboot-to bootloader` returned the phone to fastboot. The test image showed no firstboot log or created test account. `/proc/iomem`, UFS read-only flags, `tools/phone-smoke`, `networkctl status usb0` and the visible desktop were not captured. No flash command was issued; because the existing ext4 system ran, incidental userdata writes by that system cannot be ruled out and the earlier file-level backup may be stale. Earlier RAM boots and test limits are recorded in [NOTES.md]. +A retry of image `d7bdde5e35b5c78a5878ebf4df28effefca35bed9a26c39098f473278d233ead` was accepted by `fastboot boot`, but the host saw no ARP reply and a 10-second capture contained no SSH, RPC or NFS packets. The root handoff remains unverified. The exported image was checked on the host: it has Omarchy 4.5.0-3, `omamobile-omarchy 0.1.45`, `omamobile-device-dipper 0.1.0`, all seven runtime dependencies and 375 package-owned `/usr/lib/systemd/system/*.service` files; the three old unowned units and WLAN helper are absent. No phone-side `phone-smoke`, `networkctl status usb0`, `/proc/iomem`, UFS flags or display observation could be collected from this boot. No flash or explicit UFS-write command was issued; with the running root unknown, incidental writes cannot be ruled out. + A separate RAM NFS-root run used image `a2d435a7430e7e4c145c61cdb9866d16929731859d91c7105e6bfcaf9e3e9dd7` with the rebased #503 init. BusyBox `mount` switched to the test NFS root; all six disk flags and all 85 partition flags were `ro=1`. Systemd reached the multi-user target with `RuntimeWatchdogSec=60s`, and SSH remained available. `reboot-to bootloader` returned the phone to fastboot. The exported root was a generic Arch base; this did not test the Omarchy desktop or link-loss recovery. Full results are in [NOTES.md]. The FTS5 driver from [touch #219] is merged into linux-omarchy-mobile. The Dipper board DTS from [DTS #220] is merged too (2026-11-11), and the EA8074 diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index 04cbc861c..e34f9201f 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -9,7 +9,7 @@ the facts needed for review. | Date | `boot.img` SHA-256 | Source, as recorded | `/dev/sda` and UFS partitions | Checks and gaps | | --- | --- | --- | --- | --- | -| 2026-11-14 | `d7bdde5e35b5c78a5878ebf4df28effefca35bed9a26c39098f473278d233ead` (debug image: `c86d517e5c3c5940f3099f46524968d59ddf6e0a258aac51fd00547b7acc24bb`) | Kernel `7.3.0-rc6-omamobile-push1-g7062b50298ff`, source `7062b50298ff2868e5a8a0be70483227e9c7db0b`; rootfs image SHA-256 `75f2dc67630c2661705f3b796170621a3582d96093893ed72e6f680ec34581ce` | No `/proc/iomem` or UFS `ro` flags were captured. A later SSH session reported kernel `7.3.0-rc6-omamobile-push1-g2a318a96ae9d-dirty` and root type `ext4`; `reboot-to bootloader` returned the phone to fastboot. | Omarchy 4.5.0-3 / `omamobile-omarchy 0.1.45` rootfs build and all rootfs smoke checks passed; 1818 kernel modules included `qcom-wdt`, MSM DRM and EA8074. The NFS image showed no firstboot log or created test account. Raw `phone-smoke`, `networkctl status usb0` and display evidence are missing. No flash command was issued; incidental writes by the existing ext4 system cannot be ruled out, so the earlier userdata backup may be stale. | +| 2026-11-14 | `d7bdde5e35b5c78a5878ebf4df28effefca35bed9a26c39098f473278d233ead` (debug image: `c86d517e5c3c5940f3099f46524968d59ddf6e0a258aac51fd00547b7acc24bb`) | Kernel `7.3.0-rc6-omamobile-push1-g7062b50298ff`, source `7062b50298ff2868e5a8a0be70483227e9c7db0b`; rootfs image SHA-256 `75f2dc67630c2661705f3b796170621a3582d96093893ed72e6f680ec34581ce` | No `/proc/iomem` or UFS `ro` flags were captured. A later SSH session reported kernel `7.3.0-rc6-omamobile-push1-g2a318a96ae9d-dirty` and root type `ext4`; `reboot-to bootloader` returned the phone to fastboot. | Omarchy 4.5.0-3 / `omamobile-omarchy 0.1.45` rootfs build and all rootfs smoke checks passed; 1818 kernel modules included `qcom-wdt`, MSM DRM and EA8074. The NFS image showed no firstboot log or created test account. A retry of this image was accepted by `fastboot boot`, but a 10-second host capture saw no SSH/RPC/NFS packets and an ARP probe got no reply. Raw `phone-smoke`, `networkctl status usb0`, `/proc/iomem`, UFS flags and display evidence remain unavailable. No flash command was issued; incidental writes by the existing ext4 system cannot be ruled out, so the earlier userdata backup may be stale. | | 2026-11-13 | `50356521ec35b361261de571fc9f8033b55c8fd7ad0689010fb55d0cec16401c` | Corrected RAM image with NFS-root request | Exposed whole-disk and partition flags read-only during the NFS session | Booted kernel `7.3.0-rc6-omamobile-push1` with the disposable NFS root. Installed `omamobile-omarchy 0.1.44-1` locally; its hook applied 29 Omarchy 4.0.6 patches and `omamobile-omarchy-patches verify` passed. `phone-smoke` found no failed systemd units or new kernel errors; USB, DSI enumeration, GPU render node, Hyprland/session, touch, buttons, Bluetooth and thermal checks passed. Root check correctly identifies NFS as non-persistent. Lock IPC was intermittent. No flash or explicit UFS-write command was issued; see the later userdata-root observation below. | | 2026-11-13 | `1d4ce38579a881b6d875a9a3bc025357f753cf119ce5ce16b3dbdc52f86da9f9` | Local RAM image; retained manifest has image/kernel/ramdisk hashes but no source commit; no NFS-root request was included | All exposed whole-disk and partition `ro` flags were `1` | Initramfs and USB/SSH ran on `7.3.0-rc6-omamobile-push1`. `stmfts` registered as `event2`; three touch-key and 428 absolute events arrived during three taps. Display stayed black: only simpledrm `Unknown-1` was present, with no DSI panel/backlight device. Mounted disposable NFS root without switching PID 1; chroot `pacman -Qk omamobile-device-dipper` reported 47 files, none missing. `reboot-to bootloader` used the initramfs helper because PID 1 never switched. No UFS write. | | 2026-11-12 | `ac93a5d9f6787153cf620704f192c22da91cf2041789f16f4214111b8458d226` | Test kernel source: base `2a318a96ae9d4c87e061da1da13c05b11d305658` plus the FTS5 DTS change now proposed as kernel PR #249 commit `0d548847248512b1e8e1d40d66a85b81fe5ed471`; enabled directly for this test | `/dev/sda` absent (disk flag not applicable); `sdb`–`sdf` disk flags not read; all 85 partition flags `ro=1` | Full reserved range, kernel `7.3.0-rc6-omamobile-push1`, `stmfts` on `event2`, no Oops/BUG/panic/WARN. `qcom_wdt` and feeder state: not read. Exact touch X/Y extrema were not retained. No physical touch event captured; no UFS write. | From 410e699a626ab871b8b287f5f1dfc44384244d46 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Sun, 15 Nov 2026 00:57:31 +0100 Subject: [PATCH 11/44] dipper: record verified userdata backup --- device/dipper/BRINGUP-M1.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/device/dipper/BRINGUP-M1.md b/device/dipper/BRINGUP-M1.md index e11d4a933..30438da67 100644 --- a/device/dipper/BRINGUP-M1.md +++ b/device/dipper/BRINGUP-M1.md @@ -5,6 +5,8 @@ A retry of image `d7bdde5e35b5c78a5878ebf4df28effefca35bed9a26c39098f473278d233ead` was accepted by `fastboot boot`, but the host saw no ARP reply and a 10-second capture contained no SSH, RPC or NFS packets. The root handoff remains unverified. The exported image was checked on the host: it has Omarchy 4.5.0-3, `omamobile-omarchy 0.1.45`, `omamobile-device-dipper 0.1.0`, all seven runtime dependencies and 375 package-owned `/usr/lib/systemd/system/*.service` files; the three old unowned units and WLAN helper are absent. No phone-side `phone-smoke`, `networkctl status usb0`, `/proc/iomem`, UFS flags or display observation could be collected from this boot. No flash or explicit UFS-write command was issued; with the running root unknown, incidental writes cannot be ruled out. +Before that retry, the 84-partition read-only backup was revalidated and `userdata` was recaptured to a private off-repository file archive from an ext4 mount using `ro,noload`. GNU tar preserved numeric ownership, modes, sparse files, ACLs and xattrs; zstd integrity and a full tar listing passed. This supersedes the older possibly stale userdata archive. It is a file-level, non-atomic archive, not a raw partition image. + A separate RAM NFS-root run used image `a2d435a7430e7e4c145c61cdb9866d16929731859d91c7105e6bfcaf9e3e9dd7` with the rebased #503 init. BusyBox `mount` switched to the test NFS root; all six disk flags and all 85 partition flags were `ro=1`. Systemd reached the multi-user target with `RuntimeWatchdogSec=60s`, and SSH remained available. `reboot-to bootloader` returned the phone to fastboot. The exported root was a generic Arch base; this did not test the Omarchy desktop or link-loss recovery. Full results are in [NOTES.md]. The FTS5 driver from [touch #219] is merged into linux-omarchy-mobile. The Dipper board DTS from [DTS #220] is merged too (2026-11-11), and the EA8074 From 814c63de968620c222fdd34831d2ae6f75f5604f Mon Sep 17 00:00:00 2001 From: quatrixone Date: Sun, 15 Nov 2026 01:27:32 +0100 Subject: [PATCH 12/44] dipper: note upstream firmware path changes --- packages/omamobile-device-dipper/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/omamobile-device-dipper/README.md b/packages/omamobile-device-dipper/README.md index 037b16cd2..23c6da8ba 100644 --- a/packages/omamobile-device-dipper/README.md +++ b/packages/omamobile-device-dipper/README.md @@ -23,6 +23,11 @@ QRTR, `pd-mapper`, `tqftpserv` and `rmtfs` are dependencies, but their services are not enabled here; no service in this package writes the modem's partitions. +These paths reflect the Dipper DTS used for this test branch. The active +mainline Dipper DTS currently requests the GPU, IPA and Bluetooth firmware +under `Xiaomi/mi8/` instead; recheck the final DTS paths before adding a +vendor-firmware extraction mapping. + The package installs the same device descriptor used by the build tools. Dipper support remains RAM-boot only. The single `boot` partition and UFS From c7c493b7a81810ed553fc2a477ebf59cecea55da Mon Sep 17 00:00:00 2001 From: quatrixone Date: Sun, 15 Nov 2026 12:02:51 +0100 Subject: [PATCH 13/44] omamobile: allow ram-only fastboot recovery The Dipper probe has no persistent boot or update path, but its host recovery command still needs to return a running Linux system to fastboot. Allow the ram-only descriptor only for that reboot-to path, keep image and write commands refused, and stop without sysrq if the bootloader ignores the reboot reason. Tested tests/boot-method and tools/pr-check origin/main. On the Mi 8, DEVICE=dipper bin/omamobile fastboot ran the installed reboot-to helper and returned to fastboot; product was dipper and the bootloader was unlocked. No partition was flashed. --- bin/omamobile | 20 +++++++++--- device/dipper/BRINGUP-M1.md | 4 ++- device/dipper/NOTES.md | 11 +++++++ docs/RELEASES.md | 2 +- tests/boot-method | 64 +++++++++++++++++++++++++++++++++++-- 5 files changed, 92 insertions(+), 9 deletions(-) diff --git a/bin/omamobile b/bin/omamobile index fb234d0e9..5ab97809e 100755 --- a/bin/omamobile +++ b/bin/omamobile @@ -87,8 +87,8 @@ Usage: [DEVICE=] omamobile and jump into them (no reboot or fastboot). Device tree changes still need: omamobile images, then flash the image holding the DTB (vendor_kernel_boot, or vendor_boot without it) - fastboot Get the phone into fastboot without buttons (adb, reboot-to, - or crash until ABL falls back to stock Android on slot A) + fastboot Get the phone into fastboot without buttons (adb or reboot-to; + fallback behavior follows the device's boot method) flash Flash the experiment images to slot B and boot them (--from-slot-a: a development phone that fell back to stock on slot A) push Write the images into slot B from the running phone over SSH, @@ -126,10 +126,15 @@ load_device() { fi done < "$file" case $DEV_BOOT_METHOD in - android-v4|android-v0|qcom-abl) ;; - *) die "$file: unsupported BOOT_METHOD=$DEV_BOOT_METHOD; this command supports android-v4, android-v0 and qcom-abl" ;; + android-v4|android-v0|qcom-abl|ram-only) ;; + *) die "$file: unsupported BOOT_METHOD=$DEV_BOOT_METHOD; this command supports android-v4, android-v0, qcom-abl and ram-only" ;; esac [[ $DEV_CODENAME == "$DEVICE" ]] || die "$file: CODENAME=$DEV_CODENAME, expected $DEVICE" + if [[ $DEV_BOOT_METHOD == ram-only ]]; then + [[ ${DEV_BOOT_IMAGES+x} && -z $DEV_BOOT_IMAGES && ${DEV_UFS_RW+x} && -z $DEV_UFS_RW ]] \ + || die "$file: ram-only requires empty BOOT_IMAGES and UFS_RW" + return 0 + fi # Safety: the guard's allowlist may name slot B's boot images and userdata # only, must hold userdata, and every boot image we write must be on it. # initramfs packs this list into the image, and the init checks it again. @@ -618,6 +623,7 @@ initramfs_config() { cmd_initramfs_config() { [[ -n ${1:-} ]] || die "usage: omamobile initramfs-config " load_device + [[ $DEV_BOOT_METHOD != ram-only ]] || die "initramfs-config refuses BOOT_METHOD=ram-only" initramfs_config "$1" ls -l "$1" } @@ -668,6 +674,7 @@ cmd_initramfs() { old_umask=$(umask) umask 022 load_device + [[ $DEV_BOOT_METHOD != ram-only ]] || die "initramfs refuses BOOT_METHOD=ram-only" # A leading slash is repo-root relative, so devices share initramfs/init. # Anything else is relative to device//. local init @@ -884,6 +891,7 @@ cmd_images() { # Pixels: the pinned mkbootimg or the checkout's (MKBOOTIMG_DIR). # Tree-local mkbootimg is for qcom-abl. local tools="$MKBOOTIMG_DIR" + [[ $DEV_BOOT_METHOD != ram-only ]] || die "images refuses BOOT_METHOD=ram-only" if [[ $DEV_BOOT_METHOD == qcom-abl ]]; then tools="$ROOT/system/tools/mkbootimg" [[ -f $tools/mkbootimg.py ]] || tools="$SRC_DIR/system/tools/mkbootimg" @@ -1223,6 +1231,8 @@ cmd_fastboot() { "$ssh" '(sleep 1; PATH=/usr/local/bin:$PATH reboot-to bootloader) >/dev/null 2>&1 &' || true sleep 25 if ! in_fastboot && "$ssh" true 2>/dev/null; then + [[ $DEV_BOOT_METHOD != ram-only ]] \ + || die "reboot-to bootloader did not reach fastboot; use the buttons (see device/$DEVICE/BRINGUP-M1.md)" say "Bootloader ignored the reason; crashing so it falls back to slot A" "$ssh" '(sleep 1; echo c > /proc/sysrq-trigger) >/dev/null 2>&1 &' || true fi @@ -1247,6 +1257,7 @@ cmd_flash() { esac (($# <= 1)) || die "usage: omamobile flash [--from-slot-a]" load_device + [[ $DEV_BOOT_METHOD != ram-only ]] || die "flash refuses BOOT_METHOD=ram-only (no persistent install path)" # Qualcomm ABL keeps slot flags in the GPT. A fastboot set_active can clear # successful and refill retries; the bit-54 mark has no §3.1 entry yet. # Refuse here; day-2 updates use push once that path is viable, and the @@ -1311,6 +1322,7 @@ WARN cmd_push() { local img="$KERNEL_OUT/images" ssh="$ROOT/tools/phone-ssh" p dev want got rel load_device + [[ $DEV_BOOT_METHOD != ram-only ]] || die "push refuses BOOT_METHOD=ram-only (no persistent install path)" # Same class of refusal as flash: boot_b is on sde here, and there is no # in-tree day-2 rewrite path for qcom-abl yet. Refuse before any phone I/O # (modules-push would otherwise rewrite the running root's modules). diff --git a/device/dipper/BRINGUP-M1.md b/device/dipper/BRINGUP-M1.md index 30438da67..2aaccf313 100644 --- a/device/dipper/BRINGUP-M1.md +++ b/device/dipper/BRINGUP-M1.md @@ -1,7 +1,9 @@ # Xiaomi Mi 8 (dipper): RAM-only first light -**Status (2026-11-14):** a fresh rootfs was built with Omarchy 4.5.0-3 and `omamobile-omarchy 0.1.45`; all build-time rootfs smoke checks passed. The Dipper kernel and EA8074 panel module also built. The RAM-only NFS test did not reach the new root: a later SSH session reported the existing kernel (`g2a318a96ae9d-dirty`) and an `ext4` root. `reboot-to bootloader` returned the phone to fastboot. The test image showed no firstboot log or created test account. `/proc/iomem`, UFS read-only flags, `tools/phone-smoke`, `networkctl status usb0` and the visible desktop were not captured. No flash command was issued; because the existing ext4 system ran, incidental userdata writes by that system cannot be ruled out and the earlier file-level backup may be stale. Earlier RAM boots and test limits are recorded in [NOTES.md]. +**Status (2026-11-15):** a fresh RAM-only `fastboot boot` reached the Omarchy 4.5.0-3 NFS root with `omamobile-omarchy 0.1.45`. The root's journal records the handoff, UFS guard logs setting all six whole-disk nodes and all 85 partitions read-only, both packed-DTB `removed-region` nodes, the initramfs guard, and the `qcom_wdt` watchdog device. The `ro` flags were not read directly. The exact packed DTB was decompiled after the boot; both nodes were present. `/proc/iomem` was not captured, so the required reserved-range gate remains unverified. SSH was refused, so phone-side `tools/phone-smoke`, `networkctl status usb0`, watchdog feeder state and the visible screen were not captured. The full kernel module bundle was added to the NFS root after boot, so userspace module loading was not tested. No flash or explicit UFS-write command was issued. Image hash, source commits and evidence limits are in [NOTES.md]. + +**Previous status (2026-11-14):** a fresh rootfs was built with Omarchy 4.5.0-3 and `omamobile-omarchy 0.1.45`; all build-time rootfs smoke checks passed. The Dipper kernel and EA8074 panel module also built. A RAM-only NFS test did not reach that new root: a later SSH session reported the existing kernel (`g2a318a96ae9d-dirty`) and an `ext4` root. `reboot-to bootloader` returned the phone to fastboot. The test image showed no firstboot log or created test account. `/proc/iomem`, UFS read-only flags, `tools/phone-smoke`, `networkctl status usb0` and the visible desktop were not captured. No flash command was issued; incidental userdata writes by the existing ext4 system could not be ruled out. Earlier RAM boots and test limits are recorded in [NOTES.md]. A retry of image `d7bdde5e35b5c78a5878ebf4df28effefca35bed9a26c39098f473278d233ead` was accepted by `fastboot boot`, but the host saw no ARP reply and a 10-second capture contained no SSH, RPC or NFS packets. The root handoff remains unverified. The exported image was checked on the host: it has Omarchy 4.5.0-3, `omamobile-omarchy 0.1.45`, `omamobile-device-dipper 0.1.0`, all seven runtime dependencies and 375 package-owned `/usr/lib/systemd/system/*.service` files; the three old unowned units and WLAN helper are absent. No phone-side `phone-smoke`, `networkctl status usb0`, `/proc/iomem`, UFS flags or display observation could be collected from this boot. No flash or explicit UFS-write command was issued; with the running root unknown, incidental writes cannot be ruled out. diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index e34f9201f..954e961ee 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -5,10 +5,21 @@ Facts only, each read off the phone. Captures remain outside the repository because they contain device identifiers and Wi-Fi keys; this file records only the facts needed for review. +## Fastboot recovery (2026-11-15) + +From the existing Linux system on `userdata` (not the new NFS-root image), +`DEVICE=dipper bin/omamobile fastboot` used the installed +`/usr/bin/reboot-to bootloader` and returned the phone to fastboot. The helper +reported `In fastboot`; `fastboot getvar product` returned `dipper` and +`fastboot getvar unlocked` returned `yes`. No partition was flashed. This +confirms the host-side recovery command for the installed system; it does not +verify the new NFS-root boot. + ## RAM sessions (newest first) | Date | `boot.img` SHA-256 | Source, as recorded | `/dev/sda` and UFS partitions | Checks and gaps | | --- | --- | --- | --- | --- | +| 2026-11-15 | `04dc54e155b90e189b504df03476dc4ea086fdb6b02b2249aab54665a60ffa07` | Kernel `7.3.0-rc6-omamobile-push1`, base `da171eae4cb7b0a852b6629ff986c78ebab911c0` plus panel-driver commit `ee6f8c7139e428be8f8435e4d67503cd7b5486bc`; packed DTB SHA-256 `b5baf1c71cf85f2a0f2c16229aaa4a1a96a53ce00310f57caa68a435b631349d` | NFS root handoff confirmed. UFS guard logs say it set all 6 whole-disk nodes and all 85 partition nodes read-only; their `ro` flags were not read directly. | `fastboot boot` accepted the image. The NFS root was Omarchy 4.5.0-3 with `omamobile-omarchy 0.1.45`; its journal confirms switch to NFS, both `removed-region` reservations, the UFS guard, and the `qcom_wdt` watchdog device. The initramfs guard ran; watchdog feeder state was not read. The packed DTB was decompiled after this boot and contained both removed-region nodes. `/proc/iomem` was not captured, so the reserved-range gate is unverified. SSH was refused; `tools/phone-smoke`, phone-side `networkctl status usb0`, and the visible screen were not captured. The full kernel module bundle was added to the NFS root after this boot, so its userspace module-loading path was not tested. No flash or explicit UFS-write command was issued. | | 2026-11-14 | `d7bdde5e35b5c78a5878ebf4df28effefca35bed9a26c39098f473278d233ead` (debug image: `c86d517e5c3c5940f3099f46524968d59ddf6e0a258aac51fd00547b7acc24bb`) | Kernel `7.3.0-rc6-omamobile-push1-g7062b50298ff`, source `7062b50298ff2868e5a8a0be70483227e9c7db0b`; rootfs image SHA-256 `75f2dc67630c2661705f3b796170621a3582d96093893ed72e6f680ec34581ce` | No `/proc/iomem` or UFS `ro` flags were captured. A later SSH session reported kernel `7.3.0-rc6-omamobile-push1-g2a318a96ae9d-dirty` and root type `ext4`; `reboot-to bootloader` returned the phone to fastboot. | Omarchy 4.5.0-3 / `omamobile-omarchy 0.1.45` rootfs build and all rootfs smoke checks passed; 1818 kernel modules included `qcom-wdt`, MSM DRM and EA8074. The NFS image showed no firstboot log or created test account. A retry of this image was accepted by `fastboot boot`, but a 10-second host capture saw no SSH/RPC/NFS packets and an ARP probe got no reply. Raw `phone-smoke`, `networkctl status usb0`, `/proc/iomem`, UFS flags and display evidence remain unavailable. No flash command was issued; incidental writes by the existing ext4 system cannot be ruled out, so the earlier userdata backup may be stale. | | 2026-11-13 | `50356521ec35b361261de571fc9f8033b55c8fd7ad0689010fb55d0cec16401c` | Corrected RAM image with NFS-root request | Exposed whole-disk and partition flags read-only during the NFS session | Booted kernel `7.3.0-rc6-omamobile-push1` with the disposable NFS root. Installed `omamobile-omarchy 0.1.44-1` locally; its hook applied 29 Omarchy 4.0.6 patches and `omamobile-omarchy-patches verify` passed. `phone-smoke` found no failed systemd units or new kernel errors; USB, DSI enumeration, GPU render node, Hyprland/session, touch, buttons, Bluetooth and thermal checks passed. Root check correctly identifies NFS as non-persistent. Lock IPC was intermittent. No flash or explicit UFS-write command was issued; see the later userdata-root observation below. | | 2026-11-13 | `1d4ce38579a881b6d875a9a3bc025357f753cf119ce5ce16b3dbdc52f86da9f9` | Local RAM image; retained manifest has image/kernel/ramdisk hashes but no source commit; no NFS-root request was included | All exposed whole-disk and partition `ro` flags were `1` | Initramfs and USB/SSH ran on `7.3.0-rc6-omamobile-push1`. `stmfts` registered as `event2`; three touch-key and 428 absolute events arrived during three taps. Display stayed black: only simpledrm `Unknown-1` was present, with no DSI panel/backlight device. Mounted disposable NFS root without switching PID 1; chroot `pacman -Qk omamobile-device-dipper` reported 47 files, none missing. `reboot-to bootloader` used the initramfs helper because PID 1 never switched. No UFS write. | diff --git a/docs/RELEASES.md b/docs/RELEASES.md index 9ace1d840..057d55dd3 100644 --- a/docs/RELEASES.md +++ b/docs/RELEASES.md @@ -77,7 +77,7 @@ Bring-up tools (`*-stage`, `display-hz`, `usbc-deadman`) stay per plan: they pok | `OS_VERSION`, `OS_PATCH_LEVEL` | `17.0.0`, `2026-07` | The `init_boot` header values (the `boot` header's, on a device without `init_boot`) | | `AVB_FOOTERS` | (zuma, the Pixel 7a and the Pixel 7 Pro: `boot:0x4000000 init_boot:0x800000`) | Optional. For a phone whose `vbmeta_b` chains these partitions, as stock's does: libavb takes a chained partition with no AVB footer as invalid metadata, which an unlocked bootloader doesn't let through (zuma; the Pixel 7a; the Pixel 7 Pro, device/cheetah/NOTES.md 2026-10-28). A `vbmeta_b` that lists them as hash descriptors, or has verification disabled, never reads the footers. `image:partition_size`, each a `BOOT_IMAGES` entry, once; the size is the slot's partition size in bytes (stock's footer, `avbtool info_image`, or `fastboot getvar partition-size:_b`), a multiple of 4096. `images` adds a hash footer to each, padding it to that size, signed with AOSP's test key (an unlocked bootloader accepts any key); needs `external/avb` under `SRC_DIR` (or `AVBTOOL`, `AVB_KEY`) and `openssl` | | `AVB_ROLLBACK_INDEX`, `AVB_SECURITY_PATCH` | `1791158400`, `2026-10-05` | Required with `AVB_FOOTERS`, refused without it: stock's rollback index and `com.android.build..security_patch` from its footers. Never set the index above stock's: an index the bootloader stores locks stock's own images out of slot A. The `os_version` property is `OS_VERSION`'s major | -| `BOOT_METHOD` | `android-v4` (default when omitted) | Generic images, flash, push and installer accept only `android-v4`; other methods are refused before phone access. `ram-only` marks a probe with no persistent install support. `android-v0` (enchilada) is a header-v0 phone: `images` packs one `boot.img` for `fastboot boot`, and fastboot, flash, push and the installer refuse it | +| `BOOT_METHOD` | `android-v4` (default when omitted) | `ram-only` marks a probe with no persistent install support: initramfs/image builds, flash, push and installer refuse it; `fastboot` is allowed only to request `reboot-to bootloader` from Linux, and stops without a crash fallback if that request is ignored. `android-v0` (enchilada) is a header-v0 phone: `images` packs one `boot.img` for `fastboot boot`, and fastboot, flash, push and the installer refuse it. Other methods are refused before phone access unless listed here | | `PAGESIZE`, `BASE`, `KERNEL_OFFSET`, `RAMDISK_OFFSET`, `SECOND_OFFSET`, `TAGS_OFFSET` | (enchilada: `4096`, `0x00000000`, `0x00008000`, `0x01000000`, `0x00f00000`, `0x00000100`) | `android-v0` only, all required: the header-v0 page size and load offsets, numbers in decimal or lower-case hex. `images` packs the gzip `Image` with the `DTB` appended as the kernel, the initramfs as the ramdisk and `CMDLINE` as the command line. `BOOT_IMAGES` is `boot` alone and `boot_b` must be on `UFS_RW` | | `BOOT_IMAGES` | `boot init_boot vendor_boot vendor_kernel_boot dtbo` | The images written to slot B (the `_b` suffix is added by the tools and is not configurable). `boot`, `vendor_boot` and `dtbo` are always there. Without `init_boot`, `boot` carries the empty generic ramdisk and the OS version; without `vendor_kernel_boot`, `vendor_boot` carries the DTB and the initramfs (the Pixel 6: `boot vendor_boot dtbo`) | | `BOOT_UPDATE_AUTO_WRITE` | (unset; defaults to `yes`) | Optional: `yes` or `no`. The installer records it as `AUTO_WRITE` in `/etc/omamobile/boot-update.conf`; `no` keeps an installed development root from writing slot B through package updates. It does not change the installer's own allowed writes | diff --git a/tests/boot-method b/tests/boot-method index 9fe41f20d..635598e32 100755 --- a/tests/boot-method +++ b/tests/boot-method @@ -1,6 +1,7 @@ #!/bin/bash # SPDX-License-Identifier: MIT -# Unsupported boot methods must fail before touching a phone or preparing images. +# Unsupported boot methods must fail before touching a phone; ram-only permits +# only the recovery path to fastboot. set -euo pipefail cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." t=$(mktemp -d); trap 'rm -rf "$t"' EXIT @@ -11,7 +12,7 @@ cp tools/install-phone "$t/bundle/install" # shellcheck disable=SC2016 # fixture evaluated by the child, not this test printf 'DEVICE=${DEVICE:-probe}\nSRC_DIR=/no-sources-needed\n' > "$t/repo/omamobile.conf" # Any phone or container command is a failure, including read-only queries. -for cmd in fastboot ssh docker; do +for cmd in fastboot adb ssh docker; do # shellcheck disable=SC2016 # fake command reads the exported fixture path printf '#!/bin/sh\necho called >> "$CALLS"\nexit 97\n' > "$t/bin/$cmd" chmod +x "$t/bin/$cmd" @@ -24,7 +25,12 @@ for method in ram-only uboot-ext4 unknown ''; do cp "$t/repo/device/probe/device.conf" "$t/bundle/device.conf" for cmd in images flash push; do if DEVICE=probe "$t/repo/bin/omamobile" "$cmd" > "$t/log" 2>&1; then fail "$cmd accepts $method"; fi - grep -q "unsupported BOOT_METHOD=$method;" "$t/log" || fail "$cmd fails for the wrong reason" + if [[ $method == ram-only ]]; then + grep -q "$cmd refuses BOOT_METHOD=ram-only" "$t/log" \ + || fail "$cmd fails for the wrong reason" + else + grep -q "unsupported BOOT_METHOD=$method;" "$t/log" || fail "$cmd fails for the wrong reason" + fi done for installer in "$t/repo/tools/install-phone" "$t/bundle/install"; do for dry in '' --dry-run; do @@ -35,6 +41,58 @@ for method in ram-only uboot-ext4 unknown ''; do [[ ! -e $t/calls && ! -e $t/work ]] || fail "unsupported method accessed phone or prepared image" echo "ok - BOOT_METHOD='${method}' refused by images/flash/push and both installer modes before phone access" done + +# Restore the ram-only fixture after the unsupported-method cases. +printf 'CODENAME=probe\nBOOT_METHOD=ram-only\nBOOT_IMAGES=""\nUFS_RW=""\n' > "$t/repo/device/probe/device.conf" +for cmd in initramfs initramfs-config; do + args=() + [[ $cmd != initramfs-config ]] || args+=("$t/config") + if DEVICE=probe "$t/repo/bin/omamobile" "$cmd" "${args[@]}" > "$t/log" 2>&1; then + fail "$cmd accepts ram-only" + fi + grep -q "$cmd refuses BOOT_METHOD=ram-only" "$t/log" || fail "$cmd fails for the wrong reason" +done +[[ ! -e $t/calls ]] || fail "ram-only initramfs command accessed a phone" +echo 'ok - ram-only initramfs builds and config are refused' + +# A ram-only phone may return to fastboot through reboot-to, but never the +# generic sysrq fallback used by devices with a characterized slot-A recovery. +mkdir -p "$t/repo/device/dipper" +cp device/dipper/device.conf "$t/repo/device/dipper/" +cat > "$t/repo/tools/phone-ssh" <<'EOF' +#!/bin/bash +if [[ ${1:-} == true ]]; then exit 0; fi +printf '%s\n' "$1" >> "$PHONE_COMMANDS" +if [[ ${1:-} == *'reboot-to bootloader'* && -z ${REBOOT_IGNORED:-} ]]; then : > "$FASTBOOT_READY"; fi +[[ ${1:-} == *'/proc/sysrq-trigger'* ]] && : > "$SYSRQ_USED" +EOF +chmod +x "$t/repo/tools/phone-ssh" +cat > "$t/bin/fastboot" <<'EOF' +#!/bin/bash +if [[ ${1:-} == devices && -e $FASTBOOT_READY ]]; then printf 'DIPPER\tfastboot\n'; fi +EOF +printf '#!/bin/sh\nexit 1\n' > "$t/bin/adb" +printf '#!/bin/sh\nexit 0\n' > "$t/bin/sleep" +chmod +x "$t/bin/fastboot" "$t/bin/adb" "$t/bin/sleep" +export FASTBOOT_READY="$t/fastboot-ready" +export PHONE_COMMANDS="$t/phone-commands" SYSRQ_USED="$t/sysrq-used" +if ! DEVICE=dipper "$t/repo/bin/omamobile" fastboot > "$t/log" 2>&1; then + fail "ram-only fastboot did not use reboot-to: $(cat "$t/log")" +fi +grep -q 'In fastboot' "$t/log" || fail "ram-only fastboot missed the fastboot state" +[[ -e $FASTBOOT_READY ]] || fail "ram-only fastboot did not request reboot-to" +echo 'ok - BOOT_METHOD=ram-only returns to fastboot through reboot-to' +rm -f "$FASTBOOT_READY" +if REBOOT_IGNORED=1 DEVICE=dipper "$t/repo/bin/omamobile" fastboot > "$t/log" 2>&1; then + fail "ram-only fastboot accepted a reboot-to that was ignored" +fi +grep -q 'reboot-to bootloader did not reach fastboot' "$t/log" || fail "ignored reboot-to failed for the wrong reason" +[[ ! -e $SYSRQ_USED ]] || fail "ram-only fastboot used the unverified sysrq fallback" +echo 'ok - ram-only fastboot stops safely when reboot-to is ignored' +rm -f "$t/bin/sleep" "$t/repo/tools/phone-ssh" +printf '#!/bin/sh\necho called >> "$CALLS"\nexit 97\n' > "$t/bin/adb" +chmod +x "$t/bin/adb" + # The shipped flame descriptor must remain outside all persistent paths too. mkdir -p "$t/repo/device/flame" cp device/flame/device.conf "$t/repo/device/flame/" From 5fd66b016c1ac4a3f24b9069cfddc15e7fa8e99c Mon Sep 17 00:00:00 2001 From: quatrixone Date: Sun, 15 Nov 2026 14:18:40 +0100 Subject: [PATCH 14/44] NOTES: record 2026-11-15 RAM retry Record the host-only result of retrying the existing RAM image. The reserved-memory gate and phone-side smoke checks were not captured because the device stopped replying after USB re-enumeration. --- device/dipper/BRINGUP-M1.md | 2 +- device/dipper/NOTES.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/device/dipper/BRINGUP-M1.md b/device/dipper/BRINGUP-M1.md index 2aaccf313..0ffd35e0e 100644 --- a/device/dipper/BRINGUP-M1.md +++ b/device/dipper/BRINGUP-M1.md @@ -1,7 +1,7 @@ # Xiaomi Mi 8 (dipper): RAM-only first light -**Status (2026-11-15):** a fresh RAM-only `fastboot boot` reached the Omarchy 4.5.0-3 NFS root with `omamobile-omarchy 0.1.45`. The root's journal records the handoff, UFS guard logs setting all six whole-disk nodes and all 85 partitions read-only, both packed-DTB `removed-region` nodes, the initramfs guard, and the `qcom_wdt` watchdog device. The `ro` flags were not read directly. The exact packed DTB was decompiled after the boot; both nodes were present. `/proc/iomem` was not captured, so the required reserved-range gate remains unverified. SSH was refused, so phone-side `tools/phone-smoke`, `networkctl status usb0`, watchdog feeder state and the visible screen were not captured. The full kernel module bundle was added to the NFS root after boot, so userspace module loading was not tested. No flash or explicit UFS-write command was issued. Image hash, source commits and evidence limits are in [NOTES.md]. +**Status (2026-11-15):** a fresh RAM-only `fastboot boot` reached the Omarchy 4.5.0-3 NFS root with `omamobile-omarchy 0.1.45`. The root's journal records the handoff, UFS guard logs setting all six whole-disk nodes and all 85 partitions read-only, both packed-DTB `removed-region` nodes, the initramfs guard, and the `qcom_wdt` watchdog device. The `ro` flags were not read directly. The exact packed DTB was decompiled after the boot; both nodes were present. `/proc/iomem` was not captured, so the required reserved-range gate remains unverified. SSH was refused, so phone-side `tools/phone-smoke`, `networkctl status usb0`, watchdog feeder state and the visible screen were not captured. The full kernel module bundle was added to the NFS root after boot, so userspace module loading was not tested. No flash or explicit UFS-write command was issued. Image hash, source commits and evidence limits are in [NOTES.md]. A later retry of the same image enumerated USB NCM/ACM, but the NFS server request count did not increase during a 3-second check and later ping/SSH attempts got no reply; its boot outcome is unresolved. **Previous status (2026-11-14):** a fresh rootfs was built with Omarchy 4.5.0-3 and `omamobile-omarchy 0.1.45`; all build-time rootfs smoke checks passed. The Dipper kernel and EA8074 panel module also built. A RAM-only NFS test did not reach that new root: a later SSH session reported the existing kernel (`g2a318a96ae9d-dirty`) and an `ext4` root. `reboot-to bootloader` returned the phone to fastboot. The test image showed no firstboot log or created test account. `/proc/iomem`, UFS read-only flags, `tools/phone-smoke`, `networkctl status usb0` and the visible desktop were not captured. No flash command was issued; incidental userdata writes by the existing ext4 system could not be ruled out. Earlier RAM boots and test limits are recorded in [NOTES.md]. diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index 954e961ee..ebe11e080 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -20,6 +20,7 @@ verify the new NFS-root boot. | Date | `boot.img` SHA-256 | Source, as recorded | `/dev/sda` and UFS partitions | Checks and gaps | | --- | --- | --- | --- | --- | | 2026-11-15 | `04dc54e155b90e189b504df03476dc4ea086fdb6b02b2249aab54665a60ffa07` | Kernel `7.3.0-rc6-omamobile-push1`, base `da171eae4cb7b0a852b6629ff986c78ebab911c0` plus panel-driver commit `ee6f8c7139e428be8f8435e4d67503cd7b5486bc`; packed DTB SHA-256 `b5baf1c71cf85f2a0f2c16229aaa4a1a96a53ce00310f57caa68a435b631349d` | NFS root handoff confirmed. UFS guard logs say it set all 6 whole-disk nodes and all 85 partition nodes read-only; their `ro` flags were not read directly. | `fastboot boot` accepted the image. The NFS root was Omarchy 4.5.0-3 with `omamobile-omarchy 0.1.45`; its journal confirms switch to NFS, both `removed-region` reservations, the UFS guard, and the `qcom_wdt` watchdog device. The initramfs guard ran; watchdog feeder state was not read. The packed DTB was decompiled after this boot and contained both removed-region nodes. `/proc/iomem` was not captured, so the reserved-range gate is unverified. SSH was refused; `tools/phone-smoke`, phone-side `networkctl status usb0`, and the visible screen were not captured. The full kernel module bundle was added to the NFS root after this boot, so its userspace module-loading path was not tested. No flash or explicit UFS-write command was issued. | +| 2026-11-15 (retry) | `04dc54e155b90e189b504df03476dc4ea086fdb6b02b2249aab54665a60ffa07` | Same kernel, rootfs and packed DTB as the preceding row | Boot image accepted by `fastboot boot`; host later enumerated CDC NCM and ACM | The NFS server request count did not increase during a 3-second check; later ping and SSH attempts got no reply. `/proc/iomem`, root handoff, UFS flags, watchdog feeder, `phone-smoke` and visible screen were not captured; boot outcome unresolved. No partition was flashed. | | 2026-11-14 | `d7bdde5e35b5c78a5878ebf4df28effefca35bed9a26c39098f473278d233ead` (debug image: `c86d517e5c3c5940f3099f46524968d59ddf6e0a258aac51fd00547b7acc24bb`) | Kernel `7.3.0-rc6-omamobile-push1-g7062b50298ff`, source `7062b50298ff2868e5a8a0be70483227e9c7db0b`; rootfs image SHA-256 `75f2dc67630c2661705f3b796170621a3582d96093893ed72e6f680ec34581ce` | No `/proc/iomem` or UFS `ro` flags were captured. A later SSH session reported kernel `7.3.0-rc6-omamobile-push1-g2a318a96ae9d-dirty` and root type `ext4`; `reboot-to bootloader` returned the phone to fastboot. | Omarchy 4.5.0-3 / `omamobile-omarchy 0.1.45` rootfs build and all rootfs smoke checks passed; 1818 kernel modules included `qcom-wdt`, MSM DRM and EA8074. The NFS image showed no firstboot log or created test account. A retry of this image was accepted by `fastboot boot`, but a 10-second host capture saw no SSH/RPC/NFS packets and an ARP probe got no reply. Raw `phone-smoke`, `networkctl status usb0`, `/proc/iomem`, UFS flags and display evidence remain unavailable. No flash command was issued; incidental writes by the existing ext4 system cannot be ruled out, so the earlier userdata backup may be stale. | | 2026-11-13 | `50356521ec35b361261de571fc9f8033b55c8fd7ad0689010fb55d0cec16401c` | Corrected RAM image with NFS-root request | Exposed whole-disk and partition flags read-only during the NFS session | Booted kernel `7.3.0-rc6-omamobile-push1` with the disposable NFS root. Installed `omamobile-omarchy 0.1.44-1` locally; its hook applied 29 Omarchy 4.0.6 patches and `omamobile-omarchy-patches verify` passed. `phone-smoke` found no failed systemd units or new kernel errors; USB, DSI enumeration, GPU render node, Hyprland/session, touch, buttons, Bluetooth and thermal checks passed. Root check correctly identifies NFS as non-persistent. Lock IPC was intermittent. No flash or explicit UFS-write command was issued; see the later userdata-root observation below. | | 2026-11-13 | `1d4ce38579a881b6d875a9a3bc025357f753cf119ce5ce16b3dbdc52f86da9f9` | Local RAM image; retained manifest has image/kernel/ramdisk hashes but no source commit; no NFS-root request was included | All exposed whole-disk and partition `ro` flags were `1` | Initramfs and USB/SSH ran on `7.3.0-rc6-omamobile-push1`. `stmfts` registered as `event2`; three touch-key and 428 absolute events arrived during three taps. Display stayed black: only simpledrm `Unknown-1` was present, with no DSI panel/backlight device. Mounted disposable NFS root without switching PID 1; chroot `pacman -Qk omamobile-device-dipper` reported 47 files, none missing. `reboot-to bootloader` used the initramfs helper because PID 1 never switched. No UFS write. | From a381ab2578827e62633a3bdad7ce7340b1525a9a Mon Sep 17 00:00:00 2001 From: quatrixone Date: Sun, 15 Nov 2026 15:41:04 +0100 Subject: [PATCH 15/44] DEVICES: track Dipper as WIP Add Dipper to the device matrix with only hardware evidence recorded in the notes. Record the 20-second watchdog retry and keep the missing Omarchy session and renderer checks explicit. --- device/dipper/BRINGUP-M1.md | 20 ++++++++++++-------- device/dipper/NOTES.md | 3 ++- docs/DEVICES.md | 1 + 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/device/dipper/BRINGUP-M1.md b/device/dipper/BRINGUP-M1.md index 0ffd35e0e..02be53883 100644 --- a/device/dipper/BRINGUP-M1.md +++ b/device/dipper/BRINGUP-M1.md @@ -1,7 +1,7 @@ # Xiaomi Mi 8 (dipper): RAM-only first light -**Status (2026-11-15):** a fresh RAM-only `fastboot boot` reached the Omarchy 4.5.0-3 NFS root with `omamobile-omarchy 0.1.45`. The root's journal records the handoff, UFS guard logs setting all six whole-disk nodes and all 85 partitions read-only, both packed-DTB `removed-region` nodes, the initramfs guard, and the `qcom_wdt` watchdog device. The `ro` flags were not read directly. The exact packed DTB was decompiled after the boot; both nodes were present. `/proc/iomem` was not captured, so the required reserved-range gate remains unverified. SSH was refused, so phone-side `tools/phone-smoke`, `networkctl status usb0`, watchdog feeder state and the visible screen were not captured. The full kernel module bundle was added to the NFS root after boot, so userspace module loading was not tested. No flash or explicit UFS-write command was issued. Image hash, source commits and evidence limits are in [NOTES.md]. A later retry of the same image enumerated USB NCM/ACM, but the NFS server request count did not increase during a 3-second check and later ping/SSH attempts got no reply; its boot outcome is unresolved. +**Status (2026-11-15):** a RAM-only `fastboot boot` reached the Omarchy 4.5.0-3 NFS root with `omamobile-omarchy 0.1.45`. The root's journal records the handoff, UFS guard logs setting all six whole-disk nodes and all 85 partitions read-only, both packed-DTB `removed-region` nodes, the initramfs guard, and the `qcom_wdt` watchdog device. The `ro` flags were not read directly. The exact packed DTB was decompiled after the boot; both nodes were present. `/proc/iomem` was not captured from that root, so the required reserved-range gate remains unverified there. SSH was refused, so phone-side `tools/phone-smoke`, `networkctl status usb0`, watchdog feeder state and the visible screen were not captured. The full kernel module bundle was added to the NFS root after boot, so userspace module loading was not tested. A retry with the original 60-second setting logged `Failed to set watchdog hardware timeout to 1min: Invalid argument` and a udev startup timeout. On a later disposable-root retry, systemd reported a 20-second hardware watchdog, zram and udev started, and networkd brought up `usb0`; SSH still did not become available, and the next host session was back on the existing ext4 root. That diagnostic root temporarily masked zram swap and added early-SSH test wiring; those changes are not in the package. No flash or explicit UFS-write command was issued. Image hash, source commits and evidence limits are in [NOTES.md]. **Previous status (2026-11-14):** a fresh rootfs was built with Omarchy 4.5.0-3 and `omamobile-omarchy 0.1.45`; all build-time rootfs smoke checks passed. The Dipper kernel and EA8074 panel module also built. A RAM-only NFS test did not reach that new root: a later SSH session reported the existing kernel (`g2a318a96ae9d-dirty`) and an `ext4` root. `reboot-to bootloader` returned the phone to fastboot. The test image showed no firstboot log or created test account. `/proc/iomem`, UFS read-only flags, `tools/phone-smoke`, `networkctl status usb0` and the visible desktop were not captured. No flash command was issued; incidental userdata writes by the existing ext4 system could not be ruled out. Earlier RAM boots and test limits are recorded in [NOTES.md]. @@ -122,16 +122,20 @@ repository; the SSH public key and generated host key stay in the local output. persistent writer. - The initramfs has no Arch root yet. A later hard NFS-root mount can freeze the root session if the host drops; use it only for a RAM-only probe. NFS-root - needs a root with `RuntimeWatchdogSec=60s`, because `kill -9 -1` stops the - userspace feeder before systemd can take over. It must never fall through to - writable userdata. + must configure systemd's hardware watchdog within the kernel driver's limit. + Dipper's current driver allows about 32 seconds at the 32764 Hz sleep clock. + The earlier NFS run reached multi-user at `RuntimeWatchdogSec=20s`; systemd + rejected 60 seconds in the 2026-11-15 test. Keep the setting at 20 seconds for + now. It must never fall through to writable userdata. - Wi-Fi needs firmware and the phone's own WLAN address. Read identity files from `persist` with `debugfs` (read-only) before enabling that service; never mount `persist`. -- The exact systemd journal line from the earlier failed `qcom_wdt` timeout - change was not retained. The 2026-11-10 NFS test root reached systemd with - `RuntimeWatchdogSec=60s`; NFS link-loss recovery and the Omarchy desktop on - that root remain untested. +- The 2026-11-15 test journal records + `Failed to set watchdog hardware timeout to 1min: Invalid argument` with + `RuntimeWatchdogSec=60s`; udev also timed out before SSH became available. + The earlier 2026-11-10 NFS test used `RuntimeWatchdogSec=20s` and reached + multi-user. NFS link-loss recovery and the Omarchy desktop on the current + Omarchy root remain untested. - FTS5 controller probe and physical contact/coordinate/release events passed on 2026-11-12 (see [NOTES.md]); Hyprland input delivery and GPU rendering remain untested on the phone. diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index ebe11e080..0f8a41a97 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -20,7 +20,8 @@ verify the new NFS-root boot. | Date | `boot.img` SHA-256 | Source, as recorded | `/dev/sda` and UFS partitions | Checks and gaps | | --- | --- | --- | --- | --- | | 2026-11-15 | `04dc54e155b90e189b504df03476dc4ea086fdb6b02b2249aab54665a60ffa07` | Kernel `7.3.0-rc6-omamobile-push1`, base `da171eae4cb7b0a852b6629ff986c78ebab911c0` plus panel-driver commit `ee6f8c7139e428be8f8435e4d67503cd7b5486bc`; packed DTB SHA-256 `b5baf1c71cf85f2a0f2c16229aaa4a1a96a53ce00310f57caa68a435b631349d` | NFS root handoff confirmed. UFS guard logs say it set all 6 whole-disk nodes and all 85 partition nodes read-only; their `ro` flags were not read directly. | `fastboot boot` accepted the image. The NFS root was Omarchy 4.5.0-3 with `omamobile-omarchy 0.1.45`; its journal confirms switch to NFS, both `removed-region` reservations, the UFS guard, and the `qcom_wdt` watchdog device. The initramfs guard ran; watchdog feeder state was not read. The packed DTB was decompiled after this boot and contained both removed-region nodes. `/proc/iomem` was not captured, so the reserved-range gate is unverified. SSH was refused; `tools/phone-smoke`, phone-side `networkctl status usb0`, and the visible screen were not captured. The full kernel module bundle was added to the NFS root after this boot, so its userspace module-loading path was not tested. No flash or explicit UFS-write command was issued. | -| 2026-11-15 (retry) | `04dc54e155b90e189b504df03476dc4ea086fdb6b02b2249aab54665a60ffa07` | Same kernel, rootfs and packed DTB as the preceding row | Boot image accepted by `fastboot boot`; host later enumerated CDC NCM and ACM | The NFS server request count did not increase during a 3-second check; later ping and SSH attempts got no reply. `/proc/iomem`, root handoff, UFS flags, watchdog feeder, `phone-smoke` and visible screen were not captured; boot outcome unresolved. No partition was flashed. | +| 2026-11-15 (retry, 60s watchdog) | `04dc54e155b90e189b504df03476dc4ea086fdb6b02b2249aab54665a60ffa07` | Same kernel, rootfs and packed DTB as the preceding row | Boot image accepted by `fastboot boot`; host enumerated CDC NCM and ACM; NFS requests confirmed root-systemd startup | NFS-root systemd journal records `RuntimeWatchdogSec=60s` rejected with `Failed to set watchdog hardware timeout to 1min: Invalid argument`; udev startup timed out and SSH/ping did not respond. No `/proc/iomem`, UFS flag readback, watchdog feeder, `phone-smoke` or visible-screen evidence from that root. No partition was flashed. | +| 2026-11-15 (retry, 20s watchdog) | `04dc54e155b90e189b504df03476dc4ea086fdb6b02b2249aab54665a60ffa07` | Same kernel, Omarchy 4.5.0-3 NFS root and packed DTB | NFS-root systemd reported a 20-second hardware watchdog, loaded zram, started udev and brought up networkd on `usb0`; the host later reconnected to the existing ext4 root | SSH never became available on the NFS root, so `/proc/iomem`, UFS flag readback, `tools/phone-smoke`, `networkctl status usb0` from the phone and visible-screen evidence remain unavailable for Omarchy 4.5.0-3. The disposable test root temporarily masked zram swap and included early-SSH diagnostic wiring; those changes are not in the package. No partition was flashed. | | 2026-11-14 | `d7bdde5e35b5c78a5878ebf4df28effefca35bed9a26c39098f473278d233ead` (debug image: `c86d517e5c3c5940f3099f46524968d59ddf6e0a258aac51fd00547b7acc24bb`) | Kernel `7.3.0-rc6-omamobile-push1-g7062b50298ff`, source `7062b50298ff2868e5a8a0be70483227e9c7db0b`; rootfs image SHA-256 `75f2dc67630c2661705f3b796170621a3582d96093893ed72e6f680ec34581ce` | No `/proc/iomem` or UFS `ro` flags were captured. A later SSH session reported kernel `7.3.0-rc6-omamobile-push1-g2a318a96ae9d-dirty` and root type `ext4`; `reboot-to bootloader` returned the phone to fastboot. | Omarchy 4.5.0-3 / `omamobile-omarchy 0.1.45` rootfs build and all rootfs smoke checks passed; 1818 kernel modules included `qcom-wdt`, MSM DRM and EA8074. The NFS image showed no firstboot log or created test account. A retry of this image was accepted by `fastboot boot`, but a 10-second host capture saw no SSH/RPC/NFS packets and an ARP probe got no reply. Raw `phone-smoke`, `networkctl status usb0`, `/proc/iomem`, UFS flags and display evidence remain unavailable. No flash command was issued; incidental writes by the existing ext4 system cannot be ruled out, so the earlier userdata backup may be stale. | | 2026-11-13 | `50356521ec35b361261de571fc9f8033b55c8fd7ad0689010fb55d0cec16401c` | Corrected RAM image with NFS-root request | Exposed whole-disk and partition flags read-only during the NFS session | Booted kernel `7.3.0-rc6-omamobile-push1` with the disposable NFS root. Installed `omamobile-omarchy 0.1.44-1` locally; its hook applied 29 Omarchy 4.0.6 patches and `omamobile-omarchy-patches verify` passed. `phone-smoke` found no failed systemd units or new kernel errors; USB, DSI enumeration, GPU render node, Hyprland/session, touch, buttons, Bluetooth and thermal checks passed. Root check correctly identifies NFS as non-persistent. Lock IPC was intermittent. No flash or explicit UFS-write command was issued; see the later userdata-root observation below. | | 2026-11-13 | `1d4ce38579a881b6d875a9a3bc025357f753cf119ce5ce16b3dbdc52f86da9f9` | Local RAM image; retained manifest has image/kernel/ramdisk hashes but no source commit; no NFS-root request was included | All exposed whole-disk and partition `ro` flags were `1` | Initramfs and USB/SSH ran on `7.3.0-rc6-omamobile-push1`. `stmfts` registered as `event2`; three touch-key and 428 absolute events arrived during three taps. Display stayed black: only simpledrm `Unknown-1` was present, with no DSI panel/backlight device. Mounted disposable NFS root without switching PID 1; chroot `pacman -Qk omamobile-device-dipper` reported 47 files, none missing. `reboot-to bootloader` used the initramfs helper because PID 1 never switched. No UFS write. | diff --git a/docs/DEVICES.md b/docs/DEVICES.md index 22a8d46a7..6afbac0b7 100644 --- a/docs/DEVICES.md +++ b/docs/DEVICES.md @@ -19,6 +19,7 @@ The status of each device, as verified on real hardware. Rows in the matrix have | Device | Codename | SoC | Boot | Storage | Display | GPU | Touch | Buttons | USB net | Wi-Fi | Bluetooth | Battery | Charging | Haptics | Torch | GNSS | AoC | Speakers/mics | Sensors | Modem | NFC | Cameras | Suspend | Fingerprint | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | +| Xiaomi Mi 8 | dipper | sdm845 (Snapdragon 845) | WIP ([bring-up notes](../device/dipper/BRINGUP-M1.md)) | WIP (guard logs all 85 partitions read-only; direct readback pending) | WIP (EA8074 panel test passed by hand; not enabled in the default image, [notes](../device/dipper/NOTES.md)) | WIP (Adreno 630 renderer tested from a console; Hyprland rendering pending, [#500](https://github.com/derekross/omarchy-mobile/pull/500)) | WIP (FTS5 events captured; Hyprland delivery pending, [notes](../device/dipper/NOTES.md)) | WIP (GPIO buttons registered) | WIP (USB NCM and SSH worked in rescue boots; current Omarchy NFS root not yet usable) | no | WIP (HCI detected; Dipper firmware missing) | no | no | no | no | no | no | no | no | no | no | no | no | | Pixel 7 Pro | cheetah | gs201 (Tensor G2) | works | works | works (120 Hz) | works (DVFS) | works | works | works | works | works (audio) | works | works | works | works | works | works | works | works | works (calls, texts and mobile data on a Verizon-network SIM, 2026-11-03; see below) | works | works (telephoto fixed-focus) | works (auto-sleep on by default, with the modem up since device-cheetah 0.1.60; double tap wakes it; standby measured with the modem off, about 21 h; see below) | works | | Pixel Fold | felix | gs201 (Tensor G2) | WIP ([#3](https://github.com/derekross/omarchy-mobile/issues/3)) | WIP (UFS behind the read-only guard, checked on the phone) | WIP (cover: simplefb console; inner: simpledrm output listed by Hyprland, its splash reserved by [kernel #72](https://github.com/derekross/linux-omarchy-mobile/pull/72); both panels' display triggers set by the descriptor, [#82](https://github.com/derekross/omarchy-mobile/pull/82)) | testing (Panthor; glmark2 on the cover, not up on every image yet; [notes](../device/felix/NOTES.md#2026-10-26-the-power-key-and-the-gpu-in-the-published-kernel)) | WIP (cover: chip id read, no touches yet; the driver's touch reports are merged, [kernel #48](https://github.com/derekross/linux-omarchy-mobile/pull/48), untested on the Fold; [notes](../device/felix/NOTES.md#2026-10-23-cover-touch-id)) | works (volume and power; [notes](../device/felix/NOTES.md#2026-10-26-the-power-key-and-the-gpu-in-the-published-kernel)) | works | no | no | no | no | no | no | no | no | no | no | no | no | no | no | no | | Pixel 6 Pro ([notes](../device/raven/NOTES.md)) | raven | gs101 (Tensor) | works ([#2](https://github.com/derekross/omarchy-mobile/issues/2)) | works | works (120 Hz through gs-decon and the S6E3HC3 driver; unpublished kernel, `omamobile-gs101-display`, in review as [kernel #116](https://github.com/derekross/linux-omarchy-mobile/pull/116), [plan](../device/raven/DISPLAY-PLAN.md)); the published kernel has the boot console only | partial (Panfrost; frequency scaling over 11 levels, 151 to 762 MHz, and GPU cooling through ACPM, merged, [kernel #189](https://github.com/derekross/linux-omarchy-mobile/pull/189), tested on 2026-11-04 on the published kernel plus [kernel #116](https://github.com/derekross/linux-omarchy-mobile/pull/116) and raven's USB override; [plan](../device/raven/GPU-PLAN.md)) | works ([kernel #8](https://github.com/derekross/linux-omarchy-mobile/pull/8)) | works | works (a NOT FOR MERGE DT change; [plan](../device/raven/USB-PLAN.md)) | works (unpublished kernel, `omamobile-gs101-wifi`; [plan](../device/raven/WIFI-PLAN.md)) | partial ([kernel #6](https://github.com/derekross/linux-omarchy-mobile/pull/6); own address; pairing from the menu and A2DP audio work, crackling while Wi-Fi is busy; the chip came up silent after one of seven clean reboots on 2026-11-03, [#77](https://github.com/derekross/omarchy-mobile/issues/77); [plan](../device/raven/BLUETOOTH-PLAN.md)) | works (the gauge; unpublished kernel) | works (the MAX77759 charger at stock's limits with its temperature guard, loaded at boot by device-raven 0.1.26; a full charge to 100 %; the battery node is in the published kernel, [kernel #112](https://github.com/derekross/linux-omarchy-mobile/pull/112), tested on an unpublished kernel; [plan](../device/raven/USB-PLAN.md#4-charging-the-max77759-charger-ravens-b3-after-cheetahs)) | works (CS40L25A through feedbackd, device-raven 0.1.27, with the phone's own firmware from `tools/extract-vendor-firmware -d raven`; the driver and node are merged, [kernel #114](https://github.com/derekross/linux-omarchy-mobile/pull/114); [plan](../device/raven/HAPTICS-TORCH-PLAN.md)) | works (tested on `omamobile-gs101-torch`; the LED's node is now in the published kernel, [kernel #113](https://github.com/derekross/linux-omarchy-mobile/pull/113), not yet run from it; [plan](../device/raven/HAPTICS-TORCH-PLAN.md)) | works (unpublished kernel, `omamobile-gs101-gnss`; [plan](../device/raven/GNSS-PLAN.md)) | works (unpublished kernel, `omamobile-gs101-aoc`; [plan](../device/raven/AUDIO-PLAN.md)) | works (both speakers through raven's protection firmware with the phone's factory calibration, at cheetah's stage media (737/10), which R6 verified on raven; the microphones with them; unpublished kernel, `omamobile-gs101-aoc`; [plan](../device/raven/AUDIO-PLAN.md#r6-ravens-own-speaker-limits-2026-10-27-gb3d6253b0d61-omamobile-audio-044)) | works (accelerometer, light, proximity, compass through the AoC; unpublished kernel) | WIP (calls, texts and data on an unpublished kernel, `omamobile-gs101-cpif`; the package doesn't enable it; [plan](../device/raven/MODEM-PLAN.md)) | no | no | testing (s2idle when asked for, or through the shell's auto-sleep with the `omamobile-sleep` toggle on, which ships off; Power wakes it, 3 of 3 on 2026-11-03 on an unpublished kernel (the published one plus [kernel #116](https://github.com/derekross/linux-omarchy-mobile/pull/116) and raven's USB override); UFS resumes clean with [kernel #188](https://github.com/derekross/linux-omarchy-mobile/pull/188), merged; with the modem up its sleep block holds; [plan](../device/raven/SUSPEND-PLAN.md)) | no | From 566fcdb7e671cae418856ce74bb17f107e4228b7 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Sun, 15 Nov 2026 16:32:50 +0100 Subject: [PATCH 16/44] dipper: honor watchdog limit and report storage state qcom_wdt supports 31 seconds at 32764 Hz, so configure a 30-second runtime and reboot timeout. The 60-second setting was rejected during bring-up. Make phone-smoke read the installed UFS allowlist, check whole disks, and treat an NFS test root as non-persistent. Record the reserved range and USB network state from the latest NFS boot. Verified tests/phone-smoke, the Dipper package test, tools/pr-check, and diff --check. The phone smoke report from the existing Omarchy 4.0.6 ext4 root fails the storage guard and session checks; the fresh NFS-root smoke remains unverified. Assisted-by: Codex --- device/dipper/BRINGUP-M1.md | 11 ++++---- device/dipper/NOTES.md | 2 +- packages/omamobile-device-dipper/README.md | 4 +-- packages/omamobile-device-dipper/test/all | 3 ++- .../system.conf.d/10-omamobile-watchdog.conf | 6 ++--- tools/phone-smoke | 27 ++++++++++++++----- 6 files changed, 35 insertions(+), 18 deletions(-) diff --git a/device/dipper/BRINGUP-M1.md b/device/dipper/BRINGUP-M1.md index 02be53883..c7e95cd4b 100644 --- a/device/dipper/BRINGUP-M1.md +++ b/device/dipper/BRINGUP-M1.md @@ -1,7 +1,7 @@ # Xiaomi Mi 8 (dipper): RAM-only first light -**Status (2026-11-15):** a RAM-only `fastboot boot` reached the Omarchy 4.5.0-3 NFS root with `omamobile-omarchy 0.1.45`. The root's journal records the handoff, UFS guard logs setting all six whole-disk nodes and all 85 partitions read-only, both packed-DTB `removed-region` nodes, the initramfs guard, and the `qcom_wdt` watchdog device. The `ro` flags were not read directly. The exact packed DTB was decompiled after the boot; both nodes were present. `/proc/iomem` was not captured from that root, so the required reserved-range gate remains unverified there. SSH was refused, so phone-side `tools/phone-smoke`, `networkctl status usb0`, watchdog feeder state and the visible screen were not captured. The full kernel module bundle was added to the NFS root after boot, so userspace module loading was not tested. A retry with the original 60-second setting logged `Failed to set watchdog hardware timeout to 1min: Invalid argument` and a udev startup timeout. On a later disposable-root retry, systemd reported a 20-second hardware watchdog, zram and udev started, and networkd brought up `usb0`; SSH still did not become available, and the next host session was back on the existing ext4 root. That diagnostic root temporarily masked zram swap and added early-SSH test wiring; those changes are not in the package. No flash or explicit UFS-write command was issued. Image hash, source commits and evidence limits are in [NOTES.md]. +**Status (2026-11-15):** a RAM-only `fastboot boot` reached the Omarchy 4.5.0-3 NFS root with `omamobile-omarchy 0.1.45`. Its journal records the handoff, the UFS guard setting all six whole-disk nodes and all 85 partitions read-only, both packed-DTB `removed-region` nodes, the initramfs guard, and the `qcom_wdt` device; direct UFS `ro` readback was not captured. In a later 20-second-watchdog NFS retry, `/proc/iomem` showed `0x85fc0000–0x8a8fffff` reserved and `networkctl status usb0` reported routable/configured. Systemd was still `initializing`; it did not reach multi-user, and `tools/phone-smoke`, watchdog feeder state, direct UFS `ro` readback and the visible screen remain unverified. The phone later returned to the existing ext4 root. The 60-second setting was rejected by the driver, so the package now uses 30 seconds (driver maximum 31); a fresh boot with that packaged setting remains unverified. The diagnostic root used volatile journals and temporary early-SSH wiring; those changes are not in the package. No flash or explicit UFS-write command was issued. Image hash, source commits and evidence limits are in [NOTES.md]. **Previous status (2026-11-14):** a fresh rootfs was built with Omarchy 4.5.0-3 and `omamobile-omarchy 0.1.45`; all build-time rootfs smoke checks passed. The Dipper kernel and EA8074 panel module also built. A RAM-only NFS test did not reach that new root: a later SSH session reported the existing kernel (`g2a318a96ae9d-dirty`) and an `ext4` root. `reboot-to bootloader` returned the phone to fastboot. The test image showed no firstboot log or created test account. `/proc/iomem`, UFS read-only flags, `tools/phone-smoke`, `networkctl status usb0` and the visible desktop were not captured. No flash command was issued; incidental userdata writes by the existing ext4 system could not be ruled out. Earlier RAM boots and test limits are recorded in [NOTES.md]. @@ -123,10 +123,11 @@ repository; the SSH public key and generated host key stay in the local output. - The initramfs has no Arch root yet. A later hard NFS-root mount can freeze the root session if the host drops; use it only for a RAM-only probe. NFS-root must configure systemd's hardware watchdog within the kernel driver's limit. - Dipper's current driver allows about 32 seconds at the 32764 Hz sleep clock. - The earlier NFS run reached multi-user at `RuntimeWatchdogSec=20s`; systemd - rejected 60 seconds in the 2026-11-15 test. Keep the setting at 20 seconds for - now. It must never fall through to writable userdata. + The Dipper `qcom_wdt` driver's `0xFFFFF` tick limit at 32764 Hz gives a + maximum timeout of 31 seconds. Systemd rejected 60 seconds in the + 2026-11-15 test; the package now uses 30 seconds for both runtime and reboot + watchdogs. A fresh boot with that packaged setting still needs verification. + It must never fall through to writable userdata. - Wi-Fi needs firmware and the phone's own WLAN address. Read identity files from `persist` with `debugfs` (read-only) before enabling that service; never mount `persist`. diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index 0f8a41a97..307b7d552 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -21,7 +21,7 @@ verify the new NFS-root boot. | --- | --- | --- | --- | --- | | 2026-11-15 | `04dc54e155b90e189b504df03476dc4ea086fdb6b02b2249aab54665a60ffa07` | Kernel `7.3.0-rc6-omamobile-push1`, base `da171eae4cb7b0a852b6629ff986c78ebab911c0` plus panel-driver commit `ee6f8c7139e428be8f8435e4d67503cd7b5486bc`; packed DTB SHA-256 `b5baf1c71cf85f2a0f2c16229aaa4a1a96a53ce00310f57caa68a435b631349d` | NFS root handoff confirmed. UFS guard logs say it set all 6 whole-disk nodes and all 85 partition nodes read-only; their `ro` flags were not read directly. | `fastboot boot` accepted the image. The NFS root was Omarchy 4.5.0-3 with `omamobile-omarchy 0.1.45`; its journal confirms switch to NFS, both `removed-region` reservations, the UFS guard, and the `qcom_wdt` watchdog device. The initramfs guard ran; watchdog feeder state was not read. The packed DTB was decompiled after this boot and contained both removed-region nodes. `/proc/iomem` was not captured, so the reserved-range gate is unverified. SSH was refused; `tools/phone-smoke`, phone-side `networkctl status usb0`, and the visible screen were not captured. The full kernel module bundle was added to the NFS root after this boot, so its userspace module-loading path was not tested. No flash or explicit UFS-write command was issued. | | 2026-11-15 (retry, 60s watchdog) | `04dc54e155b90e189b504df03476dc4ea086fdb6b02b2249aab54665a60ffa07` | Same kernel, rootfs and packed DTB as the preceding row | Boot image accepted by `fastboot boot`; host enumerated CDC NCM and ACM; NFS requests confirmed root-systemd startup | NFS-root systemd journal records `RuntimeWatchdogSec=60s` rejected with `Failed to set watchdog hardware timeout to 1min: Invalid argument`; udev startup timed out and SSH/ping did not respond. No `/proc/iomem`, UFS flag readback, watchdog feeder, `phone-smoke` or visible-screen evidence from that root. No partition was flashed. | -| 2026-11-15 (retry, 20s watchdog) | `04dc54e155b90e189b504df03476dc4ea086fdb6b02b2249aab54665a60ffa07` | Same kernel, Omarchy 4.5.0-3 NFS root and packed DTB | NFS-root systemd reported a 20-second hardware watchdog, loaded zram, started udev and brought up networkd on `usb0`; the host later reconnected to the existing ext4 root | SSH never became available on the NFS root, so `/proc/iomem`, UFS flag readback, `tools/phone-smoke`, `networkctl status usb0` from the phone and visible-screen evidence remain unavailable for Omarchy 4.5.0-3. The disposable test root temporarily masked zram swap and included early-SSH diagnostic wiring; those changes are not in the package. No partition was flashed. | +| 2026-11-15 (retry, 20s watchdog) | `04dc54e155b90e189b504df03476dc4ea086fdb6b02b2249aab54665a60ffa07` | Same kernel, Omarchy 4.5.0-3 NFS root and packed DTB | NFS root; `/proc/iomem` showed `85fc0000-8a8fffff : reserved`; direct UFS `ro` flags were not captured | `networkctl status usb0` reported routable/configured and systemd was still `initializing`, not multi-user. The phone later returned to the existing ext4 root. `tools/phone-smoke`, watchdog feeder state, direct UFS `ro` readback and visible-screen evidence remain unavailable. The disposable test root used volatile journals and temporary early-SSH wiring, not included in the package. No partition was flashed. | | 2026-11-14 | `d7bdde5e35b5c78a5878ebf4df28effefca35bed9a26c39098f473278d233ead` (debug image: `c86d517e5c3c5940f3099f46524968d59ddf6e0a258aac51fd00547b7acc24bb`) | Kernel `7.3.0-rc6-omamobile-push1-g7062b50298ff`, source `7062b50298ff2868e5a8a0be70483227e9c7db0b`; rootfs image SHA-256 `75f2dc67630c2661705f3b796170621a3582d96093893ed72e6f680ec34581ce` | No `/proc/iomem` or UFS `ro` flags were captured. A later SSH session reported kernel `7.3.0-rc6-omamobile-push1-g2a318a96ae9d-dirty` and root type `ext4`; `reboot-to bootloader` returned the phone to fastboot. | Omarchy 4.5.0-3 / `omamobile-omarchy 0.1.45` rootfs build and all rootfs smoke checks passed; 1818 kernel modules included `qcom-wdt`, MSM DRM and EA8074. The NFS image showed no firstboot log or created test account. A retry of this image was accepted by `fastboot boot`, but a 10-second host capture saw no SSH/RPC/NFS packets and an ARP probe got no reply. Raw `phone-smoke`, `networkctl status usb0`, `/proc/iomem`, UFS flags and display evidence remain unavailable. No flash command was issued; incidental writes by the existing ext4 system cannot be ruled out, so the earlier userdata backup may be stale. | | 2026-11-13 | `50356521ec35b361261de571fc9f8033b55c8fd7ad0689010fb55d0cec16401c` | Corrected RAM image with NFS-root request | Exposed whole-disk and partition flags read-only during the NFS session | Booted kernel `7.3.0-rc6-omamobile-push1` with the disposable NFS root. Installed `omamobile-omarchy 0.1.44-1` locally; its hook applied 29 Omarchy 4.0.6 patches and `omamobile-omarchy-patches verify` passed. `phone-smoke` found no failed systemd units or new kernel errors; USB, DSI enumeration, GPU render node, Hyprland/session, touch, buttons, Bluetooth and thermal checks passed. Root check correctly identifies NFS as non-persistent. Lock IPC was intermittent. No flash or explicit UFS-write command was issued; see the later userdata-root observation below. | | 2026-11-13 | `1d4ce38579a881b6d875a9a3bc025357f753cf119ce5ce16b3dbdc52f86da9f9` | Local RAM image; retained manifest has image/kernel/ramdisk hashes but no source commit; no NFS-root request was included | All exposed whole-disk and partition `ro` flags were `1` | Initramfs and USB/SSH ran on `7.3.0-rc6-omamobile-push1`. `stmfts` registered as `event2`; three touch-key and 428 absolute events arrived during three taps. Display stayed black: only simpledrm `Unknown-1` was present, with no DSI panel/backlight device. Mounted disposable NFS root without switching PID 1; chroot `pacman -Qk omamobile-device-dipper` reported 47 files, none missing. `reboot-to bootloader` used the initramfs helper because PID 1 never switched. No UFS write. | diff --git a/packages/omamobile-device-dipper/README.md b/packages/omamobile-device-dipper/README.md index 23c6da8ba..7b8431876 100644 --- a/packages/omamobile-device-dipper/README.md +++ b/packages/omamobile-device-dipper/README.md @@ -5,8 +5,8 @@ This package configures the Mi 8's USB network, keeps Android partitions out of desktop storage tools, transfers the hardware watchdog to systemd, and provides a `reboot-to` helper. -The watchdog timeout is 60 seconds, the value that reached multi-user in the -recorded RAM/NFS boot ([device notes](../../device/dipper/NOTES.md)). +The runtime and reboot watchdog timeouts are 30 seconds, below the Dipper +`qcom_wdt` driver's 31-second limit. It declares Mesa for the tested Freedreno graphics stack and the Qualcomm QRTR userspace packages needed by the WLAN and modem stacks. Their services diff --git a/packages/omamobile-device-dipper/test/all b/packages/omamobile-device-dipper/test/all index 2f77dd0cd..06a6da5ff 100755 --- a/packages/omamobile-device-dipper/test/all +++ b/packages/omamobile-device-dipper/test/all @@ -33,7 +33,8 @@ grep -q '^post_upgrade()' omamobile-device-dipper.install || fail "package upgra grep -q 'KERNEL=="sd\[a-f\]", MODE="0000"' "$tmp/root/usr/lib/udev/rules.d/10-omamobile-storage.rules" || fail "all UFS whole-disk nodes are inaccessible" grep -q 'KERNEL=="sd\[a-f\]\[0-9\]\*", ENV{UDISKS_IGNORE}="1"' "$tmp/root/usr/lib/udev/rules.d/10-omamobile-storage.rules" || fail "all UFS partitions are hidden from desktop tools" grep -q '^Address=172.16.42.1/24$' "$tmp/root/usr/lib/systemd/network/20-usb-gadget.network" || fail "usb0 keeps the initramfs address" -grep -q '^RuntimeWatchdogSec=60s$' "$tmp/root/usr/lib/systemd/system.conf.d/10-omamobile-watchdog.conf" || fail "systemd keeps the tested watchdog timeout" +grep -q '^RuntimeWatchdogSec=30s$' "$tmp/root/usr/lib/systemd/system.conf.d/10-omamobile-watchdog.conf" || fail "runtime watchdog stays within the qcom_wdt limit" +grep -q '^RebootWatchdogSec=30s$' "$tmp/root/usr/lib/systemd/system.conf.d/10-omamobile-watchdog.conf" || fail "reboot watchdog stays within the qcom_wdt limit" [[ ! -e "$tmp/root/usr/lib/systemd/system/omamobile-dipper-identity.service" ]] || fail "identity service stays disabled" [[ ! -e "$tmp/root/usr/lib/systemd/system/omamobile-tailscale-join.service" ]] || fail "tailnet service is not included" printf 'ok - Dipper package files and dependencies\n' diff --git a/packages/omamobile-device-dipper/vendor/systemd/system.conf.d/10-omamobile-watchdog.conf b/packages/omamobile-device-dipper/vendor/systemd/system.conf.d/10-omamobile-watchdog.conf index 68f4a836b..eb34c8f07 100644 --- a/packages/omamobile-device-dipper/vendor/systemd/system.conf.d/10-omamobile-watchdog.conf +++ b/packages/omamobile-device-dipper/vendor/systemd/system.conf.d/10-omamobile-watchdog.conf @@ -1,5 +1,5 @@ # SPDX-License-Identifier: MIT -# The measured RAM/NFS boot reached multi-user with a 60-second watchdog. +# SDM845's qcom_wdt supports at most 31 seconds at its 32764 Hz clock. [Manager] -RuntimeWatchdogSec=60s -RebootWatchdogSec=1min +RuntimeWatchdogSec=30s +RebootWatchdogSec=30s diff --git a/tools/phone-smoke b/tools/phone-smoke index 151466dbf..dd8ef2020 100755 --- a/tools/phone-smoke +++ b/tools/phone-smoke @@ -109,21 +109,33 @@ esac; fi # no slot named, only userdata). allowed=" userdata " [[ -z $slot ]] || allowed+="boot$slot init_boot$slot vendor_boot$slot vendor_kernel_boot$slot dtbo$slot " -rw=() total=0 +# The installed descriptor takes precedence; RAM-only devices allow no writes. +descriptor="$sr/usr/share/omamobile/device.conf" +if [[ -r $descriptor ]] && grep -q '^UFS_RW=' "$descriptor"; then + ufs_rw=$(sed -n 's/^UFS_RW="\{0,1\}\([^"]*\)"\{0,1\}$/\1/p' "$descriptor") + allowed=" $ufs_rw " +fi +disk_rw=() part_rw=() disks=0 total=0 +for s in "$sr"/sys/block/sd[a-f]; do + [[ -r $s/ro ]] || continue + disks=$((disks + 1)) + [[ $(<"$s/ro") == 1 ]] || disk_rw+=("${s##*/}") +done for s in "$sr"/sys/class/block/sd*; do [[ -r $s/partition && -r $s/uevent ]] || continue name=$(sed -n 's/^PARTNAME=//p' "$s/uevent") [[ -n $name ]] || continue total=$((total + 1)) - [[ $(<"$s/ro") == 0 && $allowed != *" $name "* ]] && rw+=("$name") + [[ $(<"$s/ro") == 0 && $allowed != *" $name "* ]] && part_rw+=("$name") done if ((total == 0)); then check skip 1 "storage guard" "no named UFS partitions" -elif ((${#rw[@]})); then - check "not ok" 1 "storage guard" "writable outside the allowlist: ${rw[*]}" +elif ((disks == 0)); then + check "not ok" 1 "storage guard" "no named UFS whole-disk nodes" +elif ((${#disk_rw[@]} || ${#part_rw[@]})); then + check "not ok" 1 "storage guard" "writable UFS nodes: disks ${disk_rw[*]:-none}; partitions ${part_rw[*]:-none}" else - imgs=""; [[ -z $slot ]] || imgs=" and slot ${slot#_}'s boot images" - check ok 1 "storage guard" "$total partitions; only userdata$imgs writable" + check ok 1 "storage guard" "$disks whole disks read-only; $total partitions; no writes outside the descriptor allowlist" fi if [[ -n $slot_from ]]; then printf '%s\n' "${results[@]}" @@ -132,8 +144,11 @@ fi rootdev=$(findmnt -no SOURCE / 2>/dev/null) rootpart=$(sed -n 's/^PARTNAME=//p' "/sys/class/block/${rootdev#/dev/}/uevent" 2>/dev/null) +rootfs=$(findmnt -no FSTYPE / 2>/dev/null) if [[ $rootpart == userdata ]]; then check ok 1 "root" "$(findmnt -no FSTYPE /) on userdata, $(df -h --output=avail / | tail -1 | tr -d ' ') free" +elif [[ $rootfs == nfs || $rootfs == nfs4 ]]; then + check skip 0 "root" "$rootfs test root; not persistent" else check "not ok" 1 "root" "root is on ${rootpart:-$rootdev}, not userdata" fi From 92dadd5233a65288d376154bf4ee27c34c2e549c Mon Sep 17 00:00:00 2001 From: quatrixone Date: Mon, 16 Nov 2026 03:21:53 +0100 Subject: [PATCH 17/44] docs(dipper): update firmware paths to current DTS --- packages/omamobile-device-dipper/README.md | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/packages/omamobile-device-dipper/README.md b/packages/omamobile-device-dipper/README.md index 7b8431876..b51c77cdc 100644 --- a/packages/omamobile-device-dipper/README.md +++ b/packages/omamobile-device-dipper/README.md @@ -12,22 +12,18 @@ It declares Mesa for the tested Freedreno graphics stack and the Qualcomm QRTR userspace packages needed by the WLAN and modem stacks. Their services are not enabled here. -The Dipper device tree explicitly requests `a630_zap.mbn`, `ipa_fws.mbn`, -`mba.mbn` and `modem.mbn` under `qcom/sdm845/Xiaomi/dipper/`, plus Bluetooth -calibration `Xiaomi/dipper/crnv21.bin`. These device-specific blobs must be -extracted from the owner's phone or image; they are not included here. The -`linux-firmware-qcom` dependency supplies generic Qualcomm firmware such as -`a630_sqe.fw`, but does not supply these Dipper-specific names. The +The Dipper DTS requests `a630_zap.mbn`, `ipa_fws.mbn`, `adsp.mbn`, `mba.mbn` +and `modem.mbn` under `qcom/sdm845/Xiaomi/dipper/`, plus Bluetooth calibration +`Xiaomi/dipper/crnv21.bin`. The device-specific files must come from the +owner's own phone or firmware image; none is included here. A Dipper mapping +in `tools/extract-vendor-firmware` is still needed to install those files at +the DTS paths. `linux-firmware-qcom` supplies generic Qualcomm firmware such +as `a630_sqe.fw`; it does not supply the Dipper-specific files. The `[omamobile]` repository mirrorlist is installed for future package updates. QRTR, `pd-mapper`, `tqftpserv` and `rmtfs` are dependencies, but their services are not enabled here; no service in this package writes the modem's partitions. -These paths reflect the Dipper DTS used for this test branch. The active -mainline Dipper DTS currently requests the GPU, IPA and Bluetooth firmware -under `Xiaomi/mi8/` instead; recheck the final DTS paths before adding a -vendor-firmware extraction mapping. - The package installs the same device descriptor used by the build tools. Dipper support remains RAM-boot only. The single `boot` partition and UFS From 1ab3c9bcbf04dde4d9ea84f0c6d2b184cb3a5969 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Mon, 16 Nov 2026 08:24:49 +0100 Subject: [PATCH 18/44] docs(dipper): keep device matrix entry in one place --- docs/DEVICES.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/DEVICES.md b/docs/DEVICES.md index 6afbac0b7..0ada5f1cf 100644 --- a/docs/DEVICES.md +++ b/docs/DEVICES.md @@ -80,7 +80,6 @@ Devices we'd like to support, with the closest starting point. Open an issue to | Pixel 11 Pro, 11 Pro XL, 11 Pro Fold | grizzly, kodiak, yogi | malibu (Tensor G6) | stock facts, contributors welcome: 11 Pro ([#26](https://github.com/derekross/omarchy-mobile/issues/26)), 11 Pro XL ([#199](https://github.com/derekross/omarchy-mobile/issues/199), [notes](../device/kodiak/NOTES.md)), 11 Pro Fold ([#40](https://github.com/derekross/omarchy-mobile/issues/40)) | | Pixel 4 | flame | SM8150 (Snapdragon 855) | **WIP, community port**, in the matrix above: the RAM-only first-light probe is merged ([BRINGUP-M1](../device/flame/BRINGUP-M1.md)); the native install is in review, split out of [#17](https://github.com/derekross/omarchy-mobile/pull/17) into [#55](https://github.com/derekross/omarchy-mobile/pull/55), [#56](https://github.com/derekross/omarchy-mobile/pull/56), [#58](https://github.com/derekross/omarchy-mobile/pull/58) and [#59](https://github.com/derekross/omarchy-mobile/pull/59) | | Pixel 4 XL | coral | SM8150 (Snapdragon 855) | **WIP, community port**, in the matrix above: bring-up notes merged ([#52](https://github.com/derekross/omarchy-mobile/pull/52): [BRINGUP-M1](../device/coral/BRINGUP-M1.md), [NOTES](../device/coral/NOTES.md)), with companion kernel/userspace sources ([omarchy-mobile-coral v0.2.3](https://github.com/HemangKumawat/omarchy-mobile-coral/tree/v0.2.3)); slot-B installer and `CONTRIBUTING.md` §3.1 entry still to land | -| Xiaomi Mi 8 | dipper | SDM845 | **WIP, community port:** the RAM-only first-light probe is merged ([BRINGUP-M1](../device/dipper/BRINGUP-M1.md), [NOTES](../device/dipper/NOTES.md)); single-slot, no install path yet. Kernel: touch [#219](https://github.com/derekross/linux-omarchy-mobile/pull/219) merged, board DTS [#220](https://github.com/derekross/linux-omarchy-mobile/pull/220) merged, panel [#218](https://github.com/derekross/linux-omarchy-mobile/pull/218) in review. | | POCO F3 | alioth | SM8250 (Snapdragon 870) | the first non-Pixel port: a guarded installer and root image were proposed in [#25](https://github.com/derekross/omarchy-mobile/pull/25), paused by its author and closed on 2026-11-11; it can be reopened | | OnePlus 13 | dodge | SM8750 (Snapdragon 8 Elite) | **WIP, community port**, in the matrix above: device files, notes and the qcom-abl boot images merged ([#111](https://github.com/derekross/omarchy-mobile/pull/111)); its kernel stays in the contributor's fork ([mrlund/linux-omarchy-mobile `dodge-v3-20261101`](https://github.com/mrlund/linux-omarchy-mobile/tree/dodge-v3-20261101); [kernel #115](https://github.com/derekross/linux-omarchy-mobile/pull/115) closed: the SoC series is out of this tree's scope); the guarded installer follows in a later pull request | | OnePlus 6 | enchilada | SDM845 (Snapdragon 845) | **WIP, community port: [#432](https://github.com/derekross/omarchy-mobile/issues/432)**, in the matrix above: descriptor and notes; RAM-only (`fastboot boot`) until the slot-B install and its CONTRIBUTING.md §3.1 entry are agreed; `omamobile images` packs its header-v0 boot image, and its `UFS_RW_LUNS=sde` (the guard's second-LUN list, #530) comes with the slot-B install | From aef512487cc9bcbb3d232bf4d42159f8516305d2 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Mon, 16 Nov 2026 08:25:10 +0100 Subject: [PATCH 19/44] docs(dipper): qualify FTS5 reconstruction --- device/dipper/NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index 307b7d552..7f7797e37 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -155,7 +155,7 @@ event (`ABS_MT_TRACKING_ID=-1`). No UFS partition was written. The node is now proposed disabled in kernel PR #249 at `0d548847248512b1e8e1d40d66a85b81fe5ed471`; enabling it with the repository overlay [`device/dipper/overlays/fts5-touchscreen.dtso`](overlays/fts5-touchscreen.dtso), -blob `f09381d59a110d02a8b8819f585e304efb1870a3`, rebuilds the tested node. +blob `f09381d59a110d02a8b8819f585e304efb1870a3`, is meant to rebuild the tested node; the boot image was not retained for comparison. Both proposed sources postdate the historical boots. Then booted a RAM image with the same FTS5 node enabled directly in the kernel From b1eb39f93dcc831261ec9ab6d6a1d3d0451ebeb9 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Mon, 16 Nov 2026 08:50:34 +0100 Subject: [PATCH 20/44] docs(dipper): record guarded rescue boot --- device/dipper/NOTES.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index 7f7797e37..56bb5e255 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -5,6 +5,25 @@ Facts only, each read off the phone. Captures remain outside the repository because they contain device identifiers and Wi-Fi keys; this file records only the facts needed for review. +## 2026-11-16 — RAM rescue and NFS retry + +RAM image `426af1000e4912f26cff210f9ffe6017753289a93db53297489525ac974d11c9` +used the kernel and DTB from `04dc54e1…`, its initramfs with the NFS export +path updated, and `omamobile.initramfs` to stay in rescue. SSH host identity +matched the image's key. `uname -r` was `7.3.0-rc6-omamobile-push1`, `/` was +`rootfs`, and `/proc/iomem` reserved `0x85fc0000–0x8a8fffff`. All 91 disk and +partition `ro` flags read `1`; `qcom_wdt` was bound and its feeder was running. +The NFS root mounted read-only and contained systemd. The initramfs helper +`/usr/local/bin/reboot-to bootloader` returned the phone to fastboot. + +The matching 1818 kernel modules were copied into the disposable NFS root. A +subsequent RAM boot of `16f038cd425d4a5b0afe0da9b60df58bc79a689f50772a9c0469a5fb74b22c8c` +used the same kernel, DTB and modified initramfs without the rescue flag. +Initramfs SSH briefly opened but was gone before a shell was captured. The +phone answered ping, but NFS-root SSH and a current phone-side smoke report +were not obtained. The handoff and visible screen on this retry are unverified. +No UFS flash or explicit UFS write was issued. + ## Fastboot recovery (2026-11-15) From the existing Linux system on `userdata` (not the new NFS-root image), From a5f0a8961a34c9e39a79d07a9b847ba66f48e208 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Mon, 16 Nov 2026 08:55:26 +0100 Subject: [PATCH 21/44] docs(dipper): record initial setup blocker --- device/dipper/NOTES.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index 56bb5e255..9d27b892e 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -24,6 +24,15 @@ phone answered ping, but NFS-root SSH and a current phone-side smoke report were not obtained. The handoff and visible screen on this retry are unverified. No UFS flash or explicit UFS write was issued. +The disposable root's persistent journal subsequently showed an NFS handoff +on 2026-11-16, followed by `systemd-firstboot.service` starting its interactive +Initial Setup before `sysinit.target`; the user saw a timezone prompt on the +phone. SSH in the root had not started. For a further test only, that service +was masked in the disposable NFS root; `omamobile-firstboot` and its existing +test configuration were left enabled. The next RAM boot was accepted by +fastboot, but the resulting root and SSH were not confirmed. This mask is not +a packaged change or evidence of a working first boot. + ## Fastboot recovery (2026-11-15) From the existing Linux system on `userdata` (not the new NFS-root image), From 0e2a95a086eca3cf9135706beb3f83a1e9ed20a1 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Mon, 16 Nov 2026 09:17:33 +0100 Subject: [PATCH 22/44] docs(dipper): record firstboot retry limits --- device/dipper/NOTES.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index 9d27b892e..07a9b0239 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -33,6 +33,15 @@ test configuration were left enabled. The next RAM boot was accepted by fastboot, but the resulting root and SSH were not confirmed. This mask is not a packaged change or evidence of a working first boot. +A later retry staged the draft #839 `systemd-firstboot` drop-in and verified +the test answers with `omamobile-firstboot --check`. The disposable root also +had a temporary root SSH key, a networkd override leaving `usb0` unmanaged, +and volatile journal storage. The NFS root's SSH host key was observed on +the USB link, but the connection timed out before a shell or phone-side +`phone-smoke` could be captured. This does not establish the condition result, +storage flags or a running desktop on that boot. No UFS flash or explicit UFS +write was issued. + ## Fastboot recovery (2026-11-15) From the existing Linux system on `userdata` (not the new NFS-root image), From 7cbb3284c49f1b0e3a72846bddaeea2b672c272d Mon Sep 17 00:00:00 2001 From: quatrixone Date: Mon, 16 Nov 2026 09:48:58 +0100 Subject: [PATCH 23/44] docs(dipper): record isolated NFS smoke report --- device/dipper/NOTES.md | 44 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index 07a9b0239..97c8241c2 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -42,6 +42,50 @@ the USB link, but the connection timed out before a shell or phone-side storage flags or a running desktop on that boot. No UFS flash or explicit UFS write was issued. +## 2026-11-16 — isolated NFS session and smoke report + +RAM image `16f038cd425d4a5b0afe0da9b60df58bc79a689f50772a9c0469a5fb74b22c8c` +reached the disposable Omarchy 4.5.0-3 NFS root with kernel +`7.3.0-rc6-omamobile-push1`; systemd reported `running`. The phone showed +`0x85fc0000–0x8a8fffff` reserved and all 6 disk and 85 partition `ro` flags +were `1`. The root used a temporary SSH key, volatile journaling, an unmanaged +USB network override and a draft #839 drop-in. `omamobile-firstboot` was masked +at boot for isolation, then the mask was removed on the host after boot. This +does not validate the normal first-boot path. `networkctl` reported `usb0` +routable and unmanaged. No UFS flash or explicit UFS write was issued. + +The read-only smoke report follows. Display means connector detection, not a +visual confirmation. Mesa rendering was not verified: no render node existed. + +### phone-smoke: dipper + +Kernel `7.3.0-rc6-omamobile-push1`, tools at `4b535d0`, 2026-11-16T08:31Z. + +| Check | Result | Detail | +| --- | --- | --- | +| boot (required) | skip | kernel 7.3.0-rc6-omamobile-push1, no slot in bootconfig or on the command line | +| storage guard (required) | ok | 6 whole disks read-only; 85 partitions; no writes outside the descriptor allowlist | +| root | skip | nfs test root; not persistent | +| kernel health (required) | ok | no oops or BUG; 0 WARN, 2 error lines in dmesg (0 known, 2 new) | +| new dmesg errors | not ok | watchdog: N: watchdog did not stop! x1; (generato[N]: '…' failed with exit status N x1 | +| systemd units | ok | none failed | +| USB gadget (required) | ok | bound to a600000.usb | +| display | ok | card0-Unknown-1 connected, 1080x2248 | +| GPU | not ok | no render node | +| session (required) | not ok | Hyprland runs, the shell isn't running | +| lock | ok | PAM file present (the shell didn't answer lock status) | +| touch | not ok | no multitouch input device | +| buttons | ok | gpio-keys | +| Wi-Fi | skip | no wireless interface | +| Bluetooth | skip | no controller | +| battery | skip | no battery power supply | +| sound cards | skip | none | +| sensors | skip | no sensor proxy | +| cameras | skip | no libcamera tools | +| thermal | ok | hottest zone 37 °C | + +Packages: hyprland 0.57.0-3.3, libcamera 0.7.2-4.23, mesa 1:26.2.4-1.5, omacam 0.3.3-1, omamessages 0.2.2-1, omamobile-apps 0.2.3-1, omamobile-device-dipper 0.1.0-1, omamobile-firstboot 0.1.5-1, omamobile-keyring 20261026-1, omamobile-mirror 0.1.1-1, omamobile-omarchy 0.1.45-1, omamobile-owl-widgets 0.1.2-1, omamobile-settings 0.1.2-1, omamobile-shell 0.2.127-1, omamobile-voice 0.1.0-1, omaphone 0.2.3-1, omarchy 4.5.0-3, omatel-agent 0.2.4-2, quickshell 0.3.2.r7.g2b4501a-1 + ## Fastboot recovery (2026-11-15) From the existing Linux system on `userdata` (not the new NFS-root image), From 1b193b08514b5af604e59dac8069947519b41fa7 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Mon, 16 Nov 2026 09:50:05 +0100 Subject: [PATCH 24/44] docs(dipper): record visible lock screen --- device/dipper/NOTES.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index 97c8241c2..bd9f22eee 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -54,8 +54,10 @@ at boot for isolation, then the mask was removed on the host after boot. This does not validate the normal first-boot path. `networkctl` reported `usb0` routable and unmanaged. No UFS flash or explicit UFS write was issued. -The read-only smoke report follows. Display means connector detection, not a -visual confirmation. Mesa rendering was not verified: no render node existed. +The read-only smoke report follows. Its display result is connector detection; +after the report, the user observed the Omarchy logo and password lock screen +on the phone. Unlock was not tested. Mesa rendering was not verified: no render +node existed. ### phone-smoke: dipper From af6307c75f165f4b263f97d28ead09bfc395e7f3 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Mon, 16 Nov 2026 11:51:08 +0100 Subject: [PATCH 25/44] device/dipper: map firmware from owner partitions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Teach the firmware extractor to stage Dipper firmware from the owner’s vendor, modem and Bluetooth partition roots, including Qualcomm split segments. Record the fresh NFS smoke report and the failed clean-boot retry without claiming the desktop works. --- device/dipper/NOTES.md | 54 ++++++++++ packages/omamobile-device-dipper/README.md | 20 ++-- tests/extract-vendor-firmware | 45 +++++++++ tools/extract-vendor-firmware | 111 ++++++++++++++++----- 4 files changed, 195 insertions(+), 35 deletions(-) diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index bd9f22eee..79fc75c1c 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -88,6 +88,60 @@ Kernel `7.3.0-rc6-omamobile-push1`, tools at `4b535d0`, 2026-11-16T08:31Z. Packages: hyprland 0.57.0-3.3, libcamera 0.7.2-4.23, mesa 1:26.2.4-1.5, omacam 0.3.3-1, omamessages 0.2.2-1, omamobile-apps 0.2.3-1, omamobile-device-dipper 0.1.0-1, omamobile-firstboot 0.1.5-1, omamobile-keyring 20261026-1, omamobile-mirror 0.1.1-1, omamobile-omarchy 0.1.45-1, omamobile-owl-widgets 0.1.2-1, omamobile-settings 0.1.2-1, omamobile-shell 0.2.127-1, omamobile-voice 0.1.0-1, omaphone 0.2.3-1, omarchy 4.5.0-3, omatel-agent 0.2.4-2, quickshell 0.3.2.r7.g2b4501a-1 +## 2026-11-16 — networkd reload and clean-boot retry + +On the same NFS-root session, `networkctl reload` and `networkctl reconfigure +usb0` selected the packaged `/usr/lib/systemd/network/20-usb-gadget.network`; +`usb0` reported `routable (configured)` and online. A fresh SSH command +completed and the following `phone-smoke` ran. This verifies the live +reconfiguration, not that a clean boot reaches that state. + +The follow-up smoke used kernel +`7.3.0-rc6-omamobile-push1-gf61e96519032`, tools at `92f8953`, and the same +RAM-only image (`4b028fb51f446647473e0a887dc5689a0c32cbedb98d8ee53ce81366a541d4f7`). +The handset clock was `1970-01-19T01:41Z`; that timestamp is not a test date. +Storage guard passed (6 disks, 85 partitions read-only), kernel health showed +no new errors, systemd had no failed units, USB and display detection passed, +and Bluetooth created `hci0` with its power state unknown. The root remained +NFS and non-persistent. The report still found no GPU render node, no shell +process, and no multitouch input device. No visual screen capture was made on +this pass. + +### phone-smoke: dipper + +Kernel `7.3.0-rc6-omamobile-push1-gf61e96519032`, tools at `92f8953`, +handset clock `1970-01-19T01:41Z`. + +| Check | Result | Detail | +| --- | --- | --- | +| boot (required) | skip | no slot in bootconfig or on the command line | +| storage guard (required) | ok | 6 whole disks read-only; 85 partitions; no writes outside the descriptor allowlist | +| root | skip | NFS test root; not persistent | +| kernel health (required) | ok | no oops or BUG; 0 WARN, 0 error lines in dmesg | +| systemd units | ok | none failed | +| USB gadget (required) | ok | bound to a600000.usb | +| display | ok | card0-Unknown-1 connected, 1080x2248 | +| GPU | not ok | no render node | +| session (required) | not ok | Hyprland runs, the shell isn't running | +| lock | ok | PAM file present (the shell didn't answer lock status) | +| touch | not ok | no multitouch input device | +| buttons | ok | gpio-keys | +| Wi-Fi | skip | no wireless interface | +| Bluetooth | ok | hci0, powered unknown | +| battery | skip | no battery power supply | +| sound cards | skip | none | +| sensors | skip | no sensor proxy | +| cameras | skip | no libcamera tools | +| thermal | ok | hottest zone 60 °C | + +After that report, `fastboot boot` accepted the same image without flashing a +partition. The USB gadget enumerated, but the host received no ping reply and +fresh SSH timed out; fastboot no longer listed the phone. This clean-boot +retry did not verify the root handoff, networkd takeover, SSH or desktop. The +phone was left in an unresponsive RAM-boot state; the tested recovery remains +the 10-second Power hold, followed by Volume Down + Power for fastboot. No +UFS partition was flashed or explicitly written. + ## Fastboot recovery (2026-11-15) From the existing Linux system on `userdata` (not the new NFS-root image), diff --git a/packages/omamobile-device-dipper/README.md b/packages/omamobile-device-dipper/README.md index b51c77cdc..7330b8e57 100644 --- a/packages/omamobile-device-dipper/README.md +++ b/packages/omamobile-device-dipper/README.md @@ -8,17 +8,21 @@ provides a `reboot-to` helper. The runtime and reboot watchdog timeouts are 30 seconds, below the Dipper `qcom_wdt` driver's 31-second limit. -It declares Mesa for the tested Freedreno graphics stack and the Qualcomm +It declares Mesa for the Freedreno graphics stack and the Qualcomm QRTR userspace packages needed by the WLAN and modem stacks. Their services are not enabled here. -The Dipper DTS requests `a630_zap.mbn`, `ipa_fws.mbn`, `adsp.mbn`, `mba.mbn` -and `modem.mbn` under `qcom/sdm845/Xiaomi/dipper/`, plus Bluetooth calibration -`Xiaomi/dipper/crnv21.bin`. The device-specific files must come from the -owner's own phone or firmware image; none is included here. A Dipper mapping -in `tools/extract-vendor-firmware` is still needed to install those files at -the DTS paths. `linux-firmware-qcom` supplies generic Qualcomm firmware such -as `a630_sqe.fw`; it does not supply the Dipper-specific files. The +The Dipper DTS requests `a630_zap.mbn`, `ipa_fws.mbn`, `adsp.mbn`, +`cdsp.mbn`, `mba.mbn`, `modem.mbn` and `venus.mbn` under +`qcom/sdm845/dipper/`. Bluetooth also needs `qca/Xiaomi/dipper/crnv21.bin` +and `qca/crbtfw21.tlv`. Obtain these files from the owner's own phone or +firmware image; none is included here. Run +`tools/extract-vendor-firmware -d dipper /path/to/partition-roots` on a +directory containing the `vendor/`, +`modem/` and `bluetooth/` partition roots. It preserves the modem `.bNN` +segments required by the Qualcomm loader. `linux-firmware-qcom` supplies +generic Qualcomm firmware such as `a630_sqe.fw`; it does not supply these +Dipper-specific files. The `[omamobile]` repository mirrorlist is installed for future package updates. QRTR, `pd-mapper`, `tqftpserv` and `rmtfs` are dependencies, but their services are not enabled here; no service diff --git a/tests/extract-vendor-firmware b/tests/extract-vendor-firmware index ffb79e7cf..ab6a464d0 100755 --- a/tests/extract-vendor-firmware +++ b/tests/extract-vendor-firmware @@ -137,6 +137,22 @@ make_vendor "$t/v2" cheetah gen2 make_vendor "$t/husky" husky gen3 make_vendor "$t/panther" panther gen4 +# Dipper reads a directory of the owner's partition roots and keeps the split +# modem firmware beside each renamed MDT header. +mkdir -p "$t/dipper-source/vendor/firmware" \ + "$t/dipper-source/modem/image" "$t/dipper-source/bluetooth/image" +for f in a630_zap ipa_fws; do + echo "$f metadata" > "$t/dipper-source/vendor/firmware/$f.mdt" + echo "$f segment" > "$t/dipper-source/vendor/firmware/$f.b00" +done +for f in adsp cdsp modem venus; do + echo "$f metadata" > "$t/dipper-source/modem/image/$f.mdt" + echo "$f segment" > "$t/dipper-source/modem/image/$f.b00" +done +echo mba > "$t/dipper-source/modem/image/mba.mbn" +echo crnv > "$t/dipper-source/bluetooth/image/crnv21.bin" +echo crbtfw > "$t/dipper-source/bluetooth/image/crbtfw21.tlv" + FW=usr/lib/firmware/updates REG=usr/share/omamobile/sensors/registry CHEETAH_FILES="aoc.bin @@ -154,6 +170,21 @@ cs40l26-dvl.bin cs40l26-svc.bin cs40l26.bin cs40l26.wmfw" +DIPPER_FILES="qca/Xiaomi/dipper/crnv21.bin +qca/crbtfw21.tlv +qcom/sdm845/dipper/a630_zap.b00 +qcom/sdm845/dipper/a630_zap.mbn +qcom/sdm845/dipper/adsp.b00 +qcom/sdm845/dipper/adsp.mbn +qcom/sdm845/dipper/cdsp.b00 +qcom/sdm845/dipper/cdsp.mbn +qcom/sdm845/dipper/ipa_fws.b00 +qcom/sdm845/dipper/ipa_fws.mbn +qcom/sdm845/dipper/mba.mbn +qcom/sdm845/dipper/modem.b00 +qcom/sdm845/dipper/modem.mbn +qcom/sdm845/dipper/venus.b00 +qcom/sdm845/dipper/venus.mbn" # run VENDOR IMG ARGS...: the tool with the stand-ins first on PATH run() { @@ -206,6 +237,20 @@ else cat "$t/log"; fail "fresh: a first run succeeds" fi +o=$t/dipper +if run "$t/dipper-source" "$t/dipper-source" -d dipper -o "$o"; then + [[ $(listed "$o") == "$DIPPER_FILES" ]] || fail "dipper: checksum list names DTS firmware and modem segments" + [[ $(cat "$o/$FW/qcom/sdm845/dipper/a630_zap.mbn") == "a630_zap metadata" && + $(cat "$o/$FW/qcom/sdm845/dipper/a630_zap.b00") == "a630_zap segment" && + $(cat "$o/$FW/qcom/sdm845/dipper/adsp.mbn") == "adsp metadata" && + $(cat "$o/$FW/qcom/sdm845/dipper/adsp.b00") == "adsp segment" ]] || + fail "dipper: vendor and modem MDT metadata keep their split segments" + (cd "$o/$FW" && sha256sum --quiet -c "$o/vendor-firmware.sha256") || fail "dipper: output checksums match" + pass_since "$n" "dipper: partition roots map firmware and split modem segments" +else + cat "$t/log"; fail "dipper: partition-root extraction succeeds" +fi + # --- A reused output directory ------------------------------------------------- o=$t/reuse n=$failed seed "$o" diff --git a/tools/extract-vendor-firmware b/tools/extract-vendor-firmware index 425f2e66d..4c3dedf08 100755 --- a/tools/extract-vendor-firmware +++ b/tools/extract-vendor-firmware @@ -1,15 +1,12 @@ #!/bin/bash # SPDX-License-Identifier: MIT -# extract-vendor-firmware: copy the Wi-Fi, Bluetooth, haptics and speaker -# amplifier firmware the Pixel 7 Pro (cheetah) needs out of a Google factory -# image, on the user's own machine. The Pixel 7 (panther), the Pixel 6 Pro -# (raven), the Pixel 9a (tegu) and the Pixel 8 Pro (husky: Wi-Fi, Bluetooth -# and haptics) are options (-d). +# extract-vendor-firmware: stage device-specific firmware from the owner's +# own image. Pixel factory images support cheetah, panther, raven, tegu and +# husky; dipper takes vendor, modem and Bluetooth partition roots (-d). # -# Google's firmware is not ours to redistribute, so Omarchy Mobile never ships it. -# Like LineageOS's extract-files, this pulls it from an image the user already -# has (the factory zip from developers.google.com/android/images, or the -# image-*.zip inside it) and renames it to what the mainline drivers request: +# Proprietary firmware is not ours to redistribute, so Omarchy Mobile never +# ships it. This stages files from the user's own image and renames them to +# what the mainline drivers request: # # vendor/firmware/fw_bcmdhd.bin -> brcm/brcmfmac4389c1-pcie..bin (brcmfmac) # vendor/firmware/bcmdhd.cal -> brcm/brcmfmac4389c1-pcie..txt (NVRAM) @@ -48,6 +45,20 @@ # its version word, the one the MFC reports in FW_VERSION once it runs # (0x44250901 in the image this was tested with). # +# Xiaomi Mi 8 (dipper) takes files from its own vendor, modem and Bluetooth +# partitions. Pass a directory containing those partition roots as vendor/, +# modem/ and bluetooth/ (for example, the read-only mounts of the phone's own +# partitions). The split Qualcomm ELF files keep their .bNN sidecars because +# qcom_mdt_load requests them beside the .mbn metadata file: +# +# vendor/firmware/{a630_zap,ipa_fws}.mdt -> qcom/sdm845/dipper/*.mbn +# vendor/firmware/{a630_zap,ipa_fws}.bNN -> beside the matching .mbn +# modem/image/{adsp,cdsp,modem,venus}.mdt -> qcom/sdm845/dipper/*.mbn +# modem/image/{adsp,cdsp,modem,venus}.bNN -> beside the matching .mbn +# modem/image/mba.mbn -> qcom/sdm845/dipper/mba.mbn +# bluetooth/image/crnv21.bin -> qca/Xiaomi/dipper/crnv21.bin +# bluetooth/image/crbtfw21.tlv -> qca/crbtfw21.tlv +# # The Pixel 9a (-d tegu; is "google,zumapro-tegu"): # # vendor/firmware/fw_bcmdhd.bin -> brcm/brcmfmac4383-pcie..bin (brcmfmac) @@ -158,11 +169,12 @@ usage() { Usage: extract-vendor-firmware [-o OUTDIR] [-w WORKDIR] [-f] SOURCE SOURCE Google factory zip (-*-factory-*.zip), the image--*.zip - inside it, or a raw/sparse vendor.img + inside it, or a raw/sparse vendor.img. For dipper, a directory + with vendor/, modem/ and bluetooth/ partition roots from your own phone/image. -o DIR staging root to write into (default: ./out/vendor-firmware); a successful run replaces this script's earlier outputs there -w DIR scratch directory for the ~1 GB vendor.img (default: a temp dir in \$TMPDIR) - -d DEV cheetah (default), panther, raven, tegu or husky + -d DEV cheetah (default), panther, raven, tegu, husky or dipper -s SKU husky: the hardware SKU (androidboot.hardware.sku), which picks the NVRAM -f skip the device checks (android-info.txt board=$DEVICE, the vendor build.prop) -c FILE also copy the camera HAL APEX (/vendor/apex/com.google.pixel.camera.hal.apex) @@ -281,13 +293,38 @@ case $DEVICE_OPT in "firmware/cs40l26-dvl.bin|cs40l26-dvl.bin" "firmware/cs40l26-calib.wmfw|cs40l26-calib.wmfw" ) ;; - *) die "unknown device $DEVICE_OPT (cheetah, panther, raven, tegu or husky)" ;; + dipper) + DEVICE=dipper + MAP=( + "vendor/firmware/a630_zap.mdt|qcom/sdm845/dipper/a630_zap.mbn" + "vendor/firmware/ipa_fws.mdt|qcom/sdm845/dipper/ipa_fws.mbn" + "modem/image/adsp.mdt|qcom/sdm845/dipper/adsp.mbn" + "modem/image/cdsp.mdt|qcom/sdm845/dipper/cdsp.mbn" + "modem/image/mba.mbn|qcom/sdm845/dipper/mba.mbn" + "modem/image/modem.mdt|qcom/sdm845/dipper/modem.mbn" + "modem/image/venus.mdt|qcom/sdm845/dipper/venus.mbn" + "bluetooth/image/crnv21.bin|qca/Xiaomi/dipper/crnv21.bin" + "bluetooth/image/crbtfw21.tlv|qca/crbtfw21.tlv" + ) ;; + *) die "unknown device $DEVICE_OPT (cheetah, panther, raven, tegu, husky or dipper)" ;; esac [[ $DEVICE == husky || -z $SKU ]] || die "-s is for husky only" # The camera data flow (tools/extract-camera-data) exists for cheetah only [[ $DEVICE == cheetah || -z $CAMERA_APEX ]] || die "-c is cheetah's (no camera support for $DEVICE yet)" SRC=$(readlink -f "$1") -[[ -f "$SRC" ]] || die "no such file: $1" +if [[ $DEVICE == dipper ]]; then + [[ -d $SRC ]] || die "dipper SOURCE must be a directory containing vendor/, modem/ and bluetooth/ partition roots" + for name in adsp cdsp modem venus a630_zap ipa_fws; do + srcdir=modem/image + [[ $name != a630_zap && $name != ipa_fws ]] || srcdir=vendor/firmware + for src in "$SRC"/"$srcdir"/"$name".b*; do + [[ -f $src ]] || continue + MAP+=("${src#"$SRC"/}|qcom/sdm845/dipper/${src##*/}") + done + done +else + [[ -f "$SRC" ]] || die "no such file: $1" +fi # Absolute, because the checksum step runs from inside the staging dir OUT=$(realpath -m -- "$OUT") # Publishing replaces whole directories under OUT, so OUT=/ would replace this @@ -374,6 +411,9 @@ fetch_vendor() { rm -rf "$WORK/super" "$WORK/super.img" } +if [[ $DEVICE == dipper ]]; then + get_file() { [[ -s "$SRC/$1" ]] && cp -- "$SRC/$1" "$2"; } +else fetch_vendor "$SRC" img="$WORK/vendor.img" if [[ "$(magic_at "$img" 0)" == ed26ff3a ]]; then @@ -424,10 +464,13 @@ elif [[ "$(magic_at "$img" 1024)" == e0f5e1e2 ]]; then else die "vendor.img is neither ext4 nor EROFS" fi +fi # The board list in android-info.txt is shared by pantah devices; the vendor # partition itself says which device it was built for. -if get_file build.prop "$WORK/build.prop"; then +if [[ $DEVICE == dipper ]]; then + say "Source: Dipper vendor, modem and Bluetooth partition roots" +elif get_file build.prop "$WORK/build.prop"; then dev=$(sed -n 's/^ro.product.vendor.device=//p' "$WORK/build.prop" | head -1) [[ "$dev" == "$DEVICE" || -n "$FORCE" ]] || die "vendor partition is for '${dev:-unknown}', not $DEVICE; use -f to override" @@ -445,15 +488,21 @@ dest="$new/$DEST_REL" for entry in "${MAP[@]}"; do from=${entry%%|*} to=${entry#*|} mkdir -p "$dest/$(dirname "$to")" - get_file "$from" "$dest/$to" || die "/vendor/$from is missing from this image or could not be copied" + source_label=/vendor + [[ $DEVICE != dipper ]] || source_label=/partition + get_file "$from" "$dest/$to" || die "$source_label/$from is missing from this source or could not be copied" chmod 0644 "$dest/$to" - printf ' /vendor/%-28s -> /%s/%s\n' "$from" "$DEST_REL" "$to" + if [[ $DEVICE == dipper ]]; then + printf ' /%-52s -> /%s/%s\n' "$from" "$DEST_REL" "$to" + else + printf ' /vendor/%-44s -> /%s/%s\n' "$from" "$DEST_REL" "$to" + fi done # The AoC's sensor registry (which sensors this board has, their buses and # settings), read by omamobile-sensor-proxy; without it only virtual sensors. # husky has no AoC driver yet, so it skips the registry. -if [[ $DEVICE != husky ]]; then +if [[ $DEVICE != husky && $DEVICE != dipper ]]; then reg="$new/usr/share/omamobile/sensors" get_dir etc/sensors/registry "$reg" || die "/vendor/etc/sensors/registry is missing from this image or could not be copied" @@ -471,12 +520,14 @@ fi # Sanity checks: right chip, text NVRAM, Cirrus file formats. brcm="$dest/brcm" -grep -aq "$WIFI_CHIP-roml" "$brcm/$FW_BASE.$BOARD.bin" || - die "fw_bcmdhd.bin is not a $WIFI_CHIP PCIe firmware" -[[ -z $BT_CHIP ]] || grep -aq "$BT_CHIP" "$brcm/BCM.$BOARD.hcd" || - die "BCM.hcd is not a ${BT_NAME:-$BT_CHIP} Bluetooth patch" -grep -aq '^NVRAMRev=' "$brcm/$FW_BASE.$BOARD.txt" || - die "bcmdhd.cal does not look like a Broadcom text NVRAM" +if [[ $DEVICE != dipper ]]; then + grep -aq "$WIFI_CHIP-roml" "$brcm/$FW_BASE.$BOARD.bin" || + die "fw_bcmdhd.bin is not a $WIFI_CHIP PCIe firmware" + [[ -z $BT_CHIP ]] || grep -aq "$BT_CHIP" "$brcm/BCM.$BOARD.hcd" || + die "BCM.hcd is not a ${BT_NAME:-$BT_CHIP} Bluetooth patch" + grep -aq '^NVRAMRev=' "$brcm/$FW_BASE.$BOARD.txt" || + die "bcmdhd.cal does not look like a Broadcom text NVRAM" +fi wmfw_halo() { # WMFW, Halo core (4): what cs_dsp accepts for this part [[ "$(head -c4 "$dest/$1")" == WMFW && "$(od -An -tu1 -j10 -N1 "$dest/$1" | tr -d ' ')" == 4 ]] || die "$1 is not a Halo Core WMFW firmware" @@ -529,16 +580,22 @@ if [[ $DEVICE == panther ]]; then mfc_ver=$(od -An -tx4 -j $((mfc_size - 4)) -N4 "$dest/s5p-mfc-v15.fw" | tr -d ' ') fi -ver=$(grep -ao 'Version=[0-9.]* ([^)]*)' "$brcm/$FW_BASE.$BOARD.bin" | head -1) -bt="" -[[ -z $BT_CHIP ]] || bt=$(grep -ao "$BT_CHIP [^[]*" "$brcm/BCM.$BOARD.hcd" | head -1) +ver= bt="" +if [[ $DEVICE != dipper ]]; then + ver=$(grep -ao 'Version=[0-9.]* ([^)]*)' "$brcm/$FW_BASE.$BOARD.bin" | head -1) + [[ -z $BT_CHIP ]] || bt=$(grep -ao "$BT_CHIP [^[]*" "$brcm/BCM.$BOARD.hcd" | head -1) +fi (cd "$dest" && find . -type f -printf '%P\n' | LC_ALL=C sort | xargs sha256sum -- > "$new/vendor-firmware.sha256") # The checksum list names exactly the mapped files for entry in "${MAP[@]}"; do printf '%s\n' "${entry#*|}"; done | LC_ALL=C sort > "$stage/expected" cut -c67- "$new/vendor-firmware.sha256" | cmp -s - "$stage/expected" || die "the staged firmware is not exactly the mapped files" +if [[ $DEVICE == dipper ]]; then + say "Mapped Dipper firmware and split Qualcomm modem segments" +else say "Wi-Fi firmware: ${ver:-unknown version}" +fi if [[ $DEVICE == husky ]]; then say "NVRAM: /vendor/firmware/$nvram${SKU:+ (SKU $SKU)}" [[ -n $SKU ]] || say "No -s SKU: stock's default NVRAM; pass the phone's SKU for its region's" @@ -574,4 +631,4 @@ fi publishing="" # published: nothing below may undo it [[ -z $CAMERA_APEX ]] || say "Camera HAL APEX copied to $CAMERA_APEX" say "Staged in $OUT (checksums in $OUT/vendor-firmware.sha256)" -echo "This is Google's proprietary firmware from your own factory image. Do not redistribute it." +echo "This is proprietary firmware from your own device image. Do not redistribute it." From 4147199af14e52ce195177b09778b2568b74998a Mon Sep 17 00:00:00 2001 From: quatrixone Date: Mon, 16 Nov 2026 11:53:29 +0100 Subject: [PATCH 26/44] dipper: use WCN3990 firmware request paths --- packages/omamobile-device-dipper/README.md | 6 +++--- tests/extract-vendor-firmware | 4 ++-- tools/extract-vendor-firmware | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/omamobile-device-dipper/README.md b/packages/omamobile-device-dipper/README.md index 7330b8e57..f9a94b716 100644 --- a/packages/omamobile-device-dipper/README.md +++ b/packages/omamobile-device-dipper/README.md @@ -14,9 +14,9 @@ are not enabled here. The Dipper DTS requests `a630_zap.mbn`, `ipa_fws.mbn`, `adsp.mbn`, `cdsp.mbn`, `mba.mbn`, `modem.mbn` and `venus.mbn` under -`qcom/sdm845/dipper/`. Bluetooth also needs `qca/Xiaomi/dipper/crnv21.bin` -and `qca/crbtfw21.tlv`. Obtain these files from the owner's own phone or -firmware image; none is included here. Run +`qcom/sdm845/dipper/`. The WCN3990 Bluetooth driver also needs +`qca/crnv21.bin` and `qca/crbtfw21.tlv`. Obtain these files from the +owner's own phone or firmware image; none is included here. Run `tools/extract-vendor-firmware -d dipper /path/to/partition-roots` on a directory containing the `vendor/`, `modem/` and `bluetooth/` partition roots. It preserves the modem `.bNN` diff --git a/tests/extract-vendor-firmware b/tests/extract-vendor-firmware index ab6a464d0..8db9f167b 100755 --- a/tests/extract-vendor-firmware +++ b/tests/extract-vendor-firmware @@ -170,8 +170,8 @@ cs40l26-dvl.bin cs40l26-svc.bin cs40l26.bin cs40l26.wmfw" -DIPPER_FILES="qca/Xiaomi/dipper/crnv21.bin -qca/crbtfw21.tlv +DIPPER_FILES="qca/crbtfw21.tlv +qca/crnv21.bin qcom/sdm845/dipper/a630_zap.b00 qcom/sdm845/dipper/a630_zap.mbn qcom/sdm845/dipper/adsp.b00 diff --git a/tools/extract-vendor-firmware b/tools/extract-vendor-firmware index 4c3dedf08..a789fa29a 100755 --- a/tools/extract-vendor-firmware +++ b/tools/extract-vendor-firmware @@ -56,7 +56,7 @@ # modem/image/{adsp,cdsp,modem,venus}.mdt -> qcom/sdm845/dipper/*.mbn # modem/image/{adsp,cdsp,modem,venus}.bNN -> beside the matching .mbn # modem/image/mba.mbn -> qcom/sdm845/dipper/mba.mbn -# bluetooth/image/crnv21.bin -> qca/Xiaomi/dipper/crnv21.bin +# bluetooth/image/crnv21.bin -> qca/crnv21.bin # bluetooth/image/crbtfw21.tlv -> qca/crbtfw21.tlv # # The Pixel 9a (-d tegu; is "google,zumapro-tegu"): @@ -303,7 +303,7 @@ case $DEVICE_OPT in "modem/image/mba.mbn|qcom/sdm845/dipper/mba.mbn" "modem/image/modem.mdt|qcom/sdm845/dipper/modem.mbn" "modem/image/venus.mdt|qcom/sdm845/dipper/venus.mbn" - "bluetooth/image/crnv21.bin|qca/Xiaomi/dipper/crnv21.bin" + "bluetooth/image/crnv21.bin|qca/crnv21.bin" "bluetooth/image/crbtfw21.tlv|qca/crbtfw21.tlv" ) ;; *) die "unknown device $DEVICE_OPT (cheetah, panther, raven, tegu, husky or dipper)" ;; From ea62fa0cb5970c4e9c280558d54ad4b846be6552 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Mon, 16 Nov 2026 12:31:56 +0100 Subject: [PATCH 27/44] docs(dipper): record visible RAM console and NFS retry --- device/dipper/NOTES.md | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index 79fc75c1c..9dd007979 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -5,6 +5,28 @@ Facts only, each read off the phone. Captures remain outside the repository because they contain device identifiers and Wi-Fi keys; this file records only the facts needed for review. +## 2026-11-16 — visible RAM console and NFS retry + +A locally repacked RAM rescue image used the same kernel and DTB as the earlier +rescue image, with an SSH public key whose private key was available to the +test host. `fastboot boot` accepted it. SSH confirmed kernel +`7.3.0-rc6-omamobile-push1`, a `rootfs` root, all 6 UFS disks and 85 +partitions read-only, and fbcon bound to the 1080x2248 framebuffer. A line +written to `/dev/tty0` was visible on the phone, as confirmed by the owner. +`/usr/local/bin/reboot-to bootloader` over SSH returned it to fastboot. The +local key and repacked image are not included in this PR. + +Two RAM boots of the current NFS image then mounted the disposable Omarchy +root, but SSH in that root never became usable. The NFS connection stopped +and the phone restarted into its pre-existing ext4 `userdata` system, which +reported a writable main disk. Both times, `reboot-to bootloader` over SSH +returned it to fastboot. The second attempt used a test-only networkd rule +leaving `usb0` unmanaged and volatile journaling; neither prevented the +restart. Pstore was empty after the first restart. These attempts do not +verify a clean Omarchy boot, display session or package firstboot. No UFS +partition was flashed or explicitly written, but routine writes by the old +system cannot be ruled out. + ## 2026-11-16 — RAM rescue and NFS retry RAM image `426af1000e4912f26cff210f9ffe6017753289a93db53297489525ac974d11c9` @@ -135,12 +157,17 @@ handset clock `1970-01-19T01:41Z`. | thermal | ok | hottest zone 60 °C | After that report, `fastboot boot` accepted the same image without flashing a -partition. The USB gadget enumerated, but the host received no ping reply and -fresh SSH timed out; fastboot no longer listed the phone. This clean-boot -retry did not verify the root handoff, networkd takeover, SSH or desktop. The -phone was left in an unresponsive RAM-boot state; the tested recovery remains -the 10-second Power hold, followed by Volume Down + Power for fastboot. No -UFS partition was flashed or explicitly written. +partition. The kernel capture records switching to the NFS root after 4.8 s +and systemd starting. USB ping began answering after about 55 s; fresh SSH +still refused or timed out until about 110 s. The subsequent phone-smoke +report found the pre-existing dirty kernel `7.3.0-rc6-omamobile-push1-g2a318a96ae9d-dirty` +and an ext4 root on `userdata`, with the older Omarchy 4.0.6 package stack. +Its storage check found the main disk writable, so this report does not test +the NFS image. The user reported that the text console was no longer visible. +`reboot-to bootloader` over SSH then returned the phone to fastboot; product +was `dipper` and the bootloader was unlocked. No partition was flashed and no +explicit UFS write command was issued; incidental writes from the existing +system cannot be ruled out. ## Fastboot recovery (2026-11-15) From 93d1279e29a7176f428d1b66d08a722428ad6cfb Mon Sep 17 00:00:00 2001 From: quatrixone Date: Mon, 16 Nov 2026 17:20:19 +0100 Subject: [PATCH 28/44] docs(dipper): distinguish NFS retries from installed root --- device/dipper/BRINGUP-M1.md | 8 ++++++++ device/dipper/NOTES.md | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/device/dipper/BRINGUP-M1.md b/device/dipper/BRINGUP-M1.md index c7e95cd4b..cadc556a0 100644 --- a/device/dipper/BRINGUP-M1.md +++ b/device/dipper/BRINGUP-M1.md @@ -1,6 +1,14 @@ # Xiaomi Mi 8 (dipper): RAM-only first light +**Status (2026-11-16):** the owner saw text written to the framebuffer console +in a guarded RAM rescue boot. All 6 UFS disks and 85 partitions were +read-only, and `reboot-to bootloader` worked over SSH. Later NFS-root boots +did not stay up: they restarted into the pre-existing writable ext4 system on +`userdata`. That system is not the new Omarchy root image. The tests and +limits are in [NOTES.md]. No persistent image was flashed; this descriptor +and the shared installer still have no Dipper install path. + **Status (2026-11-15):** a RAM-only `fastboot boot` reached the Omarchy 4.5.0-3 NFS root with `omamobile-omarchy 0.1.45`. Its journal records the handoff, the UFS guard setting all six whole-disk nodes and all 85 partitions read-only, both packed-DTB `removed-region` nodes, the initramfs guard, and the `qcom_wdt` device; direct UFS `ro` readback was not captured. In a later 20-second-watchdog NFS retry, `/proc/iomem` showed `0x85fc0000–0x8a8fffff` reserved and `networkctl status usb0` reported routable/configured. Systemd was still `initializing`; it did not reach multi-user, and `tools/phone-smoke`, watchdog feeder state, direct UFS `ro` readback and the visible screen remain unverified. The phone later returned to the existing ext4 root. The 60-second setting was rejected by the driver, so the package now uses 30 seconds (driver maximum 31); a fresh boot with that packaged setting remains unverified. The diagnostic root used volatile journals and temporary early-SSH wiring; those changes are not in the package. No flash or explicit UFS-write command was issued. Image hash, source commits and evidence limits are in [NOTES.md]. **Previous status (2026-11-14):** a fresh rootfs was built with Omarchy 4.5.0-3 and `omamobile-omarchy 0.1.45`; all build-time rootfs smoke checks passed. The Dipper kernel and EA8074 panel module also built. A RAM-only NFS test did not reach that new root: a later SSH session reported the existing kernel (`g2a318a96ae9d-dirty`) and an `ext4` root. `reboot-to bootloader` returned the phone to fastboot. The test image showed no firstboot log or created test account. `/proc/iomem`, UFS read-only flags, `tools/phone-smoke`, `networkctl status usb0` and the visible desktop were not captured. No flash command was issued; incidental userdata writes by the existing ext4 system could not be ruled out. Earlier RAM boots and test limits are recorded in [NOTES.md]. diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index 9dd007979..8477afe19 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -27,6 +27,17 @@ verify a clean Omarchy boot, display session or package firstboot. No UFS partition was flashed or explicitly written, but routine writes by the old system cannot be ruled out. +Further diagnostic NFS boots left `usb0` unmanaged by both networkd and +NetworkManager in the disposable root. One boot reached +`omamobile-firstboot`, but pacman key population repeatedly waited on GPG +locks; removing stale lock files after the phone was back in fastboot let it +advance, not finish. A test-only initramfs clock seed and a separate boot with +`omamobile-firstboot` masked did not yield a stable NFS session. Each attempt +eventually restarted into the old writable `userdata` installation; SSH from +that installation returned the phone to fastboot. No new root image or boot +partition was flashed. The next gate is a reviewed single-slot install path, +not another claim that the old installation is the new Omarchy image. + ## 2026-11-16 — RAM rescue and NFS retry RAM image `426af1000e4912f26cff210f9ffe6017753289a93db53297489525ac974d11c9` From bb3bbe26c5881e09cb8b775e8b545bf63395ef50 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Mon, 16 Nov 2026 18:19:49 +0100 Subject: [PATCH 29/44] docs(dipper): record base DTB and NFS export comparisons --- device/dipper/NOTES.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index 8477afe19..167c4cf84 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -38,6 +38,18 @@ that installation returned the phone to fastboot. No new root image or boot partition was flashed. The next gate is a reviewed single-slot install path, not another claim that the old installation is the new Omarchy image. +A controlled comparison used the earlier base DTB in place of the later +`dispcc`-enabled DTB, with the same NFS initramfs and disposable root. With +firstboot isolated, both network managers leaving `usb0` alone, and volatile +journaling, the NFS connection still stopped before root SSH answered. A +second try changed only the host's disposable NFS export from `sync` to +`async`; it reduced the observed TCP send queue but did not prevent the same +restart into the old ext4 root. Host USB logs show the Omarchy gadget +disconnecting about a minute after enumeration. Neither the DTB change nor +the export sync mode is established as the sole cause. After the test the +export was restored to `sync`, the test-only root overrides were removed, and +the phone was returned to fastboot through the old installation's SSH. + ## 2026-11-16 — RAM rescue and NFS retry RAM image `426af1000e4912f26cff210f9ffe6017753289a93db53297489525ac974d11c9` From d3678caf4856326485274fdd3a66eb3fdc26f3c5 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Mon, 16 Nov 2026 19:16:14 +0100 Subject: [PATCH 30/44] phone-smoke: preserve slot checks with Dipper storage guard Keep active-slot expectations while reading the installed device allowlist and checking every UFS whole disk. Exercise both rules with fake block devices and a RAM-only descriptor. Tested: tests/phone-smoke, the Dipper package, boot-method, firmware extraction, and tools/pr-check origin/main. Assisted-by: Codex --- tests/phone-smoke | 29 ++++++++++++++++++++++------- tools/phone-smoke | 4 +--- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/tests/phone-smoke b/tests/phone-smoke index 2621d2caf..1bf8de49e 100755 --- a/tests/phone-smoke +++ b/tests/phone-smoke @@ -128,10 +128,15 @@ pass "counted and new lines together" # The boot and storage guard rows (--slot-from: a fake root). The boot row # wants the slot boot-update.conf names (b when absent); the guard row -# allows userdata and the running slot's five boot images. +# checks whole disks and allows userdata and the running slot's boot images. fr=$t/fr fakeroot() { # running suffix (or none), then the writable partitions rm -rf "$fr"; mkdir -p "$fr/proc" "$fr/etc/omamobile" + local disk + for disk in a b c d e f; do + mkdir -p "$fr/sys/block/sd$disk" + echo 1 > "$fr/sys/block/sd$disk/ro" + done echo '123.45 100.00' > "$fr/proc/uptime" [[ $1 == none ]] || printf 'androidboot.slot_suffix = "%s"\n' "$1" > "$fr/proc/bootconfig" echo 'console=ttynull' > "$fr/proc/cmdline" @@ -147,14 +152,14 @@ rows() { out=$(tools/phone-smoke --slot-from "$fr"); } B5="boot_b init_boot_b vendor_boot_b vendor_kernel_boot_b dtbo_b userdata" A5="boot_a init_boot_a vendor_boot_a vendor_kernel_boot_a dtbo_a userdata" fakeroot _b $B5; rows -has 'ok|1|boot|kernel ' && has ', slot b, up 123s' && has 'ok|1|storage guard|13 partitions; only userdata and slot b' \ +has 'ok|1|boot|kernel ' && has ', slot b, up 123s' && has 'ok|1|storage guard|6 whole disks read-only; 13 partitions; no writes outside the descriptor allowlist' \ || fail "a development phone on slot B, no boot-update.conf: both rows pass as before" pass "a development phone on slot B, no boot-update.conf: both rows pass as before" echo 'AUTO_WRITE=yes' > "$fr/etc/omamobile/boot-update.conf"; rows has 'ok|1|boot|' && has 'ok|1|storage guard|' || fail "a release on slot B whose boot-update.conf names no slot: b" pass "a release on slot B whose boot-update.conf names no slot: b" fakeroot _a $A5; printf 'AUTO_WRITE=yes\nSLOT=a\n' > "$fr/etc/omamobile/boot-update.conf"; rows -has 'ok|1|boot|' && has ', slot a, up' && has 'ok|1|storage guard|13 partitions; only userdata and slot a' \ +has 'ok|1|boot|' && has ', slot a, up' && has 'ok|1|storage guard|6 whole disks read-only; 13 partitions; no writes outside the descriptor allowlist' \ || fail "a release on slot A with SLOT=a: both rows pass" pass "a release on slot A with SLOT=a: both rows pass" fakeroot _a $A5; rows @@ -167,16 +172,26 @@ fakeroot _a $A5; printf 'SLOT=a\nSLOT=a\n' > "$fr/etc/omamobile/boot-update.conf has 'not ok|1|boot|' && has 'names SLOT 2 times' || fail "a second SLOT= line fails the boot row" pass "a second SLOT= line fails the boot row" fakeroot _a $A5 boot_b; printf 'SLOT=a\n' > "$fr/etc/omamobile/boot-update.conf"; rows -has 'not ok|1|storage guard|writable outside the allowlist: boot_b' || fail "on slot A, slot B's boot image writable fails the guard row" +has 'not ok|1|storage guard|writable UFS nodes: disks none; partitions boot_b' || fail "on slot A, slot B's boot image writable fails the guard row" fakeroot _b $B5 dtbo_a; rows -has 'not ok|1|storage guard|writable outside the allowlist: dtbo_a' || fail "on slot B, slot A's dtbo writable fails the guard row" +has 'not ok|1|storage guard|writable UFS nodes: disks none; partitions dtbo_a' || fail "on slot B, slot A's dtbo writable fails the guard row" pass "the other slot's boot images writable fail the guard row, either way" fakeroot none userdata; rows -has 'skip|1|boot|' && has 'ok|1|storage guard|13 partitions; only userdata writable' || fail "no slot named: the boot row skips, the guard allows userdata alone" +has 'skip|1|boot|' && has 'ok|1|storage guard|6 whole disks read-only; 13 partitions' || fail "no slot named: the boot row skips, the guard allows userdata alone" fakeroot none $B5; rows -has 'not ok|1|storage guard|writable outside the allowlist: ' && has ' boot_b ' || fail "no slot named: a writable boot image fails the guard row" +has 'not ok|1|storage guard|writable UFS nodes: disks none; partitions ' && has ' boot_b ' || fail "no slot named: a writable boot image fails the guard row" pass "no slot named: the boot row skips and only userdata may be writable" +fakeroot _b; mkdir -p "$fr/usr/share/omamobile" +echo 'UFS_RW=""' > "$fr/usr/share/omamobile/device.conf"; rows +has 'ok|1|storage guard|6 whole disks read-only; 13 partitions' || fail "a RAM-only descriptor allows no UFS writes" +echo 0 > "$fr/sys/class/block/sda11/ro"; rows +has 'not ok|1|storage guard|writable UFS nodes: disks none; partitions userdata' || fail "RAM-only refuses writable userdata" +echo 1 > "$fr/sys/class/block/sda11/ro" +echo 0 > "$fr/sys/block/sda/ro"; rows +has 'not ok|1|storage guard|writable UFS nodes: disks sda; partitions none' || fail "a writable whole disk fails" +pass "RAM-only descriptor and whole-disk guard" + # From the laptop: PHONE_SSH stands in for the phone. It answers the # compatible question and records what the smoke run was started with. printf '%s\n' '#!/bin/bash' 'case $1 in' ' tr*) echo "$COMPAT" ;;' \ diff --git a/tools/phone-smoke b/tools/phone-smoke index dd8ef2020..11d07a451 100755 --- a/tools/phone-smoke +++ b/tools/phone-smoke @@ -104,9 +104,7 @@ else case $slot in esac; fi # ---------------------------------------------------------------- storage -# Every UFS partition is read-only except userdata and the running slot's -# boot images (the guard maps its list to the slot the phone runs from; with -# no slot named, only userdata). +# On older installs, allow userdata and the running slot's boot images. allowed=" userdata " [[ -z $slot ]] || allowed+="boot$slot init_boot$slot vendor_boot$slot vendor_kernel_boot$slot dtbo$slot " # The installed descriptor takes precedence; RAM-only devices allow no writes. From a3c290369d44258bc691c13ba92650e02cebfff2 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Mon, 16 Nov 2026 19:19:16 +0100 Subject: [PATCH 31/44] docs(dipper): record fresh current-stack NFS handoff Distinguish the old export returned by duplicate filesystem UUIDs from the fresh Omarchy root reached after assigning a unique UUID. Record the UFS readback, package versions, firstboot progress, and unmet smoke and display gates without claiming a completed test. Checked: tools/pr-check origin/main and git diff --check. Assisted-by: Codex --- device/dipper/BRINGUP-M1.md | 17 ++++++++++------- device/dipper/NOTES.md | 27 +++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/device/dipper/BRINGUP-M1.md b/device/dipper/BRINGUP-M1.md index cadc556a0..7d2aa55ef 100644 --- a/device/dipper/BRINGUP-M1.md +++ b/device/dipper/BRINGUP-M1.md @@ -1,13 +1,16 @@ # Xiaomi Mi 8 (dipper): RAM-only first light -**Status (2026-11-16):** the owner saw text written to the framebuffer console -in a guarded RAM rescue boot. All 6 UFS disks and 85 partitions were -read-only, and `reboot-to bootloader` worked over SSH. Later NFS-root boots -did not stay up: they restarted into the pre-existing writable ext4 system on -`userdata`. That system is not the new Omarchy root image. The tests and -limits are in [NOTES.md]. No persistent image was flashed; this descriptor -and the shared installer still have no Dipper install path. +**Status (2026-11-16):** the owner saw text on the framebuffer console in a +guarded RAM rescue boot. A later boot reached a fresh Omarchy 4.5.0-3 NFS +root with `omamobile-omarchy 0.1.45`: SSH confirmed its identity and all six +UFS whole disks read-only. `omamobile-firstboot` started, but stalled during +pacman key import; the phone then stopped answering ping and SSH. The full +smoke report and visible desktop remain unverified. Earlier retries fell +back into the pre-existing writable ext4 system on `userdata`; it is not the +new Omarchy root. Exact evidence and limits are in [NOTES.md]. No persistent +image was flashed; this descriptor and the installer have no Dipper install +path. **Status (2026-11-15):** a RAM-only `fastboot boot` reached the Omarchy 4.5.0-3 NFS root with `omamobile-omarchy 0.1.45`. Its journal records the handoff, the UFS guard setting all six whole-disk nodes and all 85 partitions read-only, both packed-DTB `removed-region` nodes, the initramfs guard, and the `qcom_wdt` device; direct UFS `ro` readback was not captured. In a later 20-second-watchdog NFS retry, `/proc/iomem` showed `0x85fc0000–0x8a8fffff` reserved and `networkctl status usb0` reported routable/configured. Systemd was still `initializing`; it did not reach multi-user, and `tools/phone-smoke`, watchdog feeder state, direct UFS `ro` readback and the visible screen remain unverified. The phone later returned to the existing ext4 root. The 60-second setting was rejected by the driver, so the package now uses 30 seconds (driver maximum 31); a fresh boot with that packaged setting remains unverified. The diagnostic root used volatile journals and temporary early-SSH wiring; those changes are not in the package. No flash or explicit UFS-write command was issued. Image hash, source commits and evidence limits are in [NOTES.md]. diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index 167c4cf84..2a848eee9 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -5,6 +5,33 @@ Facts only, each read off the phone. Captures remain outside the repository because they contain device identifiers and Wi-Fi keys; this file records only the facts needed for review. +## 2026-11-16 — fresh current-stack NFS root + +The checksum-verified Omarchy 4.5.0-3 root image (SHA-256 +`75f2dc67630c2661705f3b796170621a3582d96093893ed72e6f680ec34581ce`) +was unpacked into a disposable NFS export. The first attempt read an older +export: two mounted ext4 test images had the same filesystem UUID, and NFS +served the older one despite the path naming the new image. The older root's +systemd unit and inode numbers exposed the mismatch. The new image was given +a distinct UUID while the phone was in fastboot, then exported again. + +The second `fastboot boot` used RAM boot image SHA-256 +`b58ab9dff9c960380563e22e3aedc41dcbe0ef58e6ec8386eb41d9251bc5710d`. +SSH on the phone confirmed kernel `7.3.0-rc6-omamobile-push1-gf61e96519032`, +an NFS root with the new image's inode and a test-only mask of the interactive +`systemd-firstboot` service. All six UFS whole-disk flags were `ro=1`. The +image's package database reported `omarchy 4.5.0-3`, +`omamobile-omarchy 0.1.45-1`, `omamobile-device-dipper 0.1.0-1`, and +`mesa 1:26.2.4-1.5`. `omamobile-firstboot` started and generated a private +pacman key, then spent several minutes importing the Arch keyring. The +disposable export was switched from `sync` to `async` during that import. + +The phone later stopped answering ping and SSH while the USB gadget remained +enumerated. The firstboot log had not passed the keyring step. No raw +`tools/phone-smoke`, `networkctl status usb0`, visible desktop, or GPU renderer +was captured from this fresh root. This is a partial current-stack boot, not +the completed owner smoke gate. No flash or explicit UFS write was issued. + ## 2026-11-16 — visible RAM console and NFS retry A locally repacked RAM rescue image used the same kernel and DTB as the earlier From ce5fd3f508849102d300b631d24875da0529709b Mon Sep 17 00:00:00 2001 From: quatrixone Date: Tue, 17 Nov 2026 09:24:37 +0100 Subject: [PATCH 32/44] docs(dipper): record repeated current-stack smoke results Record the current UFS, display, GPU, touch and session results, and the firstboot progress through keyring and identity into services. Assisted-by: Codex --- device/dipper/BRINGUP-M1.md | 18 ++++++++---------- device/dipper/NOTES.md | 20 ++++++++++++++++++++ 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/device/dipper/BRINGUP-M1.md b/device/dipper/BRINGUP-M1.md index 7d2aa55ef..5d1abb663 100644 --- a/device/dipper/BRINGUP-M1.md +++ b/device/dipper/BRINGUP-M1.md @@ -1,16 +1,14 @@ # Xiaomi Mi 8 (dipper): RAM-only first light -**Status (2026-11-16):** the owner saw text on the framebuffer console in a -guarded RAM rescue boot. A later boot reached a fresh Omarchy 4.5.0-3 NFS -root with `omamobile-omarchy 0.1.45`: SSH confirmed its identity and all six -UFS whole disks read-only. `omamobile-firstboot` started, but stalled during -pacman key import; the phone then stopped answering ping and SSH. The full -smoke report and visible desktop remain unverified. Earlier retries fell -back into the pre-existing writable ext4 system on `userdata`; it is not the -new Omarchy root. Exact evidence and limits are in [NOTES.md]. No persistent -image was flashed; this descriptor and the installer have no Dipper install -path. +**Status (2026-11-17):** a fresh Omarchy 4.5.0-3 NFS root runs on the phone +with `omamobile-omarchy 0.1.45`. Two phone smoke runs confirmed the USB link, +display connector and all UFS disks read-only. Both found no render node, no +multitouch input, and no Hyprland or shell session. Firstboot passed pacman +keyring setup and identity, then stalled configuring the user/services on the +NFS root. The owner saw text on the framebuffer in an earlier guarded RAM +rescue boot. Exact evidence and limits are in [NOTES.md]. No persistent image +was flashed; the descriptor and installer still have no Dipper install path. **Status (2026-11-15):** a RAM-only `fastboot boot` reached the Omarchy 4.5.0-3 NFS root with `omamobile-omarchy 0.1.45`. Its journal records the handoff, the UFS guard setting all six whole-disk nodes and all 85 partitions read-only, both packed-DTB `removed-region` nodes, the initramfs guard, and the `qcom_wdt` device; direct UFS `ro` readback was not captured. In a later 20-second-watchdog NFS retry, `/proc/iomem` showed `0x85fc0000–0x8a8fffff` reserved and `networkctl status usb0` reported routable/configured. Systemd was still `initializing`; it did not reach multi-user, and `tools/phone-smoke`, watchdog feeder state, direct UFS `ro` readback and the visible screen remain unverified. The phone later returned to the existing ext4 root. The 60-second setting was rejected by the driver, so the package now uses 30 seconds (driver maximum 31); a fresh boot with that packaged setting remains unverified. The diagnostic root used volatile journals and temporary early-SSH wiring; those changes are not in the package. No flash or explicit UFS-write command was issued. Image hash, source commits and evidence limits are in [NOTES.md]. diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index 2a848eee9..db8bc71d7 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -32,6 +32,26 @@ enumerated. The firstboot log had not passed the keyring step. No raw was captured from this fresh root. This is a partial current-stack boot, not the completed owner smoke gate. No flash or explicit UFS write was issued. +## 2026-11-17 — current-stack NFS phone-smoke + +`tools/phone-smoke` ran on kernel `7.3.0-rc6-omamobile-push1-gf61e96519032` +with tools commit `f9b04b7`. It confirmed all 6 UFS whole disks and 85 +partitions read-only, NFS as `/`, USB gadget bound, and `usb0` routable and +online at `172.16.42.1`. The display connector reported connected at +1080x2248; no failed systemd units were reported. + +The required session check failed: Hyprland and the shell were not running. +GPU had no render node and no multitouch input device was present. Kernel +health had no oops, BUG or WARN, but `dmesg` had three new errors: the +watchdog did not stop, its hardware timeout was rejected, and a generated +unit failed. The boot check skipped because Dipper has no slot suffix; root +skipped as a nonpersistent NFS test root. Battery, sound, sensors, cameras, +Wi-Fi and Bluetooth were also skipped. + +Firstboot was active. After importing the keyring, `gpg-agent` repeatedly +failed while locally signing trusted keys; SSH later stopped answering. The +report does not demonstrate a usable desktop or GPU. No UFS writes were made. + ## 2026-11-16 — visible RAM console and NFS retry A locally repacked RAM rescue image used the same kernel and DTB as the earlier From 958b4675ff4e4b9999e20adbba3c5420d14d6f27 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Wed, 18 Nov 2026 14:55:11 +0100 Subject: [PATCH 33/44] docs(dipper): record NFS firstboot module mismatch Record the services and firewall failure, the mismatch between the booted kernel and the disposable NFS root module tree, and the unverified matching-module retry. Keep the console result explicitly unconfirmed. AI assistance: Codex. Signed-off-by: quatrixone --- device/dipper/BRINGUP-M1.md | 14 ++++++++------ device/dipper/NOTES.md | 24 ++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/device/dipper/BRINGUP-M1.md b/device/dipper/BRINGUP-M1.md index 5d1abb663..5a197a253 100644 --- a/device/dipper/BRINGUP-M1.md +++ b/device/dipper/BRINGUP-M1.md @@ -1,14 +1,16 @@ # Xiaomi Mi 8 (dipper): RAM-only first light -**Status (2026-11-17):** a fresh Omarchy 4.5.0-3 NFS root runs on the phone +**Status (2026-11-18):** a fresh Omarchy 4.5.0-3 NFS root runs on the phone with `omamobile-omarchy 0.1.45`. Two phone smoke runs confirmed the USB link, display connector and all UFS disks read-only. Both found no render node, no -multitouch input, and no Hyprland or shell session. Firstboot passed pacman -keyring setup and identity, then stalled configuring the user/services on the -NFS root. The owner saw text on the framebuffer in an earlier guarded RAM -rescue boot. Exact evidence and limits are in [NOTES.md]. No persistent image -was flashed; the descriptor and installer still have no Dipper install path. +multitouch input, and no Hyprland or shell session. Firstboot with the 0.1.8 +service-enable change reached user setup, but UFW failed because the NFS root +had modules for a different kernel release. Matching modules are now in the +disposable root; a phone reboot and smoke test with them are pending. A rescue +framebuffer was unblanked, but the result was not visually confirmed. Exact +evidence and limits are in [NOTES.md]. No persistent image was flashed; the +descriptor and installer still have no Dipper install path. **Status (2026-11-15):** a RAM-only `fastboot boot` reached the Omarchy 4.5.0-3 NFS root with `omamobile-omarchy 0.1.45`. Its journal records the handoff, the UFS guard setting all six whole-disk nodes and all 85 partitions read-only, both packed-DTB `removed-region` nodes, the initramfs guard, and the `qcom_wdt` device; direct UFS `ro` readback was not captured. In a later 20-second-watchdog NFS retry, `/proc/iomem` showed `0x85fc0000–0x8a8fffff` reserved and `networkctl status usb0` reported routable/configured. Systemd was still `initializing`; it did not reach multi-user, and `tools/phone-smoke`, watchdog feeder state, direct UFS `ro` readback and the visible screen remain unverified. The phone later returned to the existing ext4 root. The 60-second setting was rejected by the driver, so the package now uses 30 seconds (driver maximum 31); a fresh boot with that packaged setting remains unverified. The diagnostic root used volatile journals and temporary early-SSH wiring; those changes are not in the package. No flash or explicit UFS-write command was issued. Image hash, source commits and evidence limits are in [NOTES.md]. diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index db8bc71d7..fc07a7c44 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -5,6 +5,30 @@ Facts only, each read off the phone. Captures remain outside the repository because they contain device identifiers and Wi-Fi keys; this file records only the facts needed for review. +## 2026-11-18 — NFS firstboot and matching modules + +The current NFS boot ran `omamobile-firstboot` past the repeated service-enable +calls after version 0.1.8 changed them to `systemctl enable --no-reload`. The +run reached user setup, but its services/firewall step failed when UFW's +`iptables` could not create an nftables ruleset (`Could not fetch rule set +generation id: Invalid argument`). The journal records networkd and sshd +starting; a fresh phone-side smoke report and a stable SSH session were not +captured. + +The booted kernel release was `7.3.0-rc6-omamobile-push1-gf61e96519032`, while +the disposable root initially contained modules only for +`7.3.0-rc6-omamobile-push1-g7062b50298ff`. I copied the module tree matching the +booted kernel from its RAM image into the disposable root and ran `depmod`; +host-side module resolution now finds `nf_tables`. Whether this fixes UFW, +GPU loading, or the missing desktop on the phone remains unverified until the +next RAM boot. The later firstboot 0.1.9 mask change has not run on the phone. + +In a separate RAM rescue, fb0 reported `blank=4`; writing `0` changed the +reported state and text was sent to tty1. The display was not visually +confirmed after that change. No phone-side smoke was captured after matching +modules were added. These tests used a disposable NFS root; no UFS partition +was flashed or explicitly written. + ## 2026-11-16 — fresh current-stack NFS root The checksum-verified Omarchy 4.5.0-3 root image (SHA-256 From af4395aa8164d6d30b606fde25cdfadda37ea7be Mon Sep 17 00:00:00 2001 From: quatrixone Date: Wed, 18 Nov 2026 17:04:01 +0100 Subject: [PATCH 34/44] docs(dipper): record SDDM session start The NFS journal reached graphical.target and SDDM reported its session started, though neither the renderer nor visible output was verified. Record that evidence alongside the module mismatch and pending retry. AI assistance: Codex. Signed-off-by: quatrixone --- device/dipper/BRINGUP-M1.md | 10 ++++++---- device/dipper/NOTES.md | 7 +++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/device/dipper/BRINGUP-M1.md b/device/dipper/BRINGUP-M1.md index 5a197a253..387cd7f6a 100644 --- a/device/dipper/BRINGUP-M1.md +++ b/device/dipper/BRINGUP-M1.md @@ -7,10 +7,12 @@ display connector and all UFS disks read-only. Both found no render node, no multitouch input, and no Hyprland or shell session. Firstboot with the 0.1.8 service-enable change reached user setup, but UFW failed because the NFS root had modules for a different kernel release. Matching modules are now in the -disposable root; a phone reboot and smoke test with them are pending. A rescue -framebuffer was unblanked, but the result was not visually confirmed. Exact -evidence and limits are in [NOTES.md]. No persistent image was flashed; the -descriptor and installer still have no Dipper install path. +disposable root; a phone reboot and smoke test with them are pending. The NFS +journal later showed the graphical target and SDDM session starting, without +visual confirmation or a captured renderer. A rescue framebuffer was +unblanked, but that result was also not visually confirmed. Exact evidence +and limits are in [NOTES.md]. No persistent image was flashed; the descriptor +and installer still have no Dipper install path. **Status (2026-11-15):** a RAM-only `fastboot boot` reached the Omarchy 4.5.0-3 NFS root with `omamobile-omarchy 0.1.45`. Its journal records the handoff, the UFS guard setting all six whole-disk nodes and all 85 partitions read-only, both packed-DTB `removed-region` nodes, the initramfs guard, and the `qcom_wdt` device; direct UFS `ro` readback was not captured. In a later 20-second-watchdog NFS retry, `/proc/iomem` showed `0x85fc0000–0x8a8fffff` reserved and `networkctl status usb0` reported routable/configured. Systemd was still `initializing`; it did not reach multi-user, and `tools/phone-smoke`, watchdog feeder state, direct UFS `ro` readback and the visible screen remain unverified. The phone later returned to the existing ext4 root. The 60-second setting was rejected by the driver, so the package now uses 30 seconds (driver maximum 31); a fresh boot with that packaged setting remains unverified. The diagnostic root used volatile journals and temporary early-SSH wiring; those changes are not in the package. No flash or explicit UFS-write command was issued. Image hash, source commits and evidence limits are in [NOTES.md]. diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index fc07a7c44..6e85d5a1b 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -20,8 +20,11 @@ the disposable root initially contained modules only for `7.3.0-rc6-omamobile-push1-g7062b50298ff`. I copied the module tree matching the booted kernel from its RAM image into the disposable root and ran `depmod`; host-side module resolution now finds `nf_tables`. Whether this fixes UFW, -GPU loading, or the missing desktop on the phone remains unverified until the -next RAM boot. The later firstboot 0.1.9 mask change has not run on the phone. +GPU loading, or the display on the phone remains unverified until the next RAM +boot. Before that copy, the NFS journal later showed systemd reaching the +graphical target and SDDM reporting its autologin session started; that does +not confirm a visible frame or a working renderer. The later firstboot 0.1.9 +mask change has not run on the phone. In a separate RAM rescue, fb0 reported `blank=4`; writing `0` changed the reported state and text was sent to tty1. The display was not visually From f52f164cc5e48b235473f76138189ea797e1bfdc Mon Sep 17 00:00:00 2001 From: quatrixone Date: Wed, 18 Nov 2026 18:40:23 +0100 Subject: [PATCH 35/44] docs(dipper): record guarded NFS retry limits Record the matching-module RAM boot, read-only UFS guard, display probe failure, and the incomplete firstboot and SSH checks. The test root had UFW disabled, so it does not verify the firewall. AI assistance: Codex. Signed-off-by: quatrixone --- device/dipper/NOTES.md | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index 6e85d5a1b..2e1a12271 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -19,12 +19,26 @@ The booted kernel release was `7.3.0-rc6-omamobile-push1-gf61e96519032`, while the disposable root initially contained modules only for `7.3.0-rc6-omamobile-push1-g7062b50298ff`. I copied the module tree matching the booted kernel from its RAM image into the disposable root and ran `depmod`; -host-side module resolution now finds `nf_tables`. Whether this fixes UFW, -GPU loading, or the display on the phone remains unverified until the next RAM -boot. Before that copy, the NFS journal later showed systemd reaching the -graphical target and SDDM reporting its autologin session started; that does -not confirm a visible frame or a working renderer. The later firstboot 0.1.9 -mask change has not run on the phone. +host-side module resolution finds `nf_tables`. A subsequent RAM boot logged +all six UFS disks and 85 partitions read-only, and the NFS root handed off to +systemd. For this diagnostic boot only, UFW was disabled in the disposable +root because the preceding firstboot attempt could not install its nftables +rules. That means this run does not verify the firewall or resolve the +`iptables-nft` error. + +The kernel logged simpledrm's `fb0`, then `msm-mdss` failed its deferred probe +with `-110` at 143 seconds. This does not establish what was visible on the +panel. Networkd brought `usb0` up and sshd listened, but later SSH sessions +timed out while opening the systemd login session. `omamobile-firstboot 0.1.9` +started keyring setup and had not left that step more than eleven minutes into +the boot; the device clock was in 1970 and DNS/NTP did not recover. No +`tools/phone-smoke` report, phone-side `networkctl status usb0`, visible +desktop, or GPU renderer was captured. The firstboot 0.1.9 mask change has not +completed on the phone. + +Before this retry, the NFS journal had shown systemd reaching the graphical +target and SDDM reporting its autologin session started; that does not confirm +a visible frame or a working renderer. In a separate RAM rescue, fb0 reported `blank=4`; writing `0` changed the reported state and text was sent to tty1. The display was not visually From f726d19f2e9f7cb1861772b2ab84a7d8627baf0d Mon Sep 17 00:00:00 2001 From: quatrixone Date: Thu, 19 Nov 2026 00:29:03 +0100 Subject: [PATCH 36/44] device/dipper: split shared smoke changes from package Move Dipper RAM-only whole-disk checks to #916 so this PR no longer changes the shared Pixel smoke path. AI assistance: Codex. Signed-off-by: quatrixone --- tests/phone-smoke | 29 +++++++---------------------- tools/phone-smoke | 31 +++++++++---------------------- 2 files changed, 16 insertions(+), 44 deletions(-) diff --git a/tests/phone-smoke b/tests/phone-smoke index 1bf8de49e..2621d2caf 100755 --- a/tests/phone-smoke +++ b/tests/phone-smoke @@ -128,15 +128,10 @@ pass "counted and new lines together" # The boot and storage guard rows (--slot-from: a fake root). The boot row # wants the slot boot-update.conf names (b when absent); the guard row -# checks whole disks and allows userdata and the running slot's boot images. +# allows userdata and the running slot's five boot images. fr=$t/fr fakeroot() { # running suffix (or none), then the writable partitions rm -rf "$fr"; mkdir -p "$fr/proc" "$fr/etc/omamobile" - local disk - for disk in a b c d e f; do - mkdir -p "$fr/sys/block/sd$disk" - echo 1 > "$fr/sys/block/sd$disk/ro" - done echo '123.45 100.00' > "$fr/proc/uptime" [[ $1 == none ]] || printf 'androidboot.slot_suffix = "%s"\n' "$1" > "$fr/proc/bootconfig" echo 'console=ttynull' > "$fr/proc/cmdline" @@ -152,14 +147,14 @@ rows() { out=$(tools/phone-smoke --slot-from "$fr"); } B5="boot_b init_boot_b vendor_boot_b vendor_kernel_boot_b dtbo_b userdata" A5="boot_a init_boot_a vendor_boot_a vendor_kernel_boot_a dtbo_a userdata" fakeroot _b $B5; rows -has 'ok|1|boot|kernel ' && has ', slot b, up 123s' && has 'ok|1|storage guard|6 whole disks read-only; 13 partitions; no writes outside the descriptor allowlist' \ +has 'ok|1|boot|kernel ' && has ', slot b, up 123s' && has 'ok|1|storage guard|13 partitions; only userdata and slot b' \ || fail "a development phone on slot B, no boot-update.conf: both rows pass as before" pass "a development phone on slot B, no boot-update.conf: both rows pass as before" echo 'AUTO_WRITE=yes' > "$fr/etc/omamobile/boot-update.conf"; rows has 'ok|1|boot|' && has 'ok|1|storage guard|' || fail "a release on slot B whose boot-update.conf names no slot: b" pass "a release on slot B whose boot-update.conf names no slot: b" fakeroot _a $A5; printf 'AUTO_WRITE=yes\nSLOT=a\n' > "$fr/etc/omamobile/boot-update.conf"; rows -has 'ok|1|boot|' && has ', slot a, up' && has 'ok|1|storage guard|6 whole disks read-only; 13 partitions; no writes outside the descriptor allowlist' \ +has 'ok|1|boot|' && has ', slot a, up' && has 'ok|1|storage guard|13 partitions; only userdata and slot a' \ || fail "a release on slot A with SLOT=a: both rows pass" pass "a release on slot A with SLOT=a: both rows pass" fakeroot _a $A5; rows @@ -172,26 +167,16 @@ fakeroot _a $A5; printf 'SLOT=a\nSLOT=a\n' > "$fr/etc/omamobile/boot-update.conf has 'not ok|1|boot|' && has 'names SLOT 2 times' || fail "a second SLOT= line fails the boot row" pass "a second SLOT= line fails the boot row" fakeroot _a $A5 boot_b; printf 'SLOT=a\n' > "$fr/etc/omamobile/boot-update.conf"; rows -has 'not ok|1|storage guard|writable UFS nodes: disks none; partitions boot_b' || fail "on slot A, slot B's boot image writable fails the guard row" +has 'not ok|1|storage guard|writable outside the allowlist: boot_b' || fail "on slot A, slot B's boot image writable fails the guard row" fakeroot _b $B5 dtbo_a; rows -has 'not ok|1|storage guard|writable UFS nodes: disks none; partitions dtbo_a' || fail "on slot B, slot A's dtbo writable fails the guard row" +has 'not ok|1|storage guard|writable outside the allowlist: dtbo_a' || fail "on slot B, slot A's dtbo writable fails the guard row" pass "the other slot's boot images writable fail the guard row, either way" fakeroot none userdata; rows -has 'skip|1|boot|' && has 'ok|1|storage guard|6 whole disks read-only; 13 partitions' || fail "no slot named: the boot row skips, the guard allows userdata alone" +has 'skip|1|boot|' && has 'ok|1|storage guard|13 partitions; only userdata writable' || fail "no slot named: the boot row skips, the guard allows userdata alone" fakeroot none $B5; rows -has 'not ok|1|storage guard|writable UFS nodes: disks none; partitions ' && has ' boot_b ' || fail "no slot named: a writable boot image fails the guard row" +has 'not ok|1|storage guard|writable outside the allowlist: ' && has ' boot_b ' || fail "no slot named: a writable boot image fails the guard row" pass "no slot named: the boot row skips and only userdata may be writable" -fakeroot _b; mkdir -p "$fr/usr/share/omamobile" -echo 'UFS_RW=""' > "$fr/usr/share/omamobile/device.conf"; rows -has 'ok|1|storage guard|6 whole disks read-only; 13 partitions' || fail "a RAM-only descriptor allows no UFS writes" -echo 0 > "$fr/sys/class/block/sda11/ro"; rows -has 'not ok|1|storage guard|writable UFS nodes: disks none; partitions userdata' || fail "RAM-only refuses writable userdata" -echo 1 > "$fr/sys/class/block/sda11/ro" -echo 0 > "$fr/sys/block/sda/ro"; rows -has 'not ok|1|storage guard|writable UFS nodes: disks sda; partitions none' || fail "a writable whole disk fails" -pass "RAM-only descriptor and whole-disk guard" - # From the laptop: PHONE_SSH stands in for the phone. It answers the # compatible question and records what the smoke run was started with. printf '%s\n' '#!/bin/bash' 'case $1 in' ' tr*) echo "$COMPAT" ;;' \ diff --git a/tools/phone-smoke b/tools/phone-smoke index 11d07a451..151466dbf 100755 --- a/tools/phone-smoke +++ b/tools/phone-smoke @@ -104,36 +104,26 @@ else case $slot in esac; fi # ---------------------------------------------------------------- storage -# On older installs, allow userdata and the running slot's boot images. +# Every UFS partition is read-only except userdata and the running slot's +# boot images (the guard maps its list to the slot the phone runs from; with +# no slot named, only userdata). allowed=" userdata " [[ -z $slot ]] || allowed+="boot$slot init_boot$slot vendor_boot$slot vendor_kernel_boot$slot dtbo$slot " -# The installed descriptor takes precedence; RAM-only devices allow no writes. -descriptor="$sr/usr/share/omamobile/device.conf" -if [[ -r $descriptor ]] && grep -q '^UFS_RW=' "$descriptor"; then - ufs_rw=$(sed -n 's/^UFS_RW="\{0,1\}\([^"]*\)"\{0,1\}$/\1/p' "$descriptor") - allowed=" $ufs_rw " -fi -disk_rw=() part_rw=() disks=0 total=0 -for s in "$sr"/sys/block/sd[a-f]; do - [[ -r $s/ro ]] || continue - disks=$((disks + 1)) - [[ $(<"$s/ro") == 1 ]] || disk_rw+=("${s##*/}") -done +rw=() total=0 for s in "$sr"/sys/class/block/sd*; do [[ -r $s/partition && -r $s/uevent ]] || continue name=$(sed -n 's/^PARTNAME=//p' "$s/uevent") [[ -n $name ]] || continue total=$((total + 1)) - [[ $(<"$s/ro") == 0 && $allowed != *" $name "* ]] && part_rw+=("$name") + [[ $(<"$s/ro") == 0 && $allowed != *" $name "* ]] && rw+=("$name") done if ((total == 0)); then check skip 1 "storage guard" "no named UFS partitions" -elif ((disks == 0)); then - check "not ok" 1 "storage guard" "no named UFS whole-disk nodes" -elif ((${#disk_rw[@]} || ${#part_rw[@]})); then - check "not ok" 1 "storage guard" "writable UFS nodes: disks ${disk_rw[*]:-none}; partitions ${part_rw[*]:-none}" +elif ((${#rw[@]})); then + check "not ok" 1 "storage guard" "writable outside the allowlist: ${rw[*]}" else - check ok 1 "storage guard" "$disks whole disks read-only; $total partitions; no writes outside the descriptor allowlist" + imgs=""; [[ -z $slot ]] || imgs=" and slot ${slot#_}'s boot images" + check ok 1 "storage guard" "$total partitions; only userdata$imgs writable" fi if [[ -n $slot_from ]]; then printf '%s\n' "${results[@]}" @@ -142,11 +132,8 @@ fi rootdev=$(findmnt -no SOURCE / 2>/dev/null) rootpart=$(sed -n 's/^PARTNAME=//p' "/sys/class/block/${rootdev#/dev/}/uevent" 2>/dev/null) -rootfs=$(findmnt -no FSTYPE / 2>/dev/null) if [[ $rootpart == userdata ]]; then check ok 1 "root" "$(findmnt -no FSTYPE /) on userdata, $(df -h --output=avail / | tail -1 | tr -d ' ') free" -elif [[ $rootfs == nfs || $rootfs == nfs4 ]]; then - check skip 0 "root" "$rootfs test root; not persistent" else check "not ok" 1 "root" "root is on ${rootpart:-$rootdev}, not userdata" fi From b33aacbc9d3be1e71f052263e41df10d5fb6885c Mon Sep 17 00:00:00 2001 From: quatrixone Date: Thu, 19 Nov 2026 00:34:16 +0100 Subject: [PATCH 37/44] device-dipper 0.1.1: defer rmtfs until modem plan Align the published firmware paths and local-backup instructions with the Dipper DTS, and record that the renderer test used the old install without a recorded kernel. Keep rmtfs out until its modem path has a gated plan. AI assistance: Codex. Signed-off-by: quatrixone --- docs/DEVICES.md | 2 +- packages/omamobile-device-dipper/PKGBUILD | 2 +- packages/omamobile-device-dipper/README.md | 20 ++++++++++---------- packages/omamobile-device-dipper/test/all | 2 +- packages/omamobile-device-dipper/version | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/DEVICES.md b/docs/DEVICES.md index 0ada5f1cf..cef60cfaf 100644 --- a/docs/DEVICES.md +++ b/docs/DEVICES.md @@ -19,7 +19,6 @@ The status of each device, as verified on real hardware. Rows in the matrix have | Device | Codename | SoC | Boot | Storage | Display | GPU | Touch | Buttons | USB net | Wi-Fi | Bluetooth | Battery | Charging | Haptics | Torch | GNSS | AoC | Speakers/mics | Sensors | Modem | NFC | Cameras | Suspend | Fingerprint | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | -| Xiaomi Mi 8 | dipper | sdm845 (Snapdragon 845) | WIP ([bring-up notes](../device/dipper/BRINGUP-M1.md)) | WIP (guard logs all 85 partitions read-only; direct readback pending) | WIP (EA8074 panel test passed by hand; not enabled in the default image, [notes](../device/dipper/NOTES.md)) | WIP (Adreno 630 renderer tested from a console; Hyprland rendering pending, [#500](https://github.com/derekross/omarchy-mobile/pull/500)) | WIP (FTS5 events captured; Hyprland delivery pending, [notes](../device/dipper/NOTES.md)) | WIP (GPIO buttons registered) | WIP (USB NCM and SSH worked in rescue boots; current Omarchy NFS root not yet usable) | no | WIP (HCI detected; Dipper firmware missing) | no | no | no | no | no | no | no | no | no | no | no | no | | Pixel 7 Pro | cheetah | gs201 (Tensor G2) | works | works | works (120 Hz) | works (DVFS) | works | works | works | works | works (audio) | works | works | works | works | works | works | works | works | works (calls, texts and mobile data on a Verizon-network SIM, 2026-11-03; see below) | works | works (telephoto fixed-focus) | works (auto-sleep on by default, with the modem up since device-cheetah 0.1.60; double tap wakes it; standby measured with the modem off, about 21 h; see below) | works | | Pixel Fold | felix | gs201 (Tensor G2) | WIP ([#3](https://github.com/derekross/omarchy-mobile/issues/3)) | WIP (UFS behind the read-only guard, checked on the phone) | WIP (cover: simplefb console; inner: simpledrm output listed by Hyprland, its splash reserved by [kernel #72](https://github.com/derekross/linux-omarchy-mobile/pull/72); both panels' display triggers set by the descriptor, [#82](https://github.com/derekross/omarchy-mobile/pull/82)) | testing (Panthor; glmark2 on the cover, not up on every image yet; [notes](../device/felix/NOTES.md#2026-10-26-the-power-key-and-the-gpu-in-the-published-kernel)) | WIP (cover: chip id read, no touches yet; the driver's touch reports are merged, [kernel #48](https://github.com/derekross/linux-omarchy-mobile/pull/48), untested on the Fold; [notes](../device/felix/NOTES.md#2026-10-23-cover-touch-id)) | works (volume and power; [notes](../device/felix/NOTES.md#2026-10-26-the-power-key-and-the-gpu-in-the-published-kernel)) | works | no | no | no | no | no | no | no | no | no | no | no | no | no | no | no | | Pixel 6 Pro ([notes](../device/raven/NOTES.md)) | raven | gs101 (Tensor) | works ([#2](https://github.com/derekross/omarchy-mobile/issues/2)) | works | works (120 Hz through gs-decon and the S6E3HC3 driver; unpublished kernel, `omamobile-gs101-display`, in review as [kernel #116](https://github.com/derekross/linux-omarchy-mobile/pull/116), [plan](../device/raven/DISPLAY-PLAN.md)); the published kernel has the boot console only | partial (Panfrost; frequency scaling over 11 levels, 151 to 762 MHz, and GPU cooling through ACPM, merged, [kernel #189](https://github.com/derekross/linux-omarchy-mobile/pull/189), tested on 2026-11-04 on the published kernel plus [kernel #116](https://github.com/derekross/linux-omarchy-mobile/pull/116) and raven's USB override; [plan](../device/raven/GPU-PLAN.md)) | works ([kernel #8](https://github.com/derekross/linux-omarchy-mobile/pull/8)) | works | works (a NOT FOR MERGE DT change; [plan](../device/raven/USB-PLAN.md)) | works (unpublished kernel, `omamobile-gs101-wifi`; [plan](../device/raven/WIFI-PLAN.md)) | partial ([kernel #6](https://github.com/derekross/linux-omarchy-mobile/pull/6); own address; pairing from the menu and A2DP audio work, crackling while Wi-Fi is busy; the chip came up silent after one of seven clean reboots on 2026-11-03, [#77](https://github.com/derekross/omarchy-mobile/issues/77); [plan](../device/raven/BLUETOOTH-PLAN.md)) | works (the gauge; unpublished kernel) | works (the MAX77759 charger at stock's limits with its temperature guard, loaded at boot by device-raven 0.1.26; a full charge to 100 %; the battery node is in the published kernel, [kernel #112](https://github.com/derekross/linux-omarchy-mobile/pull/112), tested on an unpublished kernel; [plan](../device/raven/USB-PLAN.md#4-charging-the-max77759-charger-ravens-b3-after-cheetahs)) | works (CS40L25A through feedbackd, device-raven 0.1.27, with the phone's own firmware from `tools/extract-vendor-firmware -d raven`; the driver and node are merged, [kernel #114](https://github.com/derekross/linux-omarchy-mobile/pull/114); [plan](../device/raven/HAPTICS-TORCH-PLAN.md)) | works (tested on `omamobile-gs101-torch`; the LED's node is now in the published kernel, [kernel #113](https://github.com/derekross/linux-omarchy-mobile/pull/113), not yet run from it; [plan](../device/raven/HAPTICS-TORCH-PLAN.md)) | works (unpublished kernel, `omamobile-gs101-gnss`; [plan](../device/raven/GNSS-PLAN.md)) | works (unpublished kernel, `omamobile-gs101-aoc`; [plan](../device/raven/AUDIO-PLAN.md)) | works (both speakers through raven's protection firmware with the phone's factory calibration, at cheetah's stage media (737/10), which R6 verified on raven; the microphones with them; unpublished kernel, `omamobile-gs101-aoc`; [plan](../device/raven/AUDIO-PLAN.md#r6-ravens-own-speaker-limits-2026-10-27-gb3d6253b0d61-omamobile-audio-044)) | works (accelerometer, light, proximity, compass through the AoC; unpublished kernel) | WIP (calls, texts and data on an unpublished kernel, `omamobile-gs101-cpif`; the package doesn't enable it; [plan](../device/raven/MODEM-PLAN.md)) | no | no | testing (s2idle when asked for, or through the shell's auto-sleep with the `omamobile-sleep` toggle on, which ships off; Power wakes it, 3 of 3 on 2026-11-03 on an unpublished kernel (the published one plus [kernel #116](https://github.com/derekross/linux-omarchy-mobile/pull/116) and raven's USB override); UFS resumes clean with [kernel #188](https://github.com/derekross/linux-omarchy-mobile/pull/188), merged; with the modem up its sleep block holds; [plan](../device/raven/SUSPEND-PLAN.md)) | no | @@ -33,6 +32,7 @@ The status of each device, as verified on real hardware. Rows in the matrix have | Pixel 7 ([notes](../device/panther/NOTES.md)) | panther | gs201 (Tensor G2) | WIP (slot B, not marked successful; Arch and Hyprland boot; `boot` and `init_boot` carry AVB footers, which a phone whose `vbmeta_b` is stock's needs to start slot B (device-panther 0.1.6, [#396](https://github.com/derekross/omarchy-mobile/pull/396), [notes](../device/panther/NOTES.md#2026-11-02-avb-footers-on-boot-and-init_boot)); `reboot-to bootloader` reaches fastboot with `reboot=warm`, merged, [kernel #198](https://github.com/derekross/linux-omarchy-mobile/pull/198); [BRINGUP-M1](../device/panther/BRINGUP-M1.md); board file merged, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108)) | testing (UFS behind the read-only guard; Arch on `userdata`; merged, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108)) | WIP (simple-framebuffer: console and the Hyprland desktop; brightness and display off/on over DCS through the S6E3FC3 panel driver and device-panther 0.1.4, merged, [kernel #177](https://github.com/derekross/linux-omarchy-mobile/pull/177); [DISPLAY-PLAN](../device/panther/DISPLAY-PLAN.md)) | testing (Panthor on the Mali-G710; Hyprland renders on it; merged through [kernel #134](https://github.com/derekross/linux-omarchy-mobile/pull/134), with the always-on rule in device-panther 0.1.1, [#145](https://github.com/derekross/omarchy-mobile/pull/145); [notes](../device/panther/NOTES.md#2026-10-28-the-gpu-and-the-haptics-power-off-and-usb-after-a-replug)) | WIP (FocalTech FT3658: touches drive Hyprland and unlock the PIN screen on a test kernel; the driver, [kernel #109](https://github.com/derekross/linux-omarchy-mobile/pull/109), and the touch node, [kernel #134](https://github.com/derekross/linux-omarchy-mobile/pull/134), are merged; stock's interrupt pull-up and CS delay, [kernel #166](https://github.com/derekross/linux-omarchy-mobile/pull/166), the driver's review fixes, [kernel #133](https://github.com/derekross/linux-omarchy-mobile/pull/133), and the kernel option with the touch notes, [#149](https://github.com/derekross/omarchy-mobile/pull/149), are merged) | testing (gpio-keys: power, volume; merged, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108)) | testing (USB and SSH; merged, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108); a replug comes back through `omamobile-usb-rescue` in device-panther 0.1.3, on the MAX77759's I2C bus, merged, [kernel #167](https://github.com/derekross/linux-omarchy-mobile/pull/167); [notes](../device/panther/NOTES.md#2026-10-29-usb-comes-back-after-a-replug-u1)) | no | testing (BCM4389 on the APM UART through hci_bcm with the phone's own patch, merged, [kernel #196](https://github.com/derekross/linux-omarchy-mobile/pull/196): a BLE mouse drives the shell, and headphones play over A2DP with their AVRCP buttons, on its author's Pixel 7; the Bluetooth address and the rest of the package side aren't merged yet; headset calls, suspend and power not tested) | WIP (MAX77759 fuel gauge with stock's battery model on a test kernel: percentage, capacity and temperature in upower and the bar; merged, [kernel #171](https://github.com/derekross/linux-omarchy-mobile/pull/171) and the driver fix [#170](https://github.com/derekross/linux-omarchy-mobile/pull/170); a second unit's Lishen pack isn't matched by that model yet, [notes](../device/panther/NOTES.md#2026-11-03-a-second-unit-angelrenefm); [BATTERY-PLAN](../device/panther/BATTERY-PLAN.md)) | no | testing (CS40L26 with the phone's own firmware, `tools/extract-vendor-firmware -d panther`; merged through [kernel #134](https://github.com/derekross/linux-omarchy-mobile/pull/134), with the feedbackd rule in device-panther 0.1.1, [#145](https://github.com/derekross/omarchy-mobile/pull/145); [notes](../device/panther/NOTES.md#2026-10-28-the-gpu-and-the-haptics-power-off-and-usb-after-a-replug)) | testing (LM3644 rear flash, 36 steps, from the node merged in [kernel #197](https://github.com/derekross/linux-omarchy-mobile/pull/197) and the bring-up overlay `torch.dtso`, [#426](https://github.com/derekross/omarchy-mobile/pull/426): lit on a second Pixel 7; the quick-settings tile not checked) | no | no | no | no | no | no | no (the package's camera start and DMA heap rule are merged, device-panther 0.1.9, [#443](https://github.com/derekross/omarchy-mobile/pull/443), inert until the camera device tree is proposed) | no (s2idle by default since [kernel #134](https://github.com/derekross/linux-omarchy-mobile/pull/134) and device-panther 0.1.1; not run yet) | WIP (the sensor's node, disabled, is merged, [kernel #207](https://github.com/derekross/linux-omarchy-mobile/pull/207); with a bring-up overlay and the package side, which is in review ([#458](https://github.com/derekross/omarchy-mobile/pull/458)), a finger enrolled and unlocked its author's Pixel 7, also after a reboot) | | OnePlus 13 ([notes](../device/dodge/NOTES.md)) | dodge | sm8750 (Snapdragon 8 Elite) | testing (kernel [mrlund/linux-omarchy-mobile `dodge-v3-20261101`](https://github.com/mrlund/linux-omarchy-mobile/tree/dodge-v3-20261101); [kernel #115](https://github.com/derekross/linux-omarchy-mobile/pull/115) closed; [BRINGUP](../device/dodge/BRINGUP-M1.md), [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing ([notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (msm/dpu; warm-boot drop fixed; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (Adreno 830 / gpu2; Vulkan untested; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing ([notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing ([notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (CDC NCM + SSH; gadget stuck after replug until reboot; kernel [mrlund/linux-omarchy-mobile `dodge-v3-20261101`](https://github.com/mrlund/linux-omarchy-mobile/tree/dodge-v3-20261101); [kernel #115](https://github.com/derekross/linux-omarchy-mobile/pull/115) closed; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (WCN7860 / ath12k; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (pairing; A2DP untested; kernel [mrlund/linux-omarchy-mobile `dodge-v3-20261101`](https://github.com/mrlund/linux-omarchy-mobile/tree/dodge-v3-20261101); [kernel #115](https://github.com/derekross/linux-omarchy-mobile/pull/115) closed; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (gauge; charging path not claimed; kernel [mrlund/linux-omarchy-mobile `dodge-v3-20261101`](https://github.com/mrlund/linux-omarchy-mobile/tree/dodge-v3-20261101); [kernel #115](https://github.com/derekross/linux-omarchy-mobile/pull/115) closed; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | no | no | no | no | - | testing (speakers, earpiece, mics; headset plug untested; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (accel, prox, compass; autorotate; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (LTE data; calls/SMS untested; opt-in flag; [modem](../device/dodge/modem/README.md), [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | no | no | WIP (s2idle not default; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | no | | OnePlus 6 ([notes](../device/enchilada/NOTES.md)) | enchilada | SDM845 (Snapdragon 845) | WIP (RAM-only `fastboot boot` of a header-v0 image; kernel: Linux 7.1-rc1 from the sdm845-mainline tree, not linux-omarchy-mobile; the firewall failure booted from `boot_b` after `--set-active=b`, the firewall fix and GPU results were `fastboot boot`s, all three with the Arch root on `userdata`; stock is not on slot A, a §3.1 event: [notes](../device/enchilada/NOTES.md#slots-and-what-is-on-them-contributingmd-31); [#432](https://github.com/derekross/omarchy-mobile/issues/432)) | WIP (UFS behind the read-only guard; `boot_b` is on LUN `sde` and stays read-only; [notes](../device/enchilada/NOTES.md#2026-11-04-ram-only-first-light)) | WIP (msm DRM framebuffer console; [notes](../device/enchilada/NOTES.md#2026-11-04-ram-only-first-light)) | no (needs the phone's own zap shader; [notes](../device/enchilada/NOTES.md#2026-11-05-adreno-630-needs-this-phones-zap-shader)) | no | no | testing (NCM + ACM + SSH; [notes](../device/enchilada/NOTES.md#2026-11-04-ram-only-first-light)) | no (modem/rmtfs plan first) | no | no | no | no | no | no | - | no | no | no | no | no | no | no | +| Xiaomi Mi 8 | dipper | sdm845 (Snapdragon 845) | WIP ([bring-up notes](../device/dipper/BRINGUP-M1.md)) | WIP (guard logs all 85 partitions read-only; direct readback pending) | WIP (EA8074 panel test passed by hand; not enabled in the default image, [notes](../device/dipper/NOTES.md)) | WIP (Adreno 630 renderer tested in the old userdata install; kernel release not recorded; Hyprland rendering pending, [#500](https://github.com/derekross/omarchy-mobile/pull/500)) | WIP (FTS5 events captured; Hyprland delivery pending, [notes](../device/dipper/NOTES.md)) | WIP (GPIO buttons registered) | WIP (USB NCM and SSH worked in rescue boots; current Omarchy NFS root not yet usable) | no | WIP (HCI detected; Dipper firmware missing) | no | no | no | no | no | no | no | no | no | no | no | no | | *Template* | *codename* | *SoC* | | | | | | | | | | | | | | | | | | | | | | | ## cheetah (Pixel 7 Pro) in detail diff --git a/packages/omamobile-device-dipper/PKGBUILD b/packages/omamobile-device-dipper/PKGBUILD index d9a6d2241..be63a1784 100644 --- a/packages/omamobile-device-dipper/PKGBUILD +++ b/packages/omamobile-device-dipper/PKGBUILD @@ -6,7 +6,7 @@ pkgdesc="Omarchy Mobile support for the Xiaomi Mi 8 (dipper)" arch=(aarch64) url="https://github.com/derekross/omarchy-mobile" license=(MIT) -depends=(bash systemd omamobile-keyring linux-firmware-qcom mesa qrtr pd-mapper tqftpserv rmtfs) +depends=(bash systemd omamobile-keyring linux-firmware-qcom mesa qrtr pd-mapper tqftpserv) provides=(omamobile-device) conflicts=(omamobile-device) backup=(etc/pacman.d/omamobile-mirrorlist) diff --git a/packages/omamobile-device-dipper/README.md b/packages/omamobile-device-dipper/README.md index f9a94b716..118939013 100644 --- a/packages/omamobile-device-dipper/README.md +++ b/packages/omamobile-device-dipper/README.md @@ -14,19 +14,19 @@ are not enabled here. The Dipper DTS requests `a630_zap.mbn`, `ipa_fws.mbn`, `adsp.mbn`, `cdsp.mbn`, `mba.mbn`, `modem.mbn` and `venus.mbn` under -`qcom/sdm845/dipper/`. The WCN3990 Bluetooth driver also needs -`qca/crnv21.bin` and `qca/crbtfw21.tlv`. Obtain these files from the -owner's own phone or firmware image; none is included here. Run -`tools/extract-vendor-firmware -d dipper /path/to/partition-roots` on a -directory containing the `vendor/`, -`modem/` and `bluetooth/` partition roots. It preserves the modem `.bNN` -segments required by the Qualcomm loader. `linux-firmware-qcom` supplies +`qcom/sdm845/Xiaomi/dipper/`. The WCN3990 Bluetooth driver also needs +`Xiaomi/dipper/crnv21.bin` and `Xiaomi/dipper/crbtfw21.tlv`. Obtain these +files from the owner's own phone or firmware image; none is included here. +Run `tools/extract-vendor-firmware -d dipper /path/to/local-backup` on a +local directory containing copied `vendor/`, `modem/` and `bluetooth/` +partition contents. It preserves the modem `.bNN` segments required by the +Qualcomm loader. `linux-firmware-qcom` supplies generic Qualcomm firmware such as `a630_sqe.fw`; it does not supply these Dipper-specific files. The `[omamobile]` repository mirrorlist is installed for future package updates. -QRTR, `pd-mapper`, `tqftpserv` and -`rmtfs` are dependencies, but their services are not enabled here; no service -in this package writes the modem's partitions. +QRTR, `pd-mapper` and `tqftpserv` are dependencies, but their services are +not enabled here. `rmtfs` is not installed until its modem storage role has +a gated device plan. The package installs the same device descriptor used by the build tools. diff --git a/packages/omamobile-device-dipper/test/all b/packages/omamobile-device-dipper/test/all index 06a6da5ff..d7047bfc1 100755 --- a/packages/omamobile-device-dipper/test/all +++ b/packages/omamobile-device-dipper/test/all @@ -11,7 +11,7 @@ bash -n build install omamobile-device-dipper.install || fail "package scripts p (cd "$tmp" && "$package_dir/install" "$tmp/root" "$tmp/build") [[ -x "$tmp/root/usr/bin/reboot-to" ]] || fail "reboot-to is staged" [[ -f "$tmp/root/usr/share/omamobile/device-dipper/version" ]] || fail "device version is staged" -grep -q 'depends=(bash systemd omamobile-keyring linux-firmware-qcom mesa qrtr pd-mapper tqftpserv rmtfs)' PKGBUILD || fail "runtime dependencies are declared" +grep -q 'depends=(bash systemd omamobile-keyring linux-firmware-qcom mesa qrtr pd-mapper tqftpserv)' PKGBUILD || fail "runtime dependencies are declared" grep -q '^install=omamobile-device-dipper.install$' PKGBUILD || fail "repository hook is declared" grep -q '^backup=(etc/pacman.d/omamobile-mirrorlist)$' PKGBUILD || fail "mirrorlist is preserved across upgrades" for path in \ diff --git a/packages/omamobile-device-dipper/version b/packages/omamobile-device-dipper/version index 6e8bf73aa..17e51c385 100644 --- a/packages/omamobile-device-dipper/version +++ b/packages/omamobile-device-dipper/version @@ -1 +1 @@ -0.1.0 +0.1.1 From 0a7872ba72d37f093bf38b1cfbf53a0066a76178 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Thu, 19 Nov 2026 00:37:39 +0100 Subject: [PATCH 38/44] device/dipper: split shared helpers from package Move the shared smoke, firmware and ram-only handling work into separate reviewable changes. AI assistance: Codex. Signed-off-by: quatrixone --- bin/omamobile | 20 ++---- tests/boot-method | 64 +------------------- tests/extract-vendor-firmware | 45 -------------- tools/extract-vendor-firmware | 111 +++++++++------------------------- 4 files changed, 34 insertions(+), 206 deletions(-) diff --git a/bin/omamobile b/bin/omamobile index 5ab97809e..fb234d0e9 100755 --- a/bin/omamobile +++ b/bin/omamobile @@ -87,8 +87,8 @@ Usage: [DEVICE=] omamobile and jump into them (no reboot or fastboot). Device tree changes still need: omamobile images, then flash the image holding the DTB (vendor_kernel_boot, or vendor_boot without it) - fastboot Get the phone into fastboot without buttons (adb or reboot-to; - fallback behavior follows the device's boot method) + fastboot Get the phone into fastboot without buttons (adb, reboot-to, + or crash until ABL falls back to stock Android on slot A) flash Flash the experiment images to slot B and boot them (--from-slot-a: a development phone that fell back to stock on slot A) push Write the images into slot B from the running phone over SSH, @@ -126,15 +126,10 @@ load_device() { fi done < "$file" case $DEV_BOOT_METHOD in - android-v4|android-v0|qcom-abl|ram-only) ;; - *) die "$file: unsupported BOOT_METHOD=$DEV_BOOT_METHOD; this command supports android-v4, android-v0, qcom-abl and ram-only" ;; + android-v4|android-v0|qcom-abl) ;; + *) die "$file: unsupported BOOT_METHOD=$DEV_BOOT_METHOD; this command supports android-v4, android-v0 and qcom-abl" ;; esac [[ $DEV_CODENAME == "$DEVICE" ]] || die "$file: CODENAME=$DEV_CODENAME, expected $DEVICE" - if [[ $DEV_BOOT_METHOD == ram-only ]]; then - [[ ${DEV_BOOT_IMAGES+x} && -z $DEV_BOOT_IMAGES && ${DEV_UFS_RW+x} && -z $DEV_UFS_RW ]] \ - || die "$file: ram-only requires empty BOOT_IMAGES and UFS_RW" - return 0 - fi # Safety: the guard's allowlist may name slot B's boot images and userdata # only, must hold userdata, and every boot image we write must be on it. # initramfs packs this list into the image, and the init checks it again. @@ -623,7 +618,6 @@ initramfs_config() { cmd_initramfs_config() { [[ -n ${1:-} ]] || die "usage: omamobile initramfs-config " load_device - [[ $DEV_BOOT_METHOD != ram-only ]] || die "initramfs-config refuses BOOT_METHOD=ram-only" initramfs_config "$1" ls -l "$1" } @@ -674,7 +668,6 @@ cmd_initramfs() { old_umask=$(umask) umask 022 load_device - [[ $DEV_BOOT_METHOD != ram-only ]] || die "initramfs refuses BOOT_METHOD=ram-only" # A leading slash is repo-root relative, so devices share initramfs/init. # Anything else is relative to device//. local init @@ -891,7 +884,6 @@ cmd_images() { # Pixels: the pinned mkbootimg or the checkout's (MKBOOTIMG_DIR). # Tree-local mkbootimg is for qcom-abl. local tools="$MKBOOTIMG_DIR" - [[ $DEV_BOOT_METHOD != ram-only ]] || die "images refuses BOOT_METHOD=ram-only" if [[ $DEV_BOOT_METHOD == qcom-abl ]]; then tools="$ROOT/system/tools/mkbootimg" [[ -f $tools/mkbootimg.py ]] || tools="$SRC_DIR/system/tools/mkbootimg" @@ -1231,8 +1223,6 @@ cmd_fastboot() { "$ssh" '(sleep 1; PATH=/usr/local/bin:$PATH reboot-to bootloader) >/dev/null 2>&1 &' || true sleep 25 if ! in_fastboot && "$ssh" true 2>/dev/null; then - [[ $DEV_BOOT_METHOD != ram-only ]] \ - || die "reboot-to bootloader did not reach fastboot; use the buttons (see device/$DEVICE/BRINGUP-M1.md)" say "Bootloader ignored the reason; crashing so it falls back to slot A" "$ssh" '(sleep 1; echo c > /proc/sysrq-trigger) >/dev/null 2>&1 &' || true fi @@ -1257,7 +1247,6 @@ cmd_flash() { esac (($# <= 1)) || die "usage: omamobile flash [--from-slot-a]" load_device - [[ $DEV_BOOT_METHOD != ram-only ]] || die "flash refuses BOOT_METHOD=ram-only (no persistent install path)" # Qualcomm ABL keeps slot flags in the GPT. A fastboot set_active can clear # successful and refill retries; the bit-54 mark has no §3.1 entry yet. # Refuse here; day-2 updates use push once that path is viable, and the @@ -1322,7 +1311,6 @@ WARN cmd_push() { local img="$KERNEL_OUT/images" ssh="$ROOT/tools/phone-ssh" p dev want got rel load_device - [[ $DEV_BOOT_METHOD != ram-only ]] || die "push refuses BOOT_METHOD=ram-only (no persistent install path)" # Same class of refusal as flash: boot_b is on sde here, and there is no # in-tree day-2 rewrite path for qcom-abl yet. Refuse before any phone I/O # (modules-push would otherwise rewrite the running root's modules). diff --git a/tests/boot-method b/tests/boot-method index 635598e32..9fe41f20d 100755 --- a/tests/boot-method +++ b/tests/boot-method @@ -1,7 +1,6 @@ #!/bin/bash # SPDX-License-Identifier: MIT -# Unsupported boot methods must fail before touching a phone; ram-only permits -# only the recovery path to fastboot. +# Unsupported boot methods must fail before touching a phone or preparing images. set -euo pipefail cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." t=$(mktemp -d); trap 'rm -rf "$t"' EXIT @@ -12,7 +11,7 @@ cp tools/install-phone "$t/bundle/install" # shellcheck disable=SC2016 # fixture evaluated by the child, not this test printf 'DEVICE=${DEVICE:-probe}\nSRC_DIR=/no-sources-needed\n' > "$t/repo/omamobile.conf" # Any phone or container command is a failure, including read-only queries. -for cmd in fastboot adb ssh docker; do +for cmd in fastboot ssh docker; do # shellcheck disable=SC2016 # fake command reads the exported fixture path printf '#!/bin/sh\necho called >> "$CALLS"\nexit 97\n' > "$t/bin/$cmd" chmod +x "$t/bin/$cmd" @@ -25,12 +24,7 @@ for method in ram-only uboot-ext4 unknown ''; do cp "$t/repo/device/probe/device.conf" "$t/bundle/device.conf" for cmd in images flash push; do if DEVICE=probe "$t/repo/bin/omamobile" "$cmd" > "$t/log" 2>&1; then fail "$cmd accepts $method"; fi - if [[ $method == ram-only ]]; then - grep -q "$cmd refuses BOOT_METHOD=ram-only" "$t/log" \ - || fail "$cmd fails for the wrong reason" - else - grep -q "unsupported BOOT_METHOD=$method;" "$t/log" || fail "$cmd fails for the wrong reason" - fi + grep -q "unsupported BOOT_METHOD=$method;" "$t/log" || fail "$cmd fails for the wrong reason" done for installer in "$t/repo/tools/install-phone" "$t/bundle/install"; do for dry in '' --dry-run; do @@ -41,58 +35,6 @@ for method in ram-only uboot-ext4 unknown ''; do [[ ! -e $t/calls && ! -e $t/work ]] || fail "unsupported method accessed phone or prepared image" echo "ok - BOOT_METHOD='${method}' refused by images/flash/push and both installer modes before phone access" done - -# Restore the ram-only fixture after the unsupported-method cases. -printf 'CODENAME=probe\nBOOT_METHOD=ram-only\nBOOT_IMAGES=""\nUFS_RW=""\n' > "$t/repo/device/probe/device.conf" -for cmd in initramfs initramfs-config; do - args=() - [[ $cmd != initramfs-config ]] || args+=("$t/config") - if DEVICE=probe "$t/repo/bin/omamobile" "$cmd" "${args[@]}" > "$t/log" 2>&1; then - fail "$cmd accepts ram-only" - fi - grep -q "$cmd refuses BOOT_METHOD=ram-only" "$t/log" || fail "$cmd fails for the wrong reason" -done -[[ ! -e $t/calls ]] || fail "ram-only initramfs command accessed a phone" -echo 'ok - ram-only initramfs builds and config are refused' - -# A ram-only phone may return to fastboot through reboot-to, but never the -# generic sysrq fallback used by devices with a characterized slot-A recovery. -mkdir -p "$t/repo/device/dipper" -cp device/dipper/device.conf "$t/repo/device/dipper/" -cat > "$t/repo/tools/phone-ssh" <<'EOF' -#!/bin/bash -if [[ ${1:-} == true ]]; then exit 0; fi -printf '%s\n' "$1" >> "$PHONE_COMMANDS" -if [[ ${1:-} == *'reboot-to bootloader'* && -z ${REBOOT_IGNORED:-} ]]; then : > "$FASTBOOT_READY"; fi -[[ ${1:-} == *'/proc/sysrq-trigger'* ]] && : > "$SYSRQ_USED" -EOF -chmod +x "$t/repo/tools/phone-ssh" -cat > "$t/bin/fastboot" <<'EOF' -#!/bin/bash -if [[ ${1:-} == devices && -e $FASTBOOT_READY ]]; then printf 'DIPPER\tfastboot\n'; fi -EOF -printf '#!/bin/sh\nexit 1\n' > "$t/bin/adb" -printf '#!/bin/sh\nexit 0\n' > "$t/bin/sleep" -chmod +x "$t/bin/fastboot" "$t/bin/adb" "$t/bin/sleep" -export FASTBOOT_READY="$t/fastboot-ready" -export PHONE_COMMANDS="$t/phone-commands" SYSRQ_USED="$t/sysrq-used" -if ! DEVICE=dipper "$t/repo/bin/omamobile" fastboot > "$t/log" 2>&1; then - fail "ram-only fastboot did not use reboot-to: $(cat "$t/log")" -fi -grep -q 'In fastboot' "$t/log" || fail "ram-only fastboot missed the fastboot state" -[[ -e $FASTBOOT_READY ]] || fail "ram-only fastboot did not request reboot-to" -echo 'ok - BOOT_METHOD=ram-only returns to fastboot through reboot-to' -rm -f "$FASTBOOT_READY" -if REBOOT_IGNORED=1 DEVICE=dipper "$t/repo/bin/omamobile" fastboot > "$t/log" 2>&1; then - fail "ram-only fastboot accepted a reboot-to that was ignored" -fi -grep -q 'reboot-to bootloader did not reach fastboot' "$t/log" || fail "ignored reboot-to failed for the wrong reason" -[[ ! -e $SYSRQ_USED ]] || fail "ram-only fastboot used the unverified sysrq fallback" -echo 'ok - ram-only fastboot stops safely when reboot-to is ignored' -rm -f "$t/bin/sleep" "$t/repo/tools/phone-ssh" -printf '#!/bin/sh\necho called >> "$CALLS"\nexit 97\n' > "$t/bin/adb" -chmod +x "$t/bin/adb" - # The shipped flame descriptor must remain outside all persistent paths too. mkdir -p "$t/repo/device/flame" cp device/flame/device.conf "$t/repo/device/flame/" diff --git a/tests/extract-vendor-firmware b/tests/extract-vendor-firmware index 8db9f167b..ffb79e7cf 100755 --- a/tests/extract-vendor-firmware +++ b/tests/extract-vendor-firmware @@ -137,22 +137,6 @@ make_vendor "$t/v2" cheetah gen2 make_vendor "$t/husky" husky gen3 make_vendor "$t/panther" panther gen4 -# Dipper reads a directory of the owner's partition roots and keeps the split -# modem firmware beside each renamed MDT header. -mkdir -p "$t/dipper-source/vendor/firmware" \ - "$t/dipper-source/modem/image" "$t/dipper-source/bluetooth/image" -for f in a630_zap ipa_fws; do - echo "$f metadata" > "$t/dipper-source/vendor/firmware/$f.mdt" - echo "$f segment" > "$t/dipper-source/vendor/firmware/$f.b00" -done -for f in adsp cdsp modem venus; do - echo "$f metadata" > "$t/dipper-source/modem/image/$f.mdt" - echo "$f segment" > "$t/dipper-source/modem/image/$f.b00" -done -echo mba > "$t/dipper-source/modem/image/mba.mbn" -echo crnv > "$t/dipper-source/bluetooth/image/crnv21.bin" -echo crbtfw > "$t/dipper-source/bluetooth/image/crbtfw21.tlv" - FW=usr/lib/firmware/updates REG=usr/share/omamobile/sensors/registry CHEETAH_FILES="aoc.bin @@ -170,21 +154,6 @@ cs40l26-dvl.bin cs40l26-svc.bin cs40l26.bin cs40l26.wmfw" -DIPPER_FILES="qca/crbtfw21.tlv -qca/crnv21.bin -qcom/sdm845/dipper/a630_zap.b00 -qcom/sdm845/dipper/a630_zap.mbn -qcom/sdm845/dipper/adsp.b00 -qcom/sdm845/dipper/adsp.mbn -qcom/sdm845/dipper/cdsp.b00 -qcom/sdm845/dipper/cdsp.mbn -qcom/sdm845/dipper/ipa_fws.b00 -qcom/sdm845/dipper/ipa_fws.mbn -qcom/sdm845/dipper/mba.mbn -qcom/sdm845/dipper/modem.b00 -qcom/sdm845/dipper/modem.mbn -qcom/sdm845/dipper/venus.b00 -qcom/sdm845/dipper/venus.mbn" # run VENDOR IMG ARGS...: the tool with the stand-ins first on PATH run() { @@ -237,20 +206,6 @@ else cat "$t/log"; fail "fresh: a first run succeeds" fi -o=$t/dipper -if run "$t/dipper-source" "$t/dipper-source" -d dipper -o "$o"; then - [[ $(listed "$o") == "$DIPPER_FILES" ]] || fail "dipper: checksum list names DTS firmware and modem segments" - [[ $(cat "$o/$FW/qcom/sdm845/dipper/a630_zap.mbn") == "a630_zap metadata" && - $(cat "$o/$FW/qcom/sdm845/dipper/a630_zap.b00") == "a630_zap segment" && - $(cat "$o/$FW/qcom/sdm845/dipper/adsp.mbn") == "adsp metadata" && - $(cat "$o/$FW/qcom/sdm845/dipper/adsp.b00") == "adsp segment" ]] || - fail "dipper: vendor and modem MDT metadata keep their split segments" - (cd "$o/$FW" && sha256sum --quiet -c "$o/vendor-firmware.sha256") || fail "dipper: output checksums match" - pass_since "$n" "dipper: partition roots map firmware and split modem segments" -else - cat "$t/log"; fail "dipper: partition-root extraction succeeds" -fi - # --- A reused output directory ------------------------------------------------- o=$t/reuse n=$failed seed "$o" diff --git a/tools/extract-vendor-firmware b/tools/extract-vendor-firmware index a789fa29a..425f2e66d 100755 --- a/tools/extract-vendor-firmware +++ b/tools/extract-vendor-firmware @@ -1,12 +1,15 @@ #!/bin/bash # SPDX-License-Identifier: MIT -# extract-vendor-firmware: stage device-specific firmware from the owner's -# own image. Pixel factory images support cheetah, panther, raven, tegu and -# husky; dipper takes vendor, modem and Bluetooth partition roots (-d). +# extract-vendor-firmware: copy the Wi-Fi, Bluetooth, haptics and speaker +# amplifier firmware the Pixel 7 Pro (cheetah) needs out of a Google factory +# image, on the user's own machine. The Pixel 7 (panther), the Pixel 6 Pro +# (raven), the Pixel 9a (tegu) and the Pixel 8 Pro (husky: Wi-Fi, Bluetooth +# and haptics) are options (-d). # -# Proprietary firmware is not ours to redistribute, so Omarchy Mobile never -# ships it. This stages files from the user's own image and renames them to -# what the mainline drivers request: +# Google's firmware is not ours to redistribute, so Omarchy Mobile never ships it. +# Like LineageOS's extract-files, this pulls it from an image the user already +# has (the factory zip from developers.google.com/android/images, or the +# image-*.zip inside it) and renames it to what the mainline drivers request: # # vendor/firmware/fw_bcmdhd.bin -> brcm/brcmfmac4389c1-pcie..bin (brcmfmac) # vendor/firmware/bcmdhd.cal -> brcm/brcmfmac4389c1-pcie..txt (NVRAM) @@ -45,20 +48,6 @@ # its version word, the one the MFC reports in FW_VERSION once it runs # (0x44250901 in the image this was tested with). # -# Xiaomi Mi 8 (dipper) takes files from its own vendor, modem and Bluetooth -# partitions. Pass a directory containing those partition roots as vendor/, -# modem/ and bluetooth/ (for example, the read-only mounts of the phone's own -# partitions). The split Qualcomm ELF files keep their .bNN sidecars because -# qcom_mdt_load requests them beside the .mbn metadata file: -# -# vendor/firmware/{a630_zap,ipa_fws}.mdt -> qcom/sdm845/dipper/*.mbn -# vendor/firmware/{a630_zap,ipa_fws}.bNN -> beside the matching .mbn -# modem/image/{adsp,cdsp,modem,venus}.mdt -> qcom/sdm845/dipper/*.mbn -# modem/image/{adsp,cdsp,modem,venus}.bNN -> beside the matching .mbn -# modem/image/mba.mbn -> qcom/sdm845/dipper/mba.mbn -# bluetooth/image/crnv21.bin -> qca/crnv21.bin -# bluetooth/image/crbtfw21.tlv -> qca/crbtfw21.tlv -# # The Pixel 9a (-d tegu; is "google,zumapro-tegu"): # # vendor/firmware/fw_bcmdhd.bin -> brcm/brcmfmac4383-pcie..bin (brcmfmac) @@ -169,12 +158,11 @@ usage() { Usage: extract-vendor-firmware [-o OUTDIR] [-w WORKDIR] [-f] SOURCE SOURCE Google factory zip (-*-factory-*.zip), the image--*.zip - inside it, or a raw/sparse vendor.img. For dipper, a directory - with vendor/, modem/ and bluetooth/ partition roots from your own phone/image. + inside it, or a raw/sparse vendor.img -o DIR staging root to write into (default: ./out/vendor-firmware); a successful run replaces this script's earlier outputs there -w DIR scratch directory for the ~1 GB vendor.img (default: a temp dir in \$TMPDIR) - -d DEV cheetah (default), panther, raven, tegu, husky or dipper + -d DEV cheetah (default), panther, raven, tegu or husky -s SKU husky: the hardware SKU (androidboot.hardware.sku), which picks the NVRAM -f skip the device checks (android-info.txt board=$DEVICE, the vendor build.prop) -c FILE also copy the camera HAL APEX (/vendor/apex/com.google.pixel.camera.hal.apex) @@ -293,38 +281,13 @@ case $DEVICE_OPT in "firmware/cs40l26-dvl.bin|cs40l26-dvl.bin" "firmware/cs40l26-calib.wmfw|cs40l26-calib.wmfw" ) ;; - dipper) - DEVICE=dipper - MAP=( - "vendor/firmware/a630_zap.mdt|qcom/sdm845/dipper/a630_zap.mbn" - "vendor/firmware/ipa_fws.mdt|qcom/sdm845/dipper/ipa_fws.mbn" - "modem/image/adsp.mdt|qcom/sdm845/dipper/adsp.mbn" - "modem/image/cdsp.mdt|qcom/sdm845/dipper/cdsp.mbn" - "modem/image/mba.mbn|qcom/sdm845/dipper/mba.mbn" - "modem/image/modem.mdt|qcom/sdm845/dipper/modem.mbn" - "modem/image/venus.mdt|qcom/sdm845/dipper/venus.mbn" - "bluetooth/image/crnv21.bin|qca/crnv21.bin" - "bluetooth/image/crbtfw21.tlv|qca/crbtfw21.tlv" - ) ;; - *) die "unknown device $DEVICE_OPT (cheetah, panther, raven, tegu, husky or dipper)" ;; + *) die "unknown device $DEVICE_OPT (cheetah, panther, raven, tegu or husky)" ;; esac [[ $DEVICE == husky || -z $SKU ]] || die "-s is for husky only" # The camera data flow (tools/extract-camera-data) exists for cheetah only [[ $DEVICE == cheetah || -z $CAMERA_APEX ]] || die "-c is cheetah's (no camera support for $DEVICE yet)" SRC=$(readlink -f "$1") -if [[ $DEVICE == dipper ]]; then - [[ -d $SRC ]] || die "dipper SOURCE must be a directory containing vendor/, modem/ and bluetooth/ partition roots" - for name in adsp cdsp modem venus a630_zap ipa_fws; do - srcdir=modem/image - [[ $name != a630_zap && $name != ipa_fws ]] || srcdir=vendor/firmware - for src in "$SRC"/"$srcdir"/"$name".b*; do - [[ -f $src ]] || continue - MAP+=("${src#"$SRC"/}|qcom/sdm845/dipper/${src##*/}") - done - done -else - [[ -f "$SRC" ]] || die "no such file: $1" -fi +[[ -f "$SRC" ]] || die "no such file: $1" # Absolute, because the checksum step runs from inside the staging dir OUT=$(realpath -m -- "$OUT") # Publishing replaces whole directories under OUT, so OUT=/ would replace this @@ -411,9 +374,6 @@ fetch_vendor() { rm -rf "$WORK/super" "$WORK/super.img" } -if [[ $DEVICE == dipper ]]; then - get_file() { [[ -s "$SRC/$1" ]] && cp -- "$SRC/$1" "$2"; } -else fetch_vendor "$SRC" img="$WORK/vendor.img" if [[ "$(magic_at "$img" 0)" == ed26ff3a ]]; then @@ -464,13 +424,10 @@ elif [[ "$(magic_at "$img" 1024)" == e0f5e1e2 ]]; then else die "vendor.img is neither ext4 nor EROFS" fi -fi # The board list in android-info.txt is shared by pantah devices; the vendor # partition itself says which device it was built for. -if [[ $DEVICE == dipper ]]; then - say "Source: Dipper vendor, modem and Bluetooth partition roots" -elif get_file build.prop "$WORK/build.prop"; then +if get_file build.prop "$WORK/build.prop"; then dev=$(sed -n 's/^ro.product.vendor.device=//p' "$WORK/build.prop" | head -1) [[ "$dev" == "$DEVICE" || -n "$FORCE" ]] || die "vendor partition is for '${dev:-unknown}', not $DEVICE; use -f to override" @@ -488,21 +445,15 @@ dest="$new/$DEST_REL" for entry in "${MAP[@]}"; do from=${entry%%|*} to=${entry#*|} mkdir -p "$dest/$(dirname "$to")" - source_label=/vendor - [[ $DEVICE != dipper ]] || source_label=/partition - get_file "$from" "$dest/$to" || die "$source_label/$from is missing from this source or could not be copied" + get_file "$from" "$dest/$to" || die "/vendor/$from is missing from this image or could not be copied" chmod 0644 "$dest/$to" - if [[ $DEVICE == dipper ]]; then - printf ' /%-52s -> /%s/%s\n' "$from" "$DEST_REL" "$to" - else - printf ' /vendor/%-44s -> /%s/%s\n' "$from" "$DEST_REL" "$to" - fi + printf ' /vendor/%-28s -> /%s/%s\n' "$from" "$DEST_REL" "$to" done # The AoC's sensor registry (which sensors this board has, their buses and # settings), read by omamobile-sensor-proxy; without it only virtual sensors. # husky has no AoC driver yet, so it skips the registry. -if [[ $DEVICE != husky && $DEVICE != dipper ]]; then +if [[ $DEVICE != husky ]]; then reg="$new/usr/share/omamobile/sensors" get_dir etc/sensors/registry "$reg" || die "/vendor/etc/sensors/registry is missing from this image or could not be copied" @@ -520,14 +471,12 @@ fi # Sanity checks: right chip, text NVRAM, Cirrus file formats. brcm="$dest/brcm" -if [[ $DEVICE != dipper ]]; then - grep -aq "$WIFI_CHIP-roml" "$brcm/$FW_BASE.$BOARD.bin" || - die "fw_bcmdhd.bin is not a $WIFI_CHIP PCIe firmware" - [[ -z $BT_CHIP ]] || grep -aq "$BT_CHIP" "$brcm/BCM.$BOARD.hcd" || - die "BCM.hcd is not a ${BT_NAME:-$BT_CHIP} Bluetooth patch" - grep -aq '^NVRAMRev=' "$brcm/$FW_BASE.$BOARD.txt" || - die "bcmdhd.cal does not look like a Broadcom text NVRAM" -fi +grep -aq "$WIFI_CHIP-roml" "$brcm/$FW_BASE.$BOARD.bin" || + die "fw_bcmdhd.bin is not a $WIFI_CHIP PCIe firmware" +[[ -z $BT_CHIP ]] || grep -aq "$BT_CHIP" "$brcm/BCM.$BOARD.hcd" || + die "BCM.hcd is not a ${BT_NAME:-$BT_CHIP} Bluetooth patch" +grep -aq '^NVRAMRev=' "$brcm/$FW_BASE.$BOARD.txt" || + die "bcmdhd.cal does not look like a Broadcom text NVRAM" wmfw_halo() { # WMFW, Halo core (4): what cs_dsp accepts for this part [[ "$(head -c4 "$dest/$1")" == WMFW && "$(od -An -tu1 -j10 -N1 "$dest/$1" | tr -d ' ')" == 4 ]] || die "$1 is not a Halo Core WMFW firmware" @@ -580,22 +529,16 @@ if [[ $DEVICE == panther ]]; then mfc_ver=$(od -An -tx4 -j $((mfc_size - 4)) -N4 "$dest/s5p-mfc-v15.fw" | tr -d ' ') fi -ver= bt="" -if [[ $DEVICE != dipper ]]; then - ver=$(grep -ao 'Version=[0-9.]* ([^)]*)' "$brcm/$FW_BASE.$BOARD.bin" | head -1) - [[ -z $BT_CHIP ]] || bt=$(grep -ao "$BT_CHIP [^[]*" "$brcm/BCM.$BOARD.hcd" | head -1) -fi +ver=$(grep -ao 'Version=[0-9.]* ([^)]*)' "$brcm/$FW_BASE.$BOARD.bin" | head -1) +bt="" +[[ -z $BT_CHIP ]] || bt=$(grep -ao "$BT_CHIP [^[]*" "$brcm/BCM.$BOARD.hcd" | head -1) (cd "$dest" && find . -type f -printf '%P\n' | LC_ALL=C sort | xargs sha256sum -- > "$new/vendor-firmware.sha256") # The checksum list names exactly the mapped files for entry in "${MAP[@]}"; do printf '%s\n' "${entry#*|}"; done | LC_ALL=C sort > "$stage/expected" cut -c67- "$new/vendor-firmware.sha256" | cmp -s - "$stage/expected" || die "the staged firmware is not exactly the mapped files" -if [[ $DEVICE == dipper ]]; then - say "Mapped Dipper firmware and split Qualcomm modem segments" -else say "Wi-Fi firmware: ${ver:-unknown version}" -fi if [[ $DEVICE == husky ]]; then say "NVRAM: /vendor/firmware/$nvram${SKU:+ (SKU $SKU)}" [[ -n $SKU ]] || say "No -s SKU: stock's default NVRAM; pass the phone's SKU for its region's" @@ -631,4 +574,4 @@ fi publishing="" # published: nothing below may undo it [[ -z $CAMERA_APEX ]] || say "Camera HAL APEX copied to $CAMERA_APEX" say "Staged in $OUT (checksums in $OUT/vendor-firmware.sha256)" -echo "This is proprietary firmware from your own device image. Do not redistribute it." +echo "This is Google's proprietary firmware from your own factory image. Do not redistribute it." From a1bbcb6f05cf23515ef109e55a02be473f9df245 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Thu, 19 Nov 2026 00:40:02 +0100 Subject: [PATCH 39/44] device/dipper: disable systemd firstboot prompt Put systemd.firstboot=off in the Dipper-only RAM boot command line. The shared firstboot package remains unchanged; the argument still needs device verification after the reset path is understood. AI assistance: Codex. Signed-off-by: quatrixone --- device/dipper/NOTES.md | 8 ++++++++ tests/dipper-probe | 1 + tools/dipper/build-boot.py | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index 2e1a12271..f4fcd0c20 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -742,3 +742,11 @@ The upstream v8 cover letter states it was tested on Xiaomi Mi 8: [controller-ready fix](https://lists.openwall.net/linux-kernel/2026/09/25/2214), [binding update](https://lists.openwall.net/linux-kernel/2026/09/25/2212). Firmware loading, low-power touch and wake-on-touch/AP-SLPI handoff are not implemented. +# 2026-11-19 — Dipper boot argument for systemd's firstboot prompt + +The default RAM-only boot image command line now includes +`systemd.firstboot=off`, following the owner's review of #839. This is +Dipper-specific and leaves the shared firstboot package unchanged. The +argument is present in the generated boot manifest, but it has not yet been +verified on the phone. The firstboot prompt and the Omarchy firstboot service +still need a clean on-device run after the NFS reset/fallback path is resolved. diff --git a/tests/dipper-probe b/tests/dipper-probe index 033977958..84c86f6c4 100755 --- a/tests/dipper-probe +++ b/tests/dipper-probe @@ -61,6 +61,7 @@ with tempfile.TemporaryDirectory() as tmp: check=True, capture_output=True, text=True) manifest = json.loads((out / 'BOOT-MANIFEST.json').read_text()) assert manifest['hardware_boot_tested'] is False + assert 'systemd.firstboot=off' in manifest['cmdline'] assert (out / 'boot.img').read_bytes().startswith(b'ANDROID!') kernel.write_bytes(b'k' * 0xF80001) result = subprocess.run(['python3', 'tools/dipper/build-boot.py', '--kernel', str(kernel), diff --git a/tools/dipper/build-boot.py b/tools/dipper/build-boot.py index d1210b2e8..f30b2538d 100755 --- a/tools/dipper/build-boot.py +++ b/tools/dipper/build-boot.py @@ -30,7 +30,7 @@ # From the phone: console on the framebuffer, early console on the SoC's UART # (stock passes earlycon=msm_geni_serial,0xA84000), then the shared init. CMDLINE = ("console=tty0 earlycon=msm_geni_serial,0xa84000 rdinit=/init " - "panic=10 printk.devkmsg=on rootwait") + "panic=10 printk.devkmsg=on rootwait systemd.firstboot=off") # dipper's boot partition, measured: 65536 blocks of 1 KiB. BOOT_PARTITION_BYTES = 64 * 1024 * 1024 # This ABL refuses a larger kernel with only From 139e21d264cbe436010a244f2b16056c5f4d3619 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Thu, 19 Nov 2026 00:50:31 +0100 Subject: [PATCH 40/44] DEVICES: qualify Dipper panel test kernel Record that the manual EA8074 test used an unpublished kernel while panel driver #218 remains in review. AI assistance: Codex. Signed-off-by: quatrixone --- docs/DEVICES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/DEVICES.md b/docs/DEVICES.md index cef60cfaf..7906baa8f 100644 --- a/docs/DEVICES.md +++ b/docs/DEVICES.md @@ -32,7 +32,7 @@ The status of each device, as verified on real hardware. Rows in the matrix have | Pixel 7 ([notes](../device/panther/NOTES.md)) | panther | gs201 (Tensor G2) | WIP (slot B, not marked successful; Arch and Hyprland boot; `boot` and `init_boot` carry AVB footers, which a phone whose `vbmeta_b` is stock's needs to start slot B (device-panther 0.1.6, [#396](https://github.com/derekross/omarchy-mobile/pull/396), [notes](../device/panther/NOTES.md#2026-11-02-avb-footers-on-boot-and-init_boot)); `reboot-to bootloader` reaches fastboot with `reboot=warm`, merged, [kernel #198](https://github.com/derekross/linux-omarchy-mobile/pull/198); [BRINGUP-M1](../device/panther/BRINGUP-M1.md); board file merged, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108)) | testing (UFS behind the read-only guard; Arch on `userdata`; merged, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108)) | WIP (simple-framebuffer: console and the Hyprland desktop; brightness and display off/on over DCS through the S6E3FC3 panel driver and device-panther 0.1.4, merged, [kernel #177](https://github.com/derekross/linux-omarchy-mobile/pull/177); [DISPLAY-PLAN](../device/panther/DISPLAY-PLAN.md)) | testing (Panthor on the Mali-G710; Hyprland renders on it; merged through [kernel #134](https://github.com/derekross/linux-omarchy-mobile/pull/134), with the always-on rule in device-panther 0.1.1, [#145](https://github.com/derekross/omarchy-mobile/pull/145); [notes](../device/panther/NOTES.md#2026-10-28-the-gpu-and-the-haptics-power-off-and-usb-after-a-replug)) | WIP (FocalTech FT3658: touches drive Hyprland and unlock the PIN screen on a test kernel; the driver, [kernel #109](https://github.com/derekross/linux-omarchy-mobile/pull/109), and the touch node, [kernel #134](https://github.com/derekross/linux-omarchy-mobile/pull/134), are merged; stock's interrupt pull-up and CS delay, [kernel #166](https://github.com/derekross/linux-omarchy-mobile/pull/166), the driver's review fixes, [kernel #133](https://github.com/derekross/linux-omarchy-mobile/pull/133), and the kernel option with the touch notes, [#149](https://github.com/derekross/omarchy-mobile/pull/149), are merged) | testing (gpio-keys: power, volume; merged, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108)) | testing (USB and SSH; merged, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108); a replug comes back through `omamobile-usb-rescue` in device-panther 0.1.3, on the MAX77759's I2C bus, merged, [kernel #167](https://github.com/derekross/linux-omarchy-mobile/pull/167); [notes](../device/panther/NOTES.md#2026-10-29-usb-comes-back-after-a-replug-u1)) | no | testing (BCM4389 on the APM UART through hci_bcm with the phone's own patch, merged, [kernel #196](https://github.com/derekross/linux-omarchy-mobile/pull/196): a BLE mouse drives the shell, and headphones play over A2DP with their AVRCP buttons, on its author's Pixel 7; the Bluetooth address and the rest of the package side aren't merged yet; headset calls, suspend and power not tested) | WIP (MAX77759 fuel gauge with stock's battery model on a test kernel: percentage, capacity and temperature in upower and the bar; merged, [kernel #171](https://github.com/derekross/linux-omarchy-mobile/pull/171) and the driver fix [#170](https://github.com/derekross/linux-omarchy-mobile/pull/170); a second unit's Lishen pack isn't matched by that model yet, [notes](../device/panther/NOTES.md#2026-11-03-a-second-unit-angelrenefm); [BATTERY-PLAN](../device/panther/BATTERY-PLAN.md)) | no | testing (CS40L26 with the phone's own firmware, `tools/extract-vendor-firmware -d panther`; merged through [kernel #134](https://github.com/derekross/linux-omarchy-mobile/pull/134), with the feedbackd rule in device-panther 0.1.1, [#145](https://github.com/derekross/omarchy-mobile/pull/145); [notes](../device/panther/NOTES.md#2026-10-28-the-gpu-and-the-haptics-power-off-and-usb-after-a-replug)) | testing (LM3644 rear flash, 36 steps, from the node merged in [kernel #197](https://github.com/derekross/linux-omarchy-mobile/pull/197) and the bring-up overlay `torch.dtso`, [#426](https://github.com/derekross/omarchy-mobile/pull/426): lit on a second Pixel 7; the quick-settings tile not checked) | no | no | no | no | no | no | no (the package's camera start and DMA heap rule are merged, device-panther 0.1.9, [#443](https://github.com/derekross/omarchy-mobile/pull/443), inert until the camera device tree is proposed) | no (s2idle by default since [kernel #134](https://github.com/derekross/linux-omarchy-mobile/pull/134) and device-panther 0.1.1; not run yet) | WIP (the sensor's node, disabled, is merged, [kernel #207](https://github.com/derekross/linux-omarchy-mobile/pull/207); with a bring-up overlay and the package side, which is in review ([#458](https://github.com/derekross/omarchy-mobile/pull/458)), a finger enrolled and unlocked its author's Pixel 7, also after a reboot) | | OnePlus 13 ([notes](../device/dodge/NOTES.md)) | dodge | sm8750 (Snapdragon 8 Elite) | testing (kernel [mrlund/linux-omarchy-mobile `dodge-v3-20261101`](https://github.com/mrlund/linux-omarchy-mobile/tree/dodge-v3-20261101); [kernel #115](https://github.com/derekross/linux-omarchy-mobile/pull/115) closed; [BRINGUP](../device/dodge/BRINGUP-M1.md), [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing ([notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (msm/dpu; warm-boot drop fixed; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (Adreno 830 / gpu2; Vulkan untested; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing ([notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing ([notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (CDC NCM + SSH; gadget stuck after replug until reboot; kernel [mrlund/linux-omarchy-mobile `dodge-v3-20261101`](https://github.com/mrlund/linux-omarchy-mobile/tree/dodge-v3-20261101); [kernel #115](https://github.com/derekross/linux-omarchy-mobile/pull/115) closed; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (WCN7860 / ath12k; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (pairing; A2DP untested; kernel [mrlund/linux-omarchy-mobile `dodge-v3-20261101`](https://github.com/mrlund/linux-omarchy-mobile/tree/dodge-v3-20261101); [kernel #115](https://github.com/derekross/linux-omarchy-mobile/pull/115) closed; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (gauge; charging path not claimed; kernel [mrlund/linux-omarchy-mobile `dodge-v3-20261101`](https://github.com/mrlund/linux-omarchy-mobile/tree/dodge-v3-20261101); [kernel #115](https://github.com/derekross/linux-omarchy-mobile/pull/115) closed; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | no | no | no | no | - | testing (speakers, earpiece, mics; headset plug untested; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (accel, prox, compass; autorotate; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | testing (LTE data; calls/SMS untested; opt-in flag; [modem](../device/dodge/modem/README.md), [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | no | no | WIP (s2idle not default; [notes](../device/dodge/NOTES.md#2026-10-28-matrix-evidence)) | no | | OnePlus 6 ([notes](../device/enchilada/NOTES.md)) | enchilada | SDM845 (Snapdragon 845) | WIP (RAM-only `fastboot boot` of a header-v0 image; kernel: Linux 7.1-rc1 from the sdm845-mainline tree, not linux-omarchy-mobile; the firewall failure booted from `boot_b` after `--set-active=b`, the firewall fix and GPU results were `fastboot boot`s, all three with the Arch root on `userdata`; stock is not on slot A, a §3.1 event: [notes](../device/enchilada/NOTES.md#slots-and-what-is-on-them-contributingmd-31); [#432](https://github.com/derekross/omarchy-mobile/issues/432)) | WIP (UFS behind the read-only guard; `boot_b` is on LUN `sde` and stays read-only; [notes](../device/enchilada/NOTES.md#2026-11-04-ram-only-first-light)) | WIP (msm DRM framebuffer console; [notes](../device/enchilada/NOTES.md#2026-11-04-ram-only-first-light)) | no (needs the phone's own zap shader; [notes](../device/enchilada/NOTES.md#2026-11-05-adreno-630-needs-this-phones-zap-shader)) | no | no | testing (NCM + ACM + SSH; [notes](../device/enchilada/NOTES.md#2026-11-04-ram-only-first-light)) | no (modem/rmtfs plan first) | no | no | no | no | no | no | - | no | no | no | no | no | no | no | -| Xiaomi Mi 8 | dipper | sdm845 (Snapdragon 845) | WIP ([bring-up notes](../device/dipper/BRINGUP-M1.md)) | WIP (guard logs all 85 partitions read-only; direct readback pending) | WIP (EA8074 panel test passed by hand; not enabled in the default image, [notes](../device/dipper/NOTES.md)) | WIP (Adreno 630 renderer tested in the old userdata install; kernel release not recorded; Hyprland rendering pending, [#500](https://github.com/derekross/omarchy-mobile/pull/500)) | WIP (FTS5 events captured; Hyprland delivery pending, [notes](../device/dipper/NOTES.md)) | WIP (GPIO buttons registered) | WIP (USB NCM and SSH worked in rescue boots; current Omarchy NFS root not yet usable) | no | WIP (HCI detected; Dipper firmware missing) | no | no | no | no | no | no | no | no | no | no | no | no | +| Xiaomi Mi 8 | dipper | sdm845 (Snapdragon 845) | WIP ([bring-up notes](../device/dipper/BRINGUP-M1.md)) | WIP (guard logs all 85 partitions read-only; direct readback pending) | WIP (EA8074 panel tested by hand on an unpublished kernel; driver #218 is still in review and not in the default image, [notes](../device/dipper/NOTES.md)) | WIP (Adreno 630 renderer tested in the old userdata install; kernel release not recorded; Hyprland rendering pending, [#500](https://github.com/derekross/omarchy-mobile/pull/500)) | WIP (FTS5 events captured; Hyprland delivery pending, [notes](../device/dipper/NOTES.md)) | WIP (GPIO buttons registered) | WIP (USB NCM and SSH worked in rescue boots; current Omarchy NFS root not yet usable) | no | WIP (HCI detected; Dipper firmware missing) | no | no | no | no | no | no | no | no | no | no | no | no | | *Template* | *codename* | *SoC* | | | | | | | | | | | | | | | | | | | | | | | ## cheetah (Pixel 7 Pro) in detail From e6bd2dbc8e15ac8bdcee00a999b4eff4a8076c2c Mon Sep 17 00:00:00 2001 From: quatrixone Date: Thu, 19 Nov 2026 02:29:36 +0100 Subject: [PATCH 41/44] device/dipper: record guarded backup comparison --- device/dipper/NOTES.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index f4fcd0c20..70ad700e4 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -750,3 +750,33 @@ Dipper-specific and leaves the shared firstboot package unchanged. The argument is present in the generated boot manifest, but it has not yet been verified on the phone. The firstboot prompt and the Omarchy firstboot service still need a clean on-device run after the NFS reset/fallback path is resolved. + +## 2026-11-19 — guarded on-device backup comparison + +Booted the rescue image `5e0370e4933232f2e56440ab19e0950981a99bb96113619313d462df1c64cd70` +with `fastboot boot` (RAM only). Its `omamobile.initramfs` argument held PID 1 +in the initramfs, and its empty UFS allowlist left every partition read-only. +Before hashing, the phone reported `ro=1` for all six UFS disks and all 84 +backed-up partitions; partition names, nodes and sizes matched the 11-09 +manifest. SHA-256 was calculated from each phone partition and compared with +the raw-source hashes captured with the 11-09 compressed backup: **83 of 84 +matched**. Only `logfs` differed. No partition was mounted or written during +this comparison. The full hashes and comparison table remain off-repository. + +Between the 11-09 capture and this check, the phone ran Android, the older +installed Linux system and multiple RAM/NFS boot attempts. The 11-13 check +only re-hashed backup files; it did not compare the phone. The NFS attempts +between 11-13 and 11-16 also fell back into the older writable install at +least eight times, as counted in the owner's review. The exact boot sequence +and cause of the `logfs` change are not established. The other 83 backed-up +partitions, including `persist`, `modemst1` and `modemst2`, matched byte for +byte at this check. + +The rescue boot exposed `/chosen/pureason` as big-endian `0x000800a1`, with +an empty pstore. This boot followed a manual entry to fastboot, so the value +does not establish the cause of the earlier NFS resets. The roughly one-minute +reset and fallback still need a controlled explanation before another NFS boot. +The rescue image lacked `reboot-to`; a previously built static AArch64 helper +was copied into `/run` (RAM) and `reboot-to bootloader` returned the phone to +fastboot. The bootloader again identified the product as `dipper`. No UFS +partition was flashed. From 81fb758ec604f17ae9b4312d9b4a25cd036c7a2c Mon Sep 17 00:00:00 2001 From: quatrixone Date: Thu, 19 Nov 2026 02:42:56 +0100 Subject: [PATCH 42/44] device/dipper: record RAM rescue fallback preflight --- device/dipper/NOTES.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index 70ad700e4..8128a70fe 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -780,3 +780,22 @@ The rescue image lacked `reboot-to`; a previously built static AArch64 helper was copied into `/run` (RAM) and `reboot-to bootloader` returned the phone to fastboot. The bootloader again identified the product as `dipper`. No UFS partition was flashed. + +## 2026-11-19 — RAM-rescue fallback image preflight + +An initial RAM-rescue image without an NFS request exposed a storage-guard +defect: all 85 partition flags were `ro=1`, but the `sda` disk flag was `0` +and its whole-disk node was removed. It was never flashed. The shared init +fix is proposed separately in omarchy-mobile#919; with no writable allowlist, +it marks the whole disk read-only and checks it at hand-over. + +A second RAM-only image, SHA-256 +`06a8cc368ce86ae6ba570208d0291c642f143019283dd0a88d99ef2365d746b3`, +included #919's exact `initramfs/init`, `ram-rescue` mode, no NFS request, +disabled automatic USB-failure panic, and a static `reboot-to` in RAM. +`fastboot boot` reached an SSH shell on kernel `7.3.0-rc6-omamobile-push1`; +`/` remained rootfs, all six UFS disk flags and all 85 partition flags read +`ro=1`, and the built-in `reboot-to bootloader` returned to fastboot. +No partition was flashed, so a persistent reset into this rescue image is +not yet verified. NFS testing remains paused pending the owner's review of +the fallback plan. From d1287aef236a3b0c8122051bb8c7ae4148e0baa1 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Thu, 19 Nov 2026 11:48:36 +0100 Subject: [PATCH 43/44] device/dipper: verify persistent rescue fallback --- device/dipper/NOTES.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/device/dipper/NOTES.md b/device/dipper/NOTES.md index 8128a70fe..b0cfadad0 100644 --- a/device/dipper/NOTES.md +++ b/device/dipper/NOTES.md @@ -775,11 +775,11 @@ byte at this check. The rescue boot exposed `/chosen/pureason` as big-endian `0x000800a1`, with an empty pstore. This boot followed a manual entry to fastboot, so the value does not establish the cause of the earlier NFS resets. The roughly one-minute -reset and fallback still need a controlled explanation before another NFS boot. +reset cause remains unknown; the fallback path is recorded below. The rescue image lacked `reboot-to`; a previously built static AArch64 helper was copied into `/run` (RAM) and `reboot-to bootloader` returned the phone to fastboot. The bootloader again identified the product as `dipper`. No UFS -partition was flashed. +partition was flashed during this comparison. ## 2026-11-19 — RAM-rescue fallback image preflight @@ -795,7 +795,13 @@ included #919's exact `initramfs/init`, `ram-rescue` mode, no NFS request, disabled automatic USB-failure panic, and a static `reboot-to` in RAM. `fastboot boot` reached an SSH shell on kernel `7.3.0-rc6-omamobile-push1`; `/` remained rootfs, all six UFS disk flags and all 85 partition flags read -`ro=1`, and the built-in `reboot-to bootloader` returned to fastboot. -No partition was flashed, so a persistent reset into this rescue image is -not yet verified. NFS testing remains paused pending the owner's review of -the fallback plan. +`ro=1`, and the built-in `reboot-to bootloader` returned to fastboot. After +verifying the existing boot partition matched the 11-09 backup, flashed this +image to the single `boot` partition. `reboot-to bootloader` and then a plain +`fastboot reboot` returned to this persistent rescue image; all six disks and +85 partitions again reported `ro=1`. No userdata or other partition was +written. The 11-09 raw boot image remains available as the restore source; +its raw SHA-256 is `e9ef7bff84d181e09de286a95b9487ec5fcb5c0cc53db3ae780d6a64ceb4fbe8`. +The persistent rescue fallback now works. The cause of the earlier NFS reset +is still unknown; the next NFS test can collect its reset evidence without +falling into the older writable userdata system. From 3206168c6b53aed3355c3fe31e511105f7afa657 Mon Sep 17 00:00:00 2001 From: quatrixone Date: Thu, 19 Nov 2026 16:28:00 +0100 Subject: [PATCH 44/44] device/dipper: enable the FTS5 overlay in RAM boots Apply the Dipper-specific overlay to the packed DTB so the disabled FTS5 node is enabled during RAM boots. Keep the source overlay with the device descriptor and compile it with the kernel build tools. The corresponding kernel DTB build now includes symbols. Exact device-side verification remains pending because the SSH host identity did not match a trusted key. AI assistance: Codex. Signed-off-by: quatrixone --- device/dipper/device.conf | 1 + device/dipper/kernel.config | 6 +++--- device/dipper/overlays/fts5.dtso | 8 ++++++++ tests/dipper-probe | 6 ++++++ tools/dipper/build | 21 ++++++++++++++++++++- 5 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 device/dipper/overlays/fts5.dtso diff --git a/device/dipper/device.conf b/device/dipper/device.conf index 446753c26..f39979e3f 100644 --- a/device/dipper/device.conf +++ b/device/dipper/device.conf @@ -10,4 +10,5 @@ PACKAGE=omamobile-device-dipper BOOT_METHOD=ram-only BOOT_IMAGES="" UFS_RW="" +DTB_OVERLAYS="fts5" PANEL_SIZE=1080x2248 diff --git a/device/dipper/kernel.config b/device/dipper/kernel.config index 5c764c254..2d2e46cbd 100644 --- a/device/dipper/kernel.config +++ b/device/dipper/kernel.config @@ -25,8 +25,8 @@ CONFIG_TYPEC_QCOM_PMIC=y # Populate the PMIC power/resin key children before the initramfs checks keys. CONFIG_POWER_RESET_QCOM_PON=y -# The FTS5 driver is upstream after PR #219, but PR #220 has no Dipper touch -# node yet. Keep it built in for a later node/overlay test. +# The FTS5 node from PR #249 stays disabled in the base tree; the device's +# `fts5` overlay enables it. Keep the driver built in for its early probe. CONFIG_TOUCHSCREEN_STMFTS=y # Console log into the stock ramoops region: the only way to read an early hang @@ -42,7 +42,7 @@ CONFIG_PSTORE_CONSOLE=y # i2c (geni_i2c loaded by hand bound to nothing, and `bind` by hand failed). # So everything needed to reach a usable system is built in. -# i2c: built in for the follow-up FTS5 node; PR #220 does not enable it yet. +# i2c: built in for the Dipper FTS5 node and its early probe. CONFIG_I2C_QCOM_GENI=y CONFIG_QCOM_GPI_DMA=y # Nothing of ours is on SPI, so it stays a module: every built-in byte counts diff --git a/device/dipper/overlays/fts5.dtso b/device/dipper/overlays/fts5.dtso new file mode 100644 index 000000000..509a0d604 --- /dev/null +++ b/device/dipper/overlays/fts5.dtso @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0 +/* Enable the FTS5 node, which is disabled in the base DTS. */ +/dts-v1/; +/plugin/; + +&touchscreen { + status = "okay"; +}; diff --git a/tests/dipper-probe b/tests/dipper-probe index 84c86f6c4..a250053d2 100755 --- a/tests/dipper-probe +++ b/tests/dipper-probe @@ -13,9 +13,15 @@ assert 'patch-init.py "$stage/init"' in script assert 'OMAMOBILE_NFSROOT' in Path('tools/dipper/build').read_text() assert 'omamobile-nfsroot' in script builder = Path('tools/dipper/build').read_text() +descriptor = Path('device/dipper/device.conf').read_text() +overlay = Path('device/dipper/overlays/fts5.dtso').read_text() assert 'OUT=${OUT:-$repo/out/dipper}' in builder assert 'modules_install' not in builder assert 'FIRMWARE_DIR' not in builder +assert 'source "$repo/device/dipper/device.conf"' in builder +assert 'DTB_OVERLAYS="fts5"' in descriptor +assert '&touchscreen' in overlay and 'status = "okay"' in overlay +assert '"$fdtoverlay" -i "$dtb" -o "$packdtb"' in builder assert 'fastboot -s boot boot.img' in builder assert 'panel-samsung-ea8074' not in script for path in ('init', 'prune-modules.py', 'patch-init.py', 'initramfs-inside.sh', diff --git a/tools/dipper/build b/tools/dipper/build index 3bf10e30e..0d06417e9 100755 --- a/tools/dipper/build +++ b/tools/dipper/build @@ -14,6 +14,7 @@ repo=$(cd "$here/../.." && pwd) KERNEL_DIR=${KERNEL_DIR:-$repo/../linux} KERNEL_OUT=${KERNEL_OUT:-$KERNEL_DIR} OUT=${OUT:-$repo/out/dipper} +source "$repo/device/dipper/device.conf" die() { echo "error: $*" >&2; exit 1; } : "${SSH_PUBKEY:?set SSH_PUBKEY to your authorized public key}" ALPINE=${ALPINE:-alpine:3.22} @@ -58,7 +59,25 @@ docker run --rm --platform linux/arm64 \ # Pack a copy of the DTB so nothing we do can dirty the kernel tree. packdtb=$OUT/sdm845-xiaomi-dipper.dtb -cp "$dtb" "$packdtb" +if [[ -n ${DTB_OVERLAYS:-} ]]; then + dtc=$KERNEL_OUT/scripts/dtc/dtc + fdtoverlay=$KERNEL_OUT/scripts/dtc/fdtoverlay + [[ -x $dtc && -x $fdtoverlay ]] || die "kernel build has no dtc/fdtoverlay" + overlay_dir=$OUT/overlays + mkdir -p "$overlay_dir" + overlays=() + for ov in $DTB_OVERLAYS; do + [[ $ov =~ ^[a-z0-9-]+$ ]] || die "bad DTB overlay name: $ov" + src=$repo/device/dipper/overlays/$ov.dtso + [[ -f $src ]] || die "no overlay $src" + out=$overlay_dir/$ov.dtbo + "$dtc" -q -@ -I dts -O dtb -o "$out" "$src" || die "overlay $ov does not compile" + overlays+=("$out") + done + "$fdtoverlay" -i "$dtb" -o "$packdtb" "${overlays[@]}" || die "applying Dipper overlays failed" +else + cp "$dtb" "$packdtb" +fi kernel_image=$image if command -v zopfli >/dev/null; then echo "compressing the kernel with zopfli for dipper's ABL size limit"