Skip to content

device/enchilada: OnePlus 6 descriptor, notes and a WIP matrix row (#432) - #445

Merged
derekross merged 1 commit into
derekross:mainfrom
matthewjaybarr-png:enchilada-device-notes
Nov 8, 2026
Merged

derekross merged 1 commit into
derekross:mainfrom
matthewjaybarr-png:enchilada-device-notes

Conversation

@matthewjaybarr-png

@matthewjaybarr-png matthewjaybarr-png commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

What and why

The first pull request for the OnePlus 6 (enchilada, SDM845), as suggested on #432: device/enchilada/device.conf, device/enchilada/NOTES.md, and a WIP row in docs/DEVICES.md (matrix + Wanted). I'm opening it before the stock-restore plan because it writes nothing to any phone. If you'd rather it wait for that plan, I'm happy to hold it.

  • Descriptor: BOOT_METHOD=android-v0 (header v0, gzip kernel with the DTB appended). No packer in this tree makes that image yet, so images, flash, push and both installer modes refuse it before touching a phone. tests/boot-method now includes android-v0 in its refused list and checks the shipped enchilada descriptor too, like flame's. The header-v0 packer (taking the header version as an input, so coral can reuse it) follows in its own PR, and so does the LUN-aware UFS_RW.
  • NOTES: what is on each slot today, how it got there (every write made by hand outside the installer, listed, not to be repeated), the slot flags, and which guard each slot's init runs (stock is not on slot A: a §3.1 event). Also the complete backup, the RAM-only first light, the stock facts as quoted facts (no captures), and two findings: ufw needs six netfilter matches the first-light kernel left out (already in omamobile.config), and the Adreno 630 needs a zap shader signed for this phone.
  • Matrix: only what ran on this phone. Everything else is no.

Device and build

  • Phone: OnePlus 6 (enchilada)
  • Kernel release (uname -r): 7.1.0-rc1-sdm845 (sdm845-mainline tag sdm845-7.1-rc1-r0 + six netfilter matches; see NOTES)
  • Packages changed, with versions: none

Checks (no phone needed)

  • tools/pr-check origin/main passes
  • tests/all passes
  • tests/packages: no packages touched
  • Each changed package has its version bumped: n/a
  • Commits have area prefixes and bodies that say why; AI help is a Co-Authored-By: trailer, never a Signed-off-by:

On the phone

  • The results in NOTES ran on my own phone. Each entry names its boot path: the first light and the firewall fix/Adreno results were fastboot boot (RAM); the firewall failure was seen booting boot_b. Since the OnePlus 6 (enchilada, SDM845) port: RAM-only first light, contributors welcome #432 reply the phone has been RAM-only (one fastboot boot, the read-only backup and getvar)
  • Runbook steps: n/a. This PR adds a descriptor and notes, and the tools refuse the descriptor's boot method
  • What I did not test: tools/phone-smoke was not run. The phone is RAM-only and this change adds nothing that runs on it. linux-omarchy-mobile has not been tried yet.
  • Nothing in this change writes outside slot B and userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)

🤖 Generated with Claude Code

@derekross

Copy link
Copy Markdown
Owner

Thank you, @matthewjaybarr-png. This is a careful first PR: the descriptor can't do anything yet (every command refuses android-v0 before it touches a phone), the notes quote facts rather than captures, and you wrote down the slot history plainly, which is exactly what I asked for. I checked the tag you cite (sdm845-7.1-rc1-r0 is 85f1df2a4ec7), and our kernel's enchilada DTS names the same zap shader path you found, so that finding carries over directly. tools/pr-check and tests/boot-method pass here. The PR also merges cleanly with today's DEVICES.md update (#474). I've approved the CI run. It was waiting because this is your first PR here.

Three changes before I merge, all in the text:

  1. Say how each result was booted. The firewall entry (firstboot finishing, ufw status, SSH blocked for about 100 s on the first boot) and the Adreno entry (the compositor not starting) both come from the Arch root on userdata. The descriptor's command line has omamobile.initramfs, which keeps the init in the initramfs, so those runs must have used a different one. Together with boot_b being re-flashed on 11-05, it looks as if they ran from slot B. The commit message, the PR description and the matrix all say everything ran from fastboot boot, though. Could you give each dated entry its boot path (fastboot boot or boot_b, initramfs or userdata), and fix the commit message to match? It becomes the squash message.
  2. Name the kernel in the matrix row. As I said on OnePlus 6 (enchilada, SDM845) port: RAM-only first light, contributors welcome #432, the matrix should say which kernel each result came from: here Linux 7.1-rc1 from the sdm845 tree, not linux-omarchy-mobile. Putting it in the Boot cell is enough. Please also link the first-light entry from the Display and USB net cells.
  3. In the slot section, list every write made by hand. The table has them, but as plain history. Please add a sentence saying that fastboot flash userdata, fastboot flash boot_b, fastboot erase dtbo_b and --set-active (which writes the partition table's slot flags on this phone) were done by hand, outside install-phone and bin/omamobile, before my reply, and won't be repeated. Please also record the current slot flags for both slots (slot-successful, slot-unbootable, slot-retry-count from getvar), so the restore starts from a recorded state.

A few smaller things, none blocking:

  • The rescue on slot A: which allowlist does its init pack, is it the shared initramfs/init unchanged, and is system_a mounted read-write while it runs? Your backup note suggests it is.
  • One line on what the initramfs's no-USB-host panic does here would help. On a fastboot boot it reboots into the active slot, which is slot A today.
  • In tests/boot-method, a check of the shipped enchilada descriptor, like the one for flame, would test the real file. The new android-v0 entry passes for the same reason unknown does.
  • FASTBOOT_PRODUCT=sdm845 is the SoC's generic name. Nothing reads it yet, but the installer will need something more specific to recognise this phone.
  • In the slot table, vendor and odm would be clearer with their slots (vendor_a/vendor_b and so on).

I'll answer the stock-restore plan on #432 separately. Thanks again. This is a solid start for our first SDM845 phone.

@matthewjaybarr-png

Copy link
Copy Markdown
Contributor Author

Thanks, Derek. All three are done, and the smaller items too. Pushed as one amended commit.

1. Boot path per entry, and the commit message. Part of it did run from slot B, and the notes now say which part. Every entry names its boot path and where its root was:

  • First light (11-04): fastboot boot, stayed in the initramfs (omamobile.initramfs).
  • Firewall failure: seen booting boot_b after --set-active=b (first-light kernel, root on userdata), on 11-04 and again on 11-05 at 15:41 Eastern.
  • Firewall fix and Adreno (11-05 16:35 Eastern): a fastboot boot of the netfilter kernel's boot_b image, with slot A still active. The root was the Arch root on userdata, because that image's command line has no omamobile.initramfs.

The intro now names both builds: the first-light kernel, and the same tree plus the six matches. The commit message (the squash message) says the same and no longer claims everything ran from fastboot boot.

2. Matrix row. The Boot cell names the kernel: Linux 7.1-rc1 from the sdm845-mainline tree, not linux-omarchy-mobile. Display and USB net now link to the first-light entry.

3. Hand writes and slot flags. The slot section now lists every write I made by hand, outside tools/install-phone and bin/omamobile, and says none will be repeated:

  • flash boot_a/system_a (the rescue), erase dtbo_b, flash userdata, flash boot_b twice, and --set-active.
  • What the rescue wrote into userdata: the GPT-trap repair on 11-04, and on 11-05 firmware, the device package, a module tree and ufw enabled.
  • systemd-pstore on system_a.

I have to correct one thing in my #432 reply. I wrote that this all came before your reply, but the timestamps say otherwise. Your reply was posted at 21:13 UTC. The second flash boot_b, the --set-active=a and the package install ran from 21:15 to about 21:20 UTC, before I had read it. NOTES says so. The slot flags table has the 11-04 reading from before any write and today's (11-07): current slot A; A not successful, not unbootable, retry 5; B not successful, not unbootable, retry 7. B lost the successful mark it had from the third-party build (--set-active=b clears it), and A's retry count dropped from 6 to 5.

Smaller items:

  • The rescue: answering this showed the table was wrong, and it's fixed. The rescue does not run the shared init. It has no initramfs, the kernel mounts system_a from ABL's root=, and system_a is mounted read-write. Its own udev rule allows four partitions to be writable (system_a, userdata, boot_b, dtbo_b), sets ro=1 on everything else, and keeps the whole-disk nodes. That protects against accidents only, and it goes away with the restore.
  • No-USB-host panic: added. The init gives up after 20 s, panic=10 reboots, and ABL boots the active slot, A (the rescue).
  • tests/boot-method: the shipped enchilada descriptor is now refused by images/flash/push and both installer modes, with no phone call and no work dir, like flame's.
  • FASTBOOT_PRODUCT=sdm845: noted in device.conf and NOTES as the SoC's name, which never identifies this phone alone. Nothing in the tree reads it today.
  • Slot table: vendor_a/vendor_b, odm_a/odm_b.

tests/all and tools/pr-check origin/main pass.

@derekross

Copy link
Copy Markdown
Owner

Thank you, @matthewjaybarr-png. This is a model §3.1 record: every entry says how it booted, every write by hand is listed, including the ones after my reply with their exact minutes, and the slot flags are on file from before and now. The two boot paths also explain the one thing I couldn't square last time, so thank you for digging that out rather than smoothing it over. The kernel in the Boot cell, the rescue's own guard described plainly, and the shipped descriptor in tests/boot-method are all just right.

One small change before I merge, because of what we settled on #432 since you pushed: the new row under "Wanted" in docs/DEVICES.md still says the port stays RAM-only "until stock is back on slot A under an approved plan". There won't be an approved plan, and you've decided not to restore stock, so could it say what your device.conf says: RAM-only until slot B's install and its CONTRIBUTING §3.1 entry are agreed? The "Until then" at the end of the first paragraph of the slot section in NOTES reads the same way now, so the same clause there please.

A question I'd like recorded, not blocking: slot A is unmarked, and its retry count went from 6 to 5. If I read Qualcomm's bootloader right, --set-active=a reset it to 7 on the 5th, and each boot of the rescue since has spent one try, including the reboot after a fastboot boot panics with no USB host. At zero the bootloader would switch to slot B, then run B's tries down too, and with nothing allowed to mark a slot, the phone would end up in fastboot needing a --set-active to get back. If that matches what you see (one more getvar after a rescue boot would tell), a sentence in the notes and keeping rescue reboots few would avoid a surprise later.

Optional: the Boot cell could say the firewall and GPU results booted the Arch root on userdata, so the row matches the notes exactly.

CI is waiting for my approval again after the push; I'll approve it.

The OnePlus 6 (SDM845) is the first Snapdragon 845 phone here, claimed
in derekross#432. This adds what the maintainer asked for as its first pull
request: the descriptor, the notes, and a WIP row in docs/DEVICES.md.

The descriptor sets BOOT_METHOD=android-v0 (header v0, gzip kernel with
the DTB appended). No packer in this tree makes that image yet, so
images, flash, push and the installer all refuse it before touching a
phone; tests/boot-method checks that for any android-v0 descriptor and
for the shipped enchilada one. The header-v0 packer and a LUN-aware
UFS_RW come as separate pull requests.

The notes record what is on each slot today and how it got there
(stock is not on slot A, a CONTRIBUTING.md 3.1 event), including every
write made by hand outside the installer, which will not be repeated,
and the slot flags. Also the complete backup, the RAM-only first light,
and two findings: ufw needs six netfilter matches the first-light
kernel left out, and the Adreno 630 needs a zap shader signed for this
phone.

Tested: tests/all passes. On the phone, with Linux 7.1.0-rc1-sdm845
from the sdm845-mainline tree, not linux-omarchy-mobile: the first
light was a fastboot boot that stayed in the initramfs; the firewall
failure was seen booting boot_b with the root on userdata; the firewall
fix and the Adreno result came from a fastboot boot of the boot_b image
with the root on userdata. Each NOTES entry names its boot path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@matthewjaybarr-png

Copy link
Copy Markdown
Contributor Author

Thanks, Derek. Done, in the same amended commit:

  • Wanted row in docs/DEVICES.md: RAM-only until the slot-B install and its CONTRIBUTING.md §3.1 entry are agreed, the same as device.conf.
  • NOTES, slot section: the same clause, plus that I've decided not to restore stock, so slot A keeps the rescue.
  • Boot cell (optional item): it now says the firewall and GPU results booted the Arch root on userdata.

Slot A's retry count: I've added your reading to the slot-flags section as unconfirmed. If --set-active=a reset A to 7 on the 5th, the rescue boots since (including the reboot after a no-USB panic) would explain 5. At 0 ABL would fall to slot B, and with nothing allowed to mark a slot, the phone would end up in fastboot needing a --set-active. I haven't booted the phone since this morning's getvar (it went into fastboot by the buttons, not through the rescue), so I can't confirm it yet. The next time the rescue boots I'll take one getvar and add the result. Until then I'm keeping rescue boots few.

#432: understood about the CONTRIBUTING §3.1 entry for marking slot B. It will be its own pull request, with the LUN, the four sectors, the attribute bit, the CRCs, the slot flags before and after, a rollback for a corrupted table, and my written acceptance that slot A holds the rescue rather than stock. The LUN-aware UFS_RW will keep the Pixels unchanged, with new tests/storage-guard cases for boot partitions on another LUN.

tests/all and tools/pr-check origin/main pass.

@derekross

Copy link
Copy Markdown
Owner

@matthewjaybarr-png thank you. Everything from both of my reviews is in, and
the notes now say plainly what we settled on #432: restoring stock isn't done
through the project, it would be your own step with OnePlus's images and
recorded there, and you've chosen to keep the rescue on slot A. I re-ran the
boot-method test on your branch merged with today's main, and also asked
bin/omamobile to load the descriptor directly: both refuse android-v0
before touching anything, as the notes say.

I'm merging this now. Two small things for whenever you next touch these
files, neither blocking:

And please post the getvar after the next rescue boot on #432 when you have
it. Thanks for a first port that's this careful about its own history.

@derekross
derekross merged commit e8d453e into derekross:main Nov 8, 2026
2 checks passed
derekross pushed a commit that referenced this pull request Nov 8, 2026
The OnePlus 6 (enchilada) ABL boots an Android boot image header v0:
a gzip kernel with the DTB appended, no dtbo and no vendor_boot. Until
now nothing in the tree could make one, so every path refused
BOOT_METHOD=android-v0 and the port's first-light image was built by
hand.

load_device now accepts android-v0 with its own required keys and the
six header fields (PAGESIZE, BASE and the offsets), checked as numbers;
BOOT_IMAGES must be boot alone and boot_b must be on UFS_RW. images
packs boot.img with the pinned mkbootimg.py: gzip -9n of Image with the
(overlaid) DTB appended, the shared initramfs as the ramdisk, CMDLINE
and the descriptor's offsets. mkdtboimg is only required for android-v4.

The port stays RAM-only: fastboot, flash and push refuse android-v0 and
point at `fastboot boot`, and the installer still refuses the method,
until the slot-B install and its CONTRIBUTING.md 3.1 entry are agreed.

Also in device/enchilada/NOTES.md and docs/DEVICES.md, from review on
#445 and #432: link the maintainer's decision on restoring stock; say
the firewall failure booted from boot_b after --set-active=b; and drop
the guess that each rescue boot spends one of slot A's tries (after one
more rescue boot A was still at 5 and B at 7).

Tested: tests/boot-method (enchilada images reach the kernel check;
fastboot, flash, push and both installer modes refuse; bad header
fields refused; no phone access) and tests/images-layout, which gains
an android-v0 layout test (one boot.img, header v0, page size and load
addresses, kernel = gzip Image + DTB, ramdisk = initramfs,
deterministic) while the gs201/gs101 baseline still matches 1e7a998
byte for byte.
Against the 7.1.0-rc1-sdm845 build used for first light on 2026-11-04,
images gives a boot.img byte-identical to the one that was booted then
with `fastboot boot` (sha256 78d7bd1a...0d98c). Nothing was sent to the
phone for this change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…erekross#445)

The OnePlus 6 (SDM845) is the first Snapdragon 845 phone here, claimed
in derekross#432. This adds what the maintainer asked for as its first pull
request: the descriptor, the notes, and a WIP row in docs/DEVICES.md.

The descriptor sets BOOT_METHOD=android-v0 (header v0, gzip kernel with
the DTB appended). No packer in this tree makes that image yet, so
images, flash, push and the installer all refuse it before touching a
phone; tests/boot-method checks that for any android-v0 descriptor and
for the shipped enchilada one. The header-v0 packer and a LUN-aware
UFS_RW come as separate pull requests.

The notes record what is on each slot today and how it got there
(stock is not on slot A, a CONTRIBUTING.md 3.1 event), including every
write made by hand outside the installer, which will not be repeated,
and the slot flags. Also the complete backup, the RAM-only first light,
and two findings: ufw needs six netfilter matches the first-light
kernel left out, and the Adreno 630 needs a zap shader signed for this
phone.

Tested: tests/all passes. On the phone, with Linux 7.1.0-rc1-sdm845
from the sdm845-mainline tree, not linux-omarchy-mobile: the first
light was a fastboot boot that stayed in the initramfs; the firewall
failure was seen booting boot_b with the root on userdata; the firewall
fix and the Adreno result came from a fastboot boot of the boot_b image
with the root on userdata. Each NOTES entry names its boot path.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
The OnePlus 6 (enchilada) ABL boots an Android boot image header v0:
a gzip kernel with the DTB appended, no dtbo and no vendor_boot. Until
now nothing in the tree could make one, so every path refused
BOOT_METHOD=android-v0 and the port's first-light image was built by
hand.

load_device now accepts android-v0 with its own required keys and the
six header fields (PAGESIZE, BASE and the offsets), checked as numbers;
BOOT_IMAGES must be boot alone and boot_b must be on UFS_RW. images
packs boot.img with the pinned mkbootimg.py: gzip -9n of Image with the
(overlaid) DTB appended, the shared initramfs as the ramdisk, CMDLINE
and the descriptor's offsets. mkdtboimg is only required for android-v4.

The port stays RAM-only: fastboot, flash and push refuse android-v0 and
point at `fastboot boot`, and the installer still refuses the method,
until the slot-B install and its CONTRIBUTING.md 3.1 entry are agreed.

Also in device/enchilada/NOTES.md and docs/DEVICES.md, from review on
derekross#445 and derekross#432: link the maintainer's decision on restoring stock; say
the firewall failure booted from boot_b after --set-active=b; and drop
the guess that each rescue boot spends one of slot A's tries (after one
more rescue boot A was still at 5 and B at 7).

Tested: tests/boot-method (enchilada images reach the kernel check;
fastboot, flash, push and both installer modes refuse; bad header
fields refused; no phone access) and tests/images-layout, which gains
an android-v0 layout test (one boot.img, header v0, page size and load
addresses, kernel = gzip Image + DTB, ramdisk = initramfs,
deterministic) while the gs201/gs101 baseline still matches 45e7109
byte for byte.
Against the 7.1.0-rc1-sdm845 build used for first light on 2026-11-04,
images gives a boot.img byte-identical to the one that was booted then
with `fastboot boot` (sha256 78d7bd1a...0d98c). Nothing was sent to the
phone for this change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.

2 participants