Skip to content

device/dipper: add device runtime package - #714

Draft
quatrixone wants to merge 44 commits into
derekross:mainfrom
quatrixone:dipper-device-package
Draft

quatrixone wants to merge 44 commits into
derekross:mainfrom
quatrixone:dipper-device-package

Conversation

@quatrixone

@quatrixone quatrixone commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Build and checks

  • tools/build-packages --local dipper --force packages/omamobile-device-dipper: passed for omamobile-device-dipper 0.1.1-1.
  • pacman -Qlp lists /usr/bin/reboot-to, the device descriptor, USB network, watchdog and UFS storage files. Package SHA-256: f0f40a3ff5fcf635f7ddc644a8d65bf037b5b56fe699b0b87df1a0af53a853dc.
  • packages/omamobile-device-dipper/test/all, tests/dipper-probe and tools/pr-check origin/main: passed. Shared behavior and firmware tests are in their split PRs.

Phone evidence and remaining gate

On 2026-11-19, a guarded rescue boot reached initramfs SSH with all six UFS disks and all 84 backed-up partitions read-only. On-device SHA-256 matched 83/84 raw-source hashes from the 2026-11-09 backup; only logfs differed. The backup and full hashes stay off-repository. /chosen/pureason=0x000800a1 and empty pstore were read after manual fastboot entry, so they do not explain the earlier NFS resets.

The first NFS-free RAM rescue preflight found that the shared init left sda at ro=0 when its writable allowlist was empty. I fixed that in #919. A RAM image built with #919's exact init (06a8cc368ce86ae6ba570208d0291c642f143019283dd0a88d99ef2365d746b3) reported all six disks and 85 partitions at ro=1 and returned to fastboot with its built-in reboot-to.

I then verified that the existing single boot partition matched the 11-09 backup and flashed only that partition with the tested rescue image. reboot-to bootloader followed by plain fastboot reboot returned to the persistent rescue system, where all six disks and 85 partitions again reported ro=1. The 11-09 raw boot image remains available for restore (SHA-256 e9ef7bff84d181e09de286a95b9487ec5fcb5c0cc53db3ae780d6a64ceb4fbe8). No userdata or other partition was written. This fallback contains reset failures in rescue; the cause of the earlier NFS reset remains unknown.

The screen, fresh-root networkctl status usb0, tools/phone-smoke, and current-root Adreno renderer remain unverified. The systemd firstboot argument is in the built image command line, but needs an on-device run. The previous renderer record is from the old userdata install and has no recorded kernel release; it is not a clean Omarchy/Hyprland test. The cause of the logfs difference is unknown; the other 83 backed-up partitions, including persist and both modemst partitions, matched byte for byte at this check.

This PR stays draft. #502 and the shared Freedreno build in #500 are prerequisites; #917 supplies the Dipper firmware extractor. A reviewed persistent install path and a clean current-stack boot with a session and smoke report are still required before Dipper can be marked supported.

@derekross

Copy link
Copy Markdown
Owner

Thanks for putting the device package up, and for the care in it. No service that touches the modem's partitions is enabled, the descriptor stays RAM-only, the whole-disk rule covers all six LUNs (more than the Pixel 7 Pro's does), and today's NFS run was a fastboot boot with every partition read-only. It's also good to see the session come up with the patches verified, and that you didn't import a key you couldn't check. Here's what I'd like before it leaves draft.

  1. The firmware aliases. Each link points from qcom/sdm845/Xiaomi/dipper/<file> to ../../dipper/<file>, which is qcom/sdm845/dipper/<file>, and the description says those files come from linux-firmware-qcom. That package has no qcom/sdm845/dipper/ directory. Its SDM845 files sit in qcom/sdm845/ itself (a630_zap, adsp, cdsp, mba, modem and wlanmdsp as .mbn.zst, plus four .jsn files) and under two other boards' folders. So on a root with only the declared dependency, all 14 links dangle. Three names aren't in the package at all (ipa_fws.mbn, modemr.jsn, and modemuw.mbn, where the real file is modemuw.jsn), and the test checks only the text of each link. Where did the files under qcom/sdm845/dipper/ on your test root come from, and where did the render in mesa 1:26.2.4-1.5: build the Freedreno Gallium driver for Adreno phones #500 get a630_zap.mbn? I think the answer is the phone's own firmware, which is also what the board file asks for. The way we handle that is in CONTRIBUTING §7: a dipper mapping in tools/extract-vendor-firmware that takes the files from the owner's own phone or image and installs them under the names the device tree asks for, with nothing committed and nothing aliased to another board's builds. Until that exists, please drop the alias loop and list in the README which files the device tree wants.

  2. The storage rule. The comment says the initramfs keeps everything read-only "except userdata", and the second rule leaves userdata visible to desktop tools. That's the Pixels' rule, where userdata is our root. On the Mi 8 the descriptor has UFS_RW="", every boot in the notes shows all partitions read-only, and userdata still holds the installed ROM's data. Please hide every sd[a-f]* partition with no exception for now, and make the comment and the test line say the same.

  3. Order. The four Qualcomm packages this depends on exist only in packages: add Qualcomm QRTR userspace stack #502, so packages: add Qualcomm QRTR userspace stack #502 goes in first (or together with this one). And mesa here meets the open question on mesa 1:26.2.4-1.5: build the Freedreno Gallium driver for Adreno phones #500; with Freedreno back in the shared Mesa, the dependency is right as written. device/dipper: record corrected FTS5 RAM test #704 should go in first too, since both add the top row of the NOTES table (and now both touch BRINGUP-M1's status line), and this one gets rebased on it.

  4. Today's NFS run. Thank you for it. A few things to tie it down:

    • It ran Omarchy 4.0.6 with the 4.0.6 patch family on omamobile-omarchy 0.1.44. Phones are on Omarchy 4.5.0-3 now, and main's omamobile-omarchy is 0.1.45, so the run that lets this leave draft should be on that stack.
    • The notes say a stale omamobile-wlan.service was disabled in the root. No package of ours has that unit. What is it, how did it get there, and is there anything else in that root that no package installed? The run should be on a root where every unit comes from a package.
    • "DSI enumeration" passed, but no visible desktop was captured, the panel driver (kernel device-dodge: follow-ups from #111 (fastboot refuse, install bind trap, park deliberate panic) #218) is still in review, and the previous row's display was black. Which kernel tree did this boot use (7.3.0-rc6-omamobile-push1 has no commit in it), what built image 50356521…, and did the panel light? Please make BRINGUP-M1's status line say what was seen on the screen.
    • Was omamobile-device-dipper installed with its dependencies resolved, or with --nodeps? The unknown repository key suggests the root's [omamobile] keyring wasn't set up, and the package depends on omamobile-keyring.
    • Please paste the tools/phone-smoke report itself, with its header line, and add networkctl status usb0 from a boot where networkd takes over the link that carries the NFS root.
    • Still open from the earlier boot: which reboot-to took the phone back to fastboot (the initramfs's or the packaged one), and what the 11-13 "Local RAM image" was built from.

Smaller things: README.md needs its SPDX line. The PKGBUILD could get the check() the other device packages have, with the cmp against device/dipper/device.conf behind a check that the repository is there, so the package still builds from its own directory. build calls reboot-to.c "the shared helper", but it's this package's own. The USB route's metric is 1000 where the Pixels use 2000, and a word on why would help. And a README line that sleep is untested and stays off would help, since on an NFS root the USB link is the root.

On the build: you wrote that tools/build-packages --local dipper --force couldn't look up a newer Arch signing key. Could you paste the exact error? If it happens on today's main, it's our tool, and I'll open an issue for it.

@quatrixone
quatrixone force-pushed the dipper-device-package branch 4 times, most recently from b0c5132 to 2355717 Compare November 13, 2026 20:26
@quatrixone

Copy link
Copy Markdown
Contributor Author

Reproduced the requested build failure on this PR branch with tools/build-packages --local dipper --force while building omacam:

error: key "C80503FB06B17A39" could not be looked up remotely
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
the build image is behind the repositories: upgrading it for this build, then installing again
...
error: key "C80503FB06B17A39" could not be looked up remotely
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
error: omacam: build failed

The same missing-key error occurs on the retry after the build image upgrade. I have not imported or locally trusted the key. The package repository build stopped here, so there is no Omarchy 4.5.0-3 / omamobile-omarchy 0.1.45 phone image yet.

@quatrixone

Copy link
Copy Markdown
Contributor Author

Follow-up from the targeted Dipper package build (tools/build-packages --local dipper --force packages/omamobile-device-dipper): it fails before makepkg for the same missing repository signing keys, now showing both IDs:

error: key "C80503FB06B17A39" could not be looked up remotely
error: key "D2373E068CD0FF3D" could not be looked up remotely
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
the build image is behind the repositories: upgrading it for this build, then installing again
...
error: key "C80503FB06B17A39" could not be looked up remotely
error: key "D2373E068CD0FF3D" could not be looked up remotely
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
error: omamobile-device-dipper: build failed

The Dipper package test itself passed before the dependency install. I have not imported or trusted either key.

@quatrixone

Copy link
Copy Markdown
Contributor Author

I also checked the same omacam target from today's upstream main, in an isolated worktree with a fresh empty local repository and the local Dipper key. Dependency installation passed and makepkg began compiling; I stopped that resource-heavy compile once it had passed the failing step. So the missing-key error is reproducible with the populated Dipper repo, but I have not reproduced it on a clean main repo and do not have evidence yet that this is a general tools/build-packages failure. The next useful check is to identify which existing local package signature introduces C805…/D237….

@quatrixone

Copy link
Copy Markdown
Contributor Author

Follow-up to the requested device and package checks:

  • The fresh Omarchy 4.5.0-3 / omamobile-omarchy 0.1.45 rootfs build and all build-time rootfs smoke checks passed. The rebuilt Dipper kernel contains the EA8074 panel module. The rootfs is a local test artifact; it has not been installed to UFS.
  • I RAM-booted the NFS image. It did not reach the new root. A later SSH session reported the existing dirty kernel and an ext4 root, and the packaged reboot-to bootloader returned the phone to fastboot. The test image has no firstboot log or created test account. No flash command was issued, but incidental writes by the existing system cannot be ruled out, so the earlier userdata backup may be stale.
  • Because that boot did not reach the test root, there is no current tools/phone-smoke report, networkctl status usb0, /proc/iomem capture, UFS read-only flag capture, or visual desktop evidence. I cannot call the Omarchy desktop tested or mark Dipper supported from this run.
  • README now lists the firmware paths explicitly requested by the Dipper DTS; no vendor blobs or cross-device aliases are included. The package storage guard hides all UFS disks and partitions.
  • The package build dependency failure and its exact missing-signing-key output are in the earlier follow-up. A separate clean-main check passed dependency installation; I did not import or locally trust either key.
  • PR packages: add Qualcomm QRTR userspace stack #502 remains open as planned for merging with the device package. PR device/dipper: record corrected FTS5 RAM test #704 remains draft; its latest notes now mark unrecorded watchdog-feeder evidence as “not read.” I will rebase device/dipper: add device runtime package #714 after device/dipper: record corrected FTS5 RAM test #704 is accepted.
  • Kernel PR device/husky: battery bring-up overlays, the dead-man tool and the results #249 is still draft. Its CI check is red; local kernel-pr-check found the missing human Signed-off-by and passed strict checkpatch, but skipped compilation because clang/ld.lld are unavailable here.

The PR stays draft until the NFS-root boot reaches this image and the requested on-device evidence is captured. No personal paths, device identifiers, or wireless credentials are included in the notes.

@okias

okias commented Nov 14, 2026

Copy link
Copy Markdown

btw. I'm currently updating the https://codeberg.org/sdm845/linux/commits/branch/b4/dipper beware that official mainline firmware paths and naming may not be final. The stmfts5 got into the kernel, so touchscreen should be available.

@quatrixone
quatrixone force-pushed the dipper-device-package branch from 1afeeeb to fb4ca19 Compare November 14, 2026 21:52
@quatrixone

Copy link
Copy Markdown
Contributor Author

Follow-up on the reboot-to question: on 2026-11-15, from the existing Linux/ext4 system on the phone (not the new NFS-root image), DEVICE=dipper bin/omamobile fastboot ran the installed /usr/bin/reboot-to bootloader and returned to fastboot. The command reported In fastboot; fastboot getvar product returned dipper, and fastboot getvar unlocked returned yes. No partition was flashed.

This push lets a ram-only descriptor use the host fastboot recovery command while keeping image/initramfs/flash/push refused; if reboot-to is ignored, it stops without the unverified sysrq fallback. tests/boot-method and tools/pr-check origin/main pass.

This does not verify the new NFS-root boot or the requested on-device phone-smoke; #714 remains draft.

@quatrixone
quatrixone force-pushed the dipper-device-package branch 2 times, most recently from 160f42b to f9b04b7 Compare November 16, 2026 18:19
@derekross

Copy link
Copy Markdown
Owner

Thanks for the work since the 13th. The package took every point: the alias loop is gone and the README lists the files, both storage rules now hide everything, the README has its SPDX line and says sleep is untested, and your notes are careful about what each boot did and didn't show. Thank you also for the plain answers on the old root's unowned units and on which reboot-to ran.

Four things before this leaves draft. The first is the one that matters most to everyone else.

  1. The tools/phone-smoke change fails on every Pixel. I ran your copy and main's on fake roots through --slot-from. With /sys/block/sda/ro at 0, which is how the guard leaves the main disk on every phone whose root is on userdata (it removes the node instead), yours reports "not ok: writable UFS nodes: disks sda". With the Pixel 7 Pro's installed device.conf, a release on slot A fails on its own five boot images, because the descriptor's list names _b, and the same phone with only boot_b writable passes, which main refuses. Your test builds all six disks read-only and has a descriptor only in the RAM-only case, so it can't show this. Please take the change out of this pull request. If the Mi 8 needs a stricter row, a separate pull request can add it for a descriptor whose UFS_RW is empty, with the Pixel path left as it is and fixtures for a Pixel on each slot.

  2. The fallbacks into the old install. Your notes say an NFS boot "must never fall through to writable userdata", and they also record that it did, by my count at least eight times between the 13th and the 16th, each time into the old system running read-write with a writable main disk. I know that install predates all this. Two things, please. From a guarded rescue boot, with everything read-only, take checksums of the 84 backed-up partitions on the phone itself and compare them with the 11-09 backup (the 11-13 check re-hashed the backup files, not the phone), and record the result with the boots in between. And please pause the NFS boots until we've agreed how to stop a reset from landing there; your notes point at the watchdog (the 60 s setting rejected, a restart about a minute in), and I'd like to know what the reset reason says.

  3. The firmware mapping. It stages into qcom/sdm845/dipper/ and qca/, and the README says the DTS asks for those paths. The board files on omamobile ask for qcom/sdm845/Xiaomi/dipper/… and Xiaomi/dipper/crnv21.bin. Whichever is right, the tool and the published DTS have to agree, so either the mapping follows the DTS or a kernel pull request changes it first. In the same hunk: please check vendor/build.prop says the source is a dipper, as the other devices do; fail when a split image has no .bNN segment; leave the lines the Pixels print as they were; and name the backup copies on the laptop as the source rather than mounts of the phone's partitions.

  4. Scope. The smoke test, the firmware tool and bin/omamobile's ram-only handling are shared code, and each deserves its own small pull request. This one would then be the package, the descriptor line and the notes.

Smaller things: rmtfs is the modem's storage daemon, and I'd rather it weren't a hard dependency until the modem has its own gated plan. CONFIG_DRM_PANEL_SAMSUNG_EA8074 exists only in linux-omarchy-mobile#218, so it does nothing on the published branch yet. In DEVICES.md the Mi 8's row should sit with the other community ports rather than above the Pixel 7 Pro, and its GPU cell should say that the renderer test ran in the old install with no kernel recorded.

Still open from before: #502 and #500 go in first, and the run that lets this leave draft is a clean boot of main's packages with a session on the screen and the smoke report from it.

I didn't build the package or the Pixel 7 Pro's images from this branch; the bin/omamobile change reads as safe, with every writing command refusing ram-only.

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.
Preserve the kernel PR review rows, stale-DTB explanation, and pre-boot/reserved-memory stop gate when the package PR is based on derekross#704.
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.
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
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
Record the current UFS, display, GPU, touch and session results, and
the firstboot progress through keyring and identity into services.

Assisted-by: Codex
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 <quatrix1@gmail.com>
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 <quatrix1@gmail.com>
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 <quatrix1@gmail.com>
Move Dipper RAM-only whole-disk checks to derekross#916 so this PR no longer changes the shared Pixel smoke path.

AI assistance: Codex.

Signed-off-by: quatrixone <quatrix1@gmail.com>
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 <quatrix1@gmail.com>
Move the shared smoke, firmware and ram-only handling work into separate reviewable changes.

AI assistance: Codex.

Signed-off-by: quatrixone <quatrix1@gmail.com>
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 <quatrix1@gmail.com>
@quatrixone
quatrixone force-pushed the dipper-device-package branch from 5a8ebb9 to a1bbcb6 Compare November 18, 2026 23:47
Record that the manual EA8074 test used an unpublished kernel while panel driver derekross#218 remains in review.

AI assistance: Codex.

Signed-off-by: quatrixone <quatrix1@gmail.com>
@quatrixone

Copy link
Copy Markdown
Contributor Author

I split the shared changes as requested:

This PR is rebased onto current main and no longer changes those shared files. The 0.1.1 Dipper package built locally; pacman -Qlp lists the expected descriptor, reboot helper, USB, watchdog and storage files. I removed rmtfs as a hard dependency, aligned the README paths, moved the device row with community ports, and recorded that the renderer test used the old userdata install without a recorded kernel. The Dipper boot image builder now carries systemd.firstboot=off; that argument is not yet verified on the phone.

The required device evidence is still outstanding. The host currently sees the Mi 8's NCM/ACM Linux interfaces and an NFS TCP connection; SSH times out and fastboot devices is empty. I have not initiated another NFS boot since your request to pause them, and have issued no UFS write or flash.

Still needed before #714 can leave draft: compare the guarded-rescue device checksums with the 2026-11-09 backup and capture the reset reason; then, once the reset/fallback path is understood, boot the clean current stack and capture a visible session, tools/phone-smoke, phone-side networkctl status usb0, /proc/iomem, and the Hyprland renderer. The persistent install path also remains unreviewed.

@quatrixone
quatrixone force-pushed the dipper-device-package branch from 68e5a3a to e6bd2db Compare November 19, 2026 01:31
@quatrixone

quatrixone commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

I completed the guarded comparison requested in the 11-18 review. A RAM-only rescue boot stayed in initramfs; all six UFS disks and all 84 backed-up partitions reported read-only, with names and sizes matching the 11-09 manifest. Phone-side SHA-256 matched 83/84 raw-source hashes from that backup. Only logfs differed; persist, modemst1, modemst2 and the other 80 matched. The backup and full hashes remain off-repository. The notes now record the intervening Android, older Linux and NFS/old-install boots and the limits of that chronology.

After the manual fastboot entry, the rescue boot exposed /chosen/pureason=0x000800a1 and an empty pstore. That value does not identify the earlier NFS reset. I copied a static reboot-to helper into RAM, returned to fastboot, and confirmed product dipper. I have not run another NFS boot or flashed a partition.

For the fallback gate, I propose building a rescue boot image with no NFS request, an explicit RAM-rescue mode and a built-in reboot-to, then verifying it with fastboot boot. After that, the current boot partition can be backed up and replaced by that tested rescue image, so a reset from a later NFS test lands in a read-only rescue shell instead of the older writable Linux install. A deliberate reboot would verify that fallback before NFS resumes. The matching 11-09 boot image provides a restore source through fastboot. Does this satisfy the fallback requirement, or would you prefer another recovery path? The PR stays draft meanwhile.

Update: that RAM preflight found the shared init's empty-allowlist disk guard left sda at ro=0 while removing its node. I opened #919 to fix this without changing the Pixel allowlist path. A rebuilt image with #919's exact init, no NFS request, RAM-rescue mode and built-in reboot-to has now booted through fastboot boot: all six disks and all 85 partitions reported ro=1, and reboot-to bootloader returned to fastboot. SHA-256: 06a8cc368ce86ae6ba570208d0291c642f143019283dd0a88d99ef2365d746b3. It is still RAM-tested only; nothing has been flashed.

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 <quatrix1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants