fp6-img/aports/device/fp6-vendor-blobs/fp6-vendor-blobs.post-upgrade

10 lines
608 B
Text
Raw Permalink Normal View History

aports: extract vendor blobs before udev coldplug so first-boot audio fully works The preset fix (6ecc1dc) makes the unit run, but multi-user is too late: the sound card probes at ~21 s, hard-fails (-2, no retry) on the missing ACF, and the extractor's amp rebind at ~60 s cannot re-form a card whose machine driver already failed. Re-probing the machine driver does re-form it, but a late-formed card has a dead capture path - the wcd9378 TX sequencer refuses PS0 (act_ps 0x3) until the next boot. So rebinding after the fact can never fully win; extraction has to happen before the drivers probe. - fp6-vendor-blobs.service: DefaultDependencies=no, run after remount-fs and before systemd-udev-trigger, so blobs exist before module coldplug. multi-user stays a second Wants as a post-udev retry if the early run failed (by-partlabel/make-dynpart-mappings fallbacks need udev). - aw88261-acf.manifest: add 'rebind platform sound' so the fallback path at least recovers playback the same boot (capture then heals on reboot). - fp6-vendor-blobs.post-upgrade (pkgrel 1): systemctl preset + immediate extract, so installs of the 2026-08-24 image (unit shipped disabled, no version bump to deliver the preset) finally heal via plain apk upgrade. - soc-fairphone-fp6-audio pkgrel 1: carries the manifest change. Verified on the dev phone with the exact staged bytes (sha256-compared): simulated fresh install (ACF removed, reboot) extracts at 13.3 s, coldplug probes the amps at 15.1 s, card init at 20.9 s loads the ACF cleanly, and a 1 kHz speaker-to-mic loopback passes on that same first boot with zero TX sequencer warnings; next boot takes the all-dests-present fast path in 25 ms. Evidence: fp6 repo journal/blobs/, 2026-08-29. Assisted-by: Claude:claude-fable-5
2026-08-29 21:53:02 +02:00
#!/bin/sh
# Re-apply the preset: images built before the preset file existed (the
# 2026-08-24 image) shipped the unit `disabled; preset: disabled`, so an
# upgrade must enable it or those installs never extract anything. Then
# extract immediately rather than at the next boot (--if-device makes that
# a quiet no-op inside build/CI chroots). A card that already hard-failed
# this boot recovers playback via the manifest's rebind lines; capture
# needs the next boot (journal/blobs/ 2026-08-29).
systemctl preset fp6-vendor-blobs.service 2>/dev/null || :
exec /usr/lib/fp6-vendor-blobs/extract --if-device