Skip to content

xdna: source NPU firmware from Ubuntu linux-firmware deb#85

Open
poad42 wants to merge 2 commits into
AMDResearch:mainfrom
poad42:xdna-npu-firmware-deb
Open

xdna: source NPU firmware from Ubuntu linux-firmware deb#85
poad42 wants to merge 2 commits into
AMDResearch:mainfrom
poad42:xdna-npu-firmware-deb

Conversation

@poad42

@poad42 poad42 commented Jun 5, 2026

Copy link
Copy Markdown
Member

Stop fetching NPU firmware from AMD-hosted repo.radeon.com URLs and source the .sbin blobs exclusively from Ubuntu's linux-firmware package (stable, distro-mirrored URLs):

  • add extract_npu_firmware.sh to pull the amdnpu .sbin blobs out of the linux-firmware deb
  • Dockerfile: run extract_npu_firmware.sh so the firmware is baked into the image, and replace the driver's download_npufws() with an empty stub so the build never reaches repo.radeon.com (download_vtd_archives, used for the xrt-smi validate data, is left intact)
  • README: document installing the firmware on the host (the kernel driver loads it from the host's /lib/firmware/amdnpu)
  • add .gitattributes to force LF on *.sh (CRLF breaks the shebang of extract_npu_firmware.sh when COPYed into the container)

poad42 and others added 2 commits June 5, 2026 16:31
Stop fetching NPU firmware from AMD-hosted repo.radeon.com URLs and source
the .sbin blobs exclusively from Ubuntu's linux-firmware package (stable,
distro-mirrored URLs):

- add extract_npu_firmware.sh to pull the amdnpu .sbin blobs out of the
  linux-firmware deb
- Dockerfile: run extract_npu_firmware.sh so the firmware is baked into the
  image, and replace the driver's download_npufws() with an empty stub so the
  build never reaches repo.radeon.com (download_vtd_archives, used for the
  xrt-smi validate data, is left intact)
- README: document installing the firmware on the host (the kernel driver
  loads it from the host's /lib/firmware/amdnpu)
- add .gitattributes to force LF on *.sh (CRLF breaks the shebang of
  extract_npu_firmware.sh when COPYed into the container)

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the inline comment to a short description of the line and move the
rationale here.

The driver's download_npufws() fetches the NPU .sbin firmware from AMD-hosted
repo.radeon.com URLs, which are version-specific and prone to breakage. We
replace it with an empty stub via sed so the build never reaches
repo.radeon.com; the firmware instead comes exclusively from Ubuntu's
linux-firmware deb (extract_npu_firmware.sh). download_vtd_archives, which
fetches the data used by xrt-smi validate, is intentionally left intact.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant