Repository navigation
omamobile-modem 0.1.8, extract-vendor-chroot: gnssd's custom GNSS library and the CP state it waits for - #141
Conversation
…rary and the CP state it waits for On the 9a gps.cfg sets GlueLayer_IsUseCustomGnssLib, and gnssd dlopen()s libcustomgnss.so, which waits for ONLINE at /sys/bus/platform/devices/cpif/modem_state and then opens RIL's GPS channel through libsitril-gps and libsitril-client. The extractor left all three out, since nothing links them, and the chroot's /sys had only the device path, not its bus link. Neither fixes Kepler's engine-start fault yet.
|
A follow-up that changes how to read G3. With gnssd's debug log on, the 9a's Kepler tracks satellites (four SVs at C/N0 29-35 dB-Hz within about 10 s of the start). The "KEP M7 HARDFAULT" we've been chasing is gnssd's own soft watchdog: after "pos req timeout" and "sw version timeout" it resets Kepler and deliberately triggers a hard fault to get a RAM dump (BLC ID 6, "Try and trigger hard fault to see if CPU is locked up"). The watchdog fires because the CHPP link over the GNSS SPI loses packets. In the raw reads, many frames are shifted one bit late ( |
|
More from tonight's GNSS SPI work (16 boots, all logged in MODEM-PLAN locally):
The palmtop is back on the as-ported setting. |
|
More GPS SPI results from tonight (all module-only tests, each on a fresh boot of the gn3 kernel):
The palmtop is back on the as-ported modules. The details are in MODEM-PLAN.md on #138 (G3, fifth to twenty-fourth tries). |
|
Thanks, this is a tidy fix, and the strace work behind it shows. Finding the dlopen()ed libraries and the bus-path read of I checked:
One thing before I merge: please run the extractor once with this change ( Smaller things, none of them blocking:
I'll merge this first, then #148 on top of it. |
The extractor was run once more with this change on the owner's BP3A factory image: 195 files against the previous 188, nothing removed, every library resolved, nothing new to stub. The seven new paths are the three GNSS libraries and their closure (libbinder, libbinder_ndk, libapexsupport and the Samsung radioExternal NDK library). MODEM-PLAN's G3 section records that, and that an existing 9a chroot gets the libraries only when its owner re-extracts. The second /sys bind is shared by every phone's modem profile. It is harmless on the 7 Pro and the 6 Pro: cbd never looks there.
|
Done. I ran the extractor with this change on my BP3A factory image (on maclab, where the image lives): Everything resolves, nothing to stub beyond the tethering library. New paths against my previous tree (188 files, nothing removed):
libsitril-client pulls libbinder and the radioExternal NDK library, as you expected, and both are in the image. They're only ever dlopen()ed, so with no binder in the chroot they sit there unused. A G3 bullet in MODEM-PLAN records the re-extract note (an existing 9a chroot gets the libraries only when its owner re-extracts), and the commit body of c393e0e says the second /sys bind is harmless on the 7 Pro and the 6 Pro, since cbd never looks there. That is a second commit on the branch rather than an amend (I can't force-push from where I am today); the squash subject stays the first one's. pr-check and the package tests pass. #148 is still stacked on the old head; rebasing it at merge, as you offered, is easiest. The smoke report below is from today's boot. The palmtop runs the branch's profile and lib/ files copied by hand over omamobile-modem 0.1.4 (the chroot tree is the one above), with the modem brought up and ONLINE this morning for the watcher count on #148. phone-smoke: teguKernel
Packages: hyprland 0.56.2-5.1, libcamera 0.7.2-4.22, mesa 1:26.2.4-1.4, omacam 0.3.3-1, omamobile-apps 0.2.0-1, omamobile-audio 0.4.1-1, omamobile-device-tegu 0.2.0-1, omamobile-fingerprint 0.1.8-1, omamobile-firstboot 0.1.0-1, omamobile-gnss 0.2.1-1, omamobile-keyring 20261013-1, omamobile-mirror 0.1.1-1, omamobile-modem 0.1.4-1, omamobile-omarchy 0.1.12-1, omamobile-owl-widgets 0.1.1-1, omamobile-sensors 0.2.1-1, omamobile-shell 0.2.36-1, omarchy 4.0.6-1 |
|
Thanks, that's everything I asked for. The extractor run is exactly what I wanted to see. All 195 files resolve, and the seven new paths are the three libraries plus the binder closure we expected (libbinder, libbinder_ndk, libapexsupport and the radioExternal NDK library). Nothing new needs a stub. The G3 note about re-extracting, the commit body on the shared I re-checked on the new head:
One small thing for later, not for this PR. Once #153 merges, this G3 bullet (dated 10-28) will sit inside the "second try (10-27)" section, and #153 has its own "Missing libraries" bullet under the fifth to eighth tries. Folding the two into one place in a later docs commit would keep G3 easy to follow. I'm happy to do that myself if you'd rather not. I'll merge this now, then rebase #148 onto it as offered. |
device/tegu/MODEM-PLAN.md conflicted on the status line: this branch's file already carries everything derekross#138 added. It is resolved to this branch's file, plus the "gnssd's custom GNSS library (2026-10-28, omamobile-modem 0.1.8)" bullet that derekross#141 added on main, which this branch never had and a plain checkout of its file would have dropped.
…rary and the CP state it waits for (derekross#141) * omamobile-modem 0.1.8, extract-vendor-chroot: gnssd's custom GNSS library and the CP state it waits for On the 9a gps.cfg sets GlueLayer_IsUseCustomGnssLib, and gnssd dlopen()s libcustomgnss.so, which waits for ONLINE at /sys/bus/platform/devices/cpif/modem_state and then opens RIL's GPS channel through libsitril-gps and libsitril-client. The extractor left all three out, since nothing links them, and the chroot's /sys had only the device path, not its bus link. Neither fixes Kepler's engine-start fault yet. * omamobile-modem 0.1.8: the extractor re-run, and the shared /sys bind The extractor was run once more with this change on the owner's BP3A factory image: 195 files against the previous 188, nothing removed, every library resolved, nothing new to stub. The seven new paths are the three GNSS libraries and their closure (libbinder, libbinder_ndk, libapexsupport and the Samsung radioExternal NDK library). MODEM-PLAN's G3 section records that, and that an existing 9a chroot gets the libraries only when its owner re-extracts. The second /sys bind is shared by every phone's modem profile. It is harmless on the 7 Pro and the 6 Pro: cbd never looks there.
Two gaps in the 9a's modem chroot that I found tonight with an
straceof gnssd. They don't cure the GPS fault yet, but stock has both.GlueLayer_IsUseCustomGnssLib=1, and gnssddlopen()s/vendor/lib64/libcustomgnss.so(ENOENT in the trace). That library waits for the CP to be ONLINE, thendlopen()slibsitril-gps.so, which useslibsitril-client.so(RIL's GPS channel, over binder to the radioExternal HAL). Stock's vendor image has all three. The extractor never copied them because nothing links them. They're nowVENDOR_LIBSin the tegu modem profile, so they come with their closure./sys/bus/platform/devices/cpif/modem_state, but the chroot's/sysonly binds/sys/devices/platform/cpif. So it logged an empty state ("Modem state online overtime") until it gave up. The profile now binds the same device at its bus path, read-only.Tested on the palmtop (
7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty, on the charger, the libraries copied by hand from the BP3A vendor image). libcustomgnss now logs "Modem state ONLINE".GpsOpen()still fails, because there's no radioExternal HAL in the chroot (no binder). Kepler still faults at every engine start: 9 times in 4 minutes, the sameKEP M7 HARDFAULT ... LR,PC 600B5B39 0000062C. Turning DVS/DFS off through gnssd'sgps_overlay.confdidn't help either. The full write-up goes into MODEM-PLAN's G3 after #138, which edits the same section. I haven't re-run the extractor on a factory image with this change.packages/omamobile-modem/test/allandtools/pr-checkpass.