Skip to content

extract-vendor-firmware: the Pixel 7's video codec firmware - #747

Merged
derekross merged 1 commit into
derekross:mainfrom
angelrenefm:pr/mfc-firmware
Nov 15, 2026
Merged

derekross merged 1 commit into
derekross:mainfrom
angelrenefm:pr/mfc-firmware

Conversation

@angelrenefm

Copy link
Copy Markdown
Contributor

The firmware side of derekross/linux-omarchy-mobile#250 (hardware H.264 decode on the Pixel 7). With -d panther, the tool
also copies /vendor/firmware/mfc_fw.bin to usr/lib/firmware/updates/s5p-mfc-v15.fw, the name mainline's s5p-mfc
requests for the gs201 MFC. Nothing of Google's goes into the repo: as with the Wi-Fi and audio files, each owner
takes it from their own factory image.

The file is the MFC's RISC core firmware, plain and unsigned. The sanity check is that it starts with that core's
vector table (eight ARM branch instructions) and is a whole number of words. The run prints its last word, which is
the version the MFC reports in FW_VERSION once the firmware runs.

Tested:

  • On the Pixel 7 factory image CP3A.261005.002.A1: the staged s5p-mfc-v15.fw is the same file my phone decodes with
    (sha256 766030515ddc53bc…), and the run prints Video codec firmware: s5p-mfc-v15.fw (version 0x44250901),
    the value the MFC reports.
  • On the phone, with only that copy in /usr/lib/firmware/updates (none in /usr/lib/firmware), s5p-mfc from linux-omarchy-mobile#250
    loads it and decodes a 1080p H.264 High stream bit-exact against FFmpeg's software decode (300 frames, ~71 fps).
  • tests/extract-vendor-firmware: 36 ok. Three new checks: a panther run stages the file and reports its version,
    and a firmware without the vector table and a missing mfc_fw.bin are both refused, with the previous outputs left
    as they were. Negative controls: with main's tool, the five new checks fail; with the vector-table check removed,
    its refusal test fails.
  • tools/pr-check and tests/tools-help pass.

Not checked:

  • Cheetah: it has the same SoC, but no MFC node yet, so it is left out.
  • Other factory images than CP3A.261005.002.A1.

I used AI help (Claude) to work on this.

With -d panther, also copy /vendor/firmware/mfc_fw.bin to
s5p-mfc-v15.fw, the name mainline's s5p-mfc requests for the gs201 MFC
(linux-omarchy-mobile#250). It is the MFC's RISC core firmware, plain
and unsigned; the check is that it starts with that core's vector table
(eight ARM branches) and is whole words, and the run reports its last
word, the version the MFC reports in FW_VERSION once it runs.

Tested on the Pixel 7's factory image CP3A.261005.002.A1: the staged
s5p-mfc-v15.fw is the same file the phone decodes with (sha256
766030515ddc53bc...), reports 0x44250901, and with only that copy, in
/usr/lib/firmware/updates on the phone, derekross#250's s5p-mfc decodes a 1080p
H.264 stream bit-exact. tests/extract-vendor-firmware: 36 ok; against
main's tool the five new checks fail, and without the vector table
check its refusal test fails.

Only panther: cheetah has the same SoC, but no MFC node yet.

I used AI help (Claude) to work on this.
@derekross

Copy link
Copy Markdown
Owner

Thank you, this is a clean firmware mapping, and a really good test record: the staged file is the very one your Pixel 7 decodes with, and the version the tool prints is the one the MFC reports.

I checked the name against #250 (s5p-mfc-v15.fw is what its match data asks for), ran tests/extract-vendor-firmware on your head (36 ok), and read the two checks: the vector table and the version word are read the right way round on the machines we build on, and both refusals stop in the staging directory, so an earlier extraction stays as it was. Cheetah's mapping and output don't change.

One small thing for the commit: CONTRIBUTING asks for a Co-Authored-By: trailer when an AI assistant co-wrote a commit, and yours says so in words. If you tell me which assistant and model it was, I'll put the trailer in the squash message; otherwise I'll keep your sentence as it is.

I'll merge it. It does nothing on a phone until #250 lands, which is fine: the file just waits in updates/.

@derekross
derekross merged commit f7ae3a9 into derekross:main Nov 15, 2026
2 checks passed
@angelrenefm

Copy link
Copy Markdown
Contributor Author

Sorry for missing your question, Derek. It was Claude Opus 5.5 (Anthropic). The trailer is
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>. I'll put it on my commits here from now on, as CONTRIBUTING
asks.

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