Skip to content

Add safe Windows firmware extraction for Snapdragon laptops - #221

Open
birkskyum wants to merge 6 commits into
omacom:masterfrom
birkskyum:upstream/qcom-firmware-extract
Open

Add safe Windows firmware extraction for Snapdragon laptops#221
birkskyum wants to merge 6 commits into
omacom:masterfrom
birkskyum:upstream/qcom-firmware-extract

Conversation

@birkskyum

@birkskyum birkskyum commented Aug 27, 2026

Copy link
Copy Markdown

Summary

  • Reads firmware names from the running device tree and stages signed vendor files from Windows before installation can overwrite it.
  • Installs staged firmware under /usr/lib/firmware/updates.
  • Resolves differing variants only through a unique companion-hash match within the exact device-tree node. Byte-identical duplicates are safe; unresolved variants are skipped.
  • Continues processing other files when one is missing.
  • Includes the board's device-tree-selected GPU zap firmware in the initramfs and rebuilds when that configuration changes, even if no firmware was copied.
  • Uses one firmware resolver matching the kernel's plain, zstd and xz search order. Gzip files do not hide missing loadable firmware.

Why matching matters

The Yoga DriverStore contained multiple cdsp_dtbs.elf variants. The working variant's sibling qccdsp8380.mbn matched the installed companion. Newest-file selection was not reliable, and a different remote processor must not supply that match.

Dependencies and landing

Provenance

Jimmy Van Veen authored the original extractor in JimmayVV/omarchy-pkgs@snapdragon. Birk Skyum added matching and partial-install fixes. Original authorship is preserved.

Validation

  • ARM64 regression tests pass for companion matching, node isolation, missing files, identical/conflicting variants, independent zstd/xz selection, gzip rejection, search precedence and configuration-only rebuilds. These tests now run in the existing CI job.
  • Native ARM64 makepkg --nodeps build of version 1-4 and archive inspection pass. The September 6 pinned integration build also built and published this package with the kernel shim.
  • ShellCheck and whitespace checks pass.
  • Firmware extracted from the Yoga's Windows DriverStore started ADSP and CDSP on the physical machine. This revision's extractor changes have not been redeployed there.

@JimmayVV

JimmayVV commented Aug 27, 2026

Copy link
Copy Markdown

Confirming provenance. qcom-firmware-extract is mine. The companion-hash matching is a real improvement. The "newest wins" rule was only ever tested against one driver store. Thanks for catching it.

JimmayVV and others added 4 commits September 6, 2026 00:48
Copy the vendor-signed Qualcomm firmware named by a Snapdragon laptop device tree from its Windows driver store into /usr/lib/firmware/updates.
@birkskyum
birkskyum force-pushed the upstream/qcom-firmware-extract branch from 2196071 to 040b8e0 Compare September 5, 2026 23:24
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