Skip to content

omamobile-modem 0.1.28: the modem keeps modem_a; SLOT=a in boot-update.conf holds it to a boot from slot A (ACTIVE-SLOT-PLAN §7 step 5) - #850

Draft
derekross wants to merge 4 commits into
mainfrom
active-slot-modem
Draft

derekross wants to merge 4 commits into
mainfrom
active-slot-modem

Conversation

@derekross

Copy link
Copy Markdown
Owner

Step 5 of ACTIVE-SLOT-PLAN §7, split out of #847 in review. Draft, not for merge yet. Step 5 only gates accepting b in INSTALL_ACTIVE_SLOTS, and nothing needs it before then. Nothing here was run on a phone.

No phone changes today. The modem slot is keyed on an explicit format-2 signal, a SLOT= line in /etc/omamobile/boot-update.conf:

  • No line (every phone so far, all slot-B installs): modem_a, exactly as today, and nothing else is read.
  • SLOT=a|b: that slot's image, and only while the boot runs from it. The running slot is read from androidboot.slot_suffix the way the storage guard reads it: bootconfig alone if it carries the key, otherwise the command line.
  • Unknown, so profile_check refuses: a SLOT= naming a slot the phone didn't boot from, two SLOT= lines, or any other value.

What changes:

  • Modem image: the RAM copy, the by-name/modem<slot> and by-name/modem binds, and cbd -P by-name/modem<slot>.
  • Properties: ro.boot.slot_suffix and vendor.cbd.partition are written into the property store after props.conf, which no longer fixes them. If a per-phone value names the other slot, the profile stops.
  • NV overlay binding: the modem line is now bound by role. It is hashed under modem_a.img, the name it has always had, whatever partition it came from. Today's binding hash is unchanged, and the same modem image binds the same way on either slot.

Tests (offline; packages/omamobile-modem/test/all passes, and so does tools/pr-check origin/main):

  • Slot rule: no SLOT= while booted from B gives modem_a; SLOT=a on A and SLOT=b on B give their own slot; SLOT=a on B, no slot named, two lines, SLOT=c, an empty bootconfig value and disagreeing values are all unknown.
  • Properties: the bytes are the same on _a.
  • Binding:
    • With no SLOT=, it equals the old five-image formula whether the boot is from A or B, and it is unchanged with SLOT=a.
    • With SLOT=b and a different modem_b line, the overlay is set aside; when modem_b's line is the same as modem_a's, the binding is the same as on A.
    • A SLOT= naming a slot the phone didn't boot from fails.

🤖 Generated with Claude Code

…conf, else modem_a

The profile uses modem_a whatever slot boots (props.conf's
ro.boot.slot_suffix and vendor.cbd.partition, the RAM copy, its by-name
binds, cbd's -P and the NV overlay's binding). Every phone so far is a
slot-B install whose modem runs from modem_a, and that must not change:
reading the slot from the boot would move them all to modem_b, set the
7 Pro's NV overlay aside and could start slot B's older radio image.

So the slot is keyed on the explicit format-2 signal: with no SLOT= line
in /etc/omamobile/boot-update.conf the profile uses modem_a and reads
nothing else, exactly as today. With SLOT=a|b (a release installed on the
slot it ran from, docs/ACTIVE-SLOT-PLAN.md §2, §4) it uses that slot's
image, and only while the boot runs from it (androidboot.slot_suffix:
bootconfig alone when it carries the key, else the command line, as the
storage guard reads it); a SLOT= the boot isn't from, two SLOT= lines or
another value is unknown and profile_check refuses.

profile_setup copies and checks modem<slot>, binds it as
by-name/modem<slot> and by-name/modem, and writes ro.boot.slot_suffix and
vendor.cbd.partition into the property store after props.conf (which no
longer fixes them); a per-phone value naming the other slot stops the
profile. cbd boots -P by-name/modem<slot>. The NV overlay binds the modem
image's checksum line by role (hashed as modem_a.img, the name it always
had, whichever partition it came from), so today's binding hash is
unchanged and the same modem image binds alike on either slot.

Without SLOT=, the same five images are copied, with the same binds, cbd
arguments, property bytes and overlay binding as before; the tests check
the binding against the old formula with the boot on either slot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
derekross added a commit that referenced this pull request Nov 16, 2026
…ne-smoke: the storage guard and updates follow the running slot (ACTIVE-SLOT-PLAN §7 steps 2-4)

The storage guard opens the running slot's five boot images and userdata (bootconfig's androidboot.slot_suffix, failing closed), with a marker packed into the initramfs; omamobile-boot-update 0.2.0 writes only <image>_$SLOT (SLOT= in boot-update.conf, default b, refused unless the phone runs from it); omamobile-omarchy 0.1.48 reads SLOT=; phone-smoke follows the slot; push requires slot B and flash takes --from-slot-a for developers. Slot B's behaviour is unchanged. ACTIVE-SLOT-PLAN §7 steps 2-4; the modem step is #850.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the same way twice

SLOT=b in boot-update.conf moved the modem to modem_b, but
omamobile-boot-update treats SLOT=b as its default, the same as no line,
so adding the documented default to a slot-B phone would have paired the
firmware with an older radio image and set the NV overlay aside. SLOT=b
now reads nothing else and gives modem_a, like no line. SLOT=a (a
format-2 install on slot A) still gives modem_a only on a boot from
slot A. Nothing selects modem_b until a slot-B install has a signal of
its own (ACTIVE-SLOT-PLAN §4, which now describes what was built).

The rule is in the profile (shell) and the NV overlay (Python), and the
two differed on a CRLF line, a CR in bootconfig and non-UTF-8 bytes, where
the Python side also raised an uncaught error. Both now read bytes and
split on \n only, a boot-update.conf that is there but can't be read is
unknown in both, and test/all feeds one table of 31 inputs to both
readers.

The version moves to 0.1.28: #863 keeps 0.1.27.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@derekross derekross changed the title omamobile-modem 0.1.27: the modem image follows SLOT= in boot-update.conf, else modem_a (ACTIVE-SLOT-PLAN §7 step 5) omamobile-modem 0.1.28: the modem keeps modem_a; SLOT=a in boot-update.conf holds it to a boot from slot A (ACTIVE-SLOT-PLAN §7 step 5) Nov 18, 2026
@derekross

Copy link
Copy Markdown
Owner Author

Pushed 32d3eeb after the round 60 review of this draft:

  • SLOT=b is now the absent line (as omamobile-boot-update documents it): modem_a, nothing else read, the overlay's binding unchanged. SLOT=a gives modem_a only on a boot from slot A. Nothing selects modem_b until a slot-B install has a signal of its own.
  • The shell and Python readers agree: both read bytes and split on \n only; a boot-update.conf that is there but can't be read is unknown in both; test/all feeds one table of 31 inputs to both (it fails against the previous Python reader).
  • Version 0.1.28, since omamobile-modem 0.1.27: give gnssd the SIT RIL GPS stub on the Pixel 9a #863 keeps 0.1.27. The two still conflict in profiles/modem.conf (keep both new blocks) once one of them lands.
  • ACTIVE-SLOT-PLAN §4, R6's Pass line and §7 step 5 say what was built.

Still open before this leaves draft: one attended boot on the Pixel 7 Pro (five "RAM copy matches the backup" lines, cbd … -P by-name/modem_a, ONLINE, the NV overlay not set aside).

…h new profile functions kept, version 0.1.28

Co-Authored-By: Claude Fable 5.2 <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.

1 participant