mirror of
https://github.com/Zagitta/gpu-unlock.git
synced 2026-12-03 19:44:49 +07:00
[PR #224] firmware: accept NvU64-word bindata arrays (615.71 codegen) in extract_boot_assets #239
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Zagitta/gpu-unlock#239
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Zagitta/gpu-unlock/pull/224
Author: @rahul05ranjan
Created: 10/27/2026
Status: 🔄 Open
Base:
main← Head:extract-u64-codegen📝 Commits (2)
cc48855firmware: accept NvU64-word bindata arrays from 615.71 codegen6afd57ctests: cover both bindata codegen styles in extract_boot_assets📊 Changes
2 files changed (+154 additions, -3 deletions)
View changed files
📝
firmware/extract_boot_assets.py(+18 -3)➕
tests/firmware/test_extract_boot_assets.py(+136 -0)📄 Description
Problem
firmware/extract_boot_assets.pyonly understands the bindata codegen of the pinned 610.43.03 tree: one0xNNbyte token per array element. As documented in #168, the generated sources of newer drivers (615.71.10) changed:NV_DECLARE_ALIGNED(NvU64, 8)with0x........ULLword tokens, which the byte-token check rejects withnon-byte token in generated array;COMPRESSED SIZE (bytes)/DATA SIZE (bytes)declared in the surrounding comment, and the exact-length check fails withcompressed storage size mismatch.So the same tool cannot rebuild the boot assets from a 615.71.10 tree without hand-editing.
Change
_array_bytes()now accepts both token styles:NvU64tokens (0x..ULL, 1..16 hex digits) decode withstruct.pack("<Q", ...)as in #168;Nothing else in the extraction pipeline changed.
Verification
make inputsfetches): extracted all 10 boot assets with both HEAD and this patch; SHA-256 of every output is identical (no regression).tests/firmware/test_extract_boot_assets.py(stdlib only,python3 tests/firmware/test_extract_boot_assets.py): byte-style and u64-style fixtures, compressed and uncompressed, padding truncated when zero and rejected when non-zero, mixed/oversized tokens and short arrays still rejected. It passes with this patch; on HEAD it fails at the first u64 case withnon-byte token in generated array.make firmwareafter repointingNV.Fixes #168
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.