arch: split amdxdna-driver into separate package with DKMS support#1354
Open
kashif wants to merge 3 commits into
Open
arch: split amdxdna-driver into separate package with DKMS support#1354kashif wants to merge 3 commits into
kashif wants to merge 3 commits into
Conversation
Contributor
kashif
commented
May 23, 2026
- Add PKGBUILD-amdxdna-driver for kernel module via DKMS
- Add PKGBUILD-xrt-plugin-amdxdna for XRT plugin
- Remove old PKGBUILD-xrt-plugin (merged into new split packages)
- Update README with new package names and install order
- Simplify install script to match AUR conventions
- Add curl/wget compatibility in build.sh for downloads
- Add PKGBUILD-amdxdna-driver for kernel module via DKMS - Add PKGBUILD-xrt-plugin-amdxdna for XRT plugin - Remove old PKGBUILD-xrt-plugin (merged into new split packages) - Update README with new package names and install order - Simplify install script to match AUR conventions - Add curl/wget compatibility in build.sh for downloads
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR improves build portability and refactors Arch Linux packaging by splitting the XDNA DKMS driver and XRT plugin into separate packages.
Changes:
- Add a
download_url()helper to support eitherwgetorcurlduring artifact downloads. - Replace the single Arch PKGBUILD with two new PKGBUILDs: one for the DKMS driver and one for the XRT plugin.
- Update Arch install script and README instructions to align with the new package split.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| build/build.sh | Adds a downloader helper and switches firmware/archive downloads to use it. |
| build/arch/xrt-plugin-amdxdna.install | Simplifies install/remove hooks (drops dracut handling) and keeps DKMS + udev setup. |
| build/arch/PKGBUILD-xrt-plugin-amdxdna | Introduces a dedicated Arch package for the XRT AMD XDNA plugin tarball. |
| build/arch/PKGBUILD-xrt-plugin | Removes the old combined plugin PKGBUILD. |
| build/arch/PKGBUILD-amdxdna-driver | Introduces a dedicated Arch DKMS driver package built from a tarball. |
| README.md | Updates Arch build/install steps and documents the new package split. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+33
to
+34
| install -Dm755 "${xdna_build_dir}/package/postinst" "$pkgdir${drv_src_dir}/postinst" | ||
| install -Dm755 "${xdna_build_dir}/package/prerm" "$pkgdir${drv_src_dir}/prerm" |
| depends=('dkms') | ||
| makedepends=('bash' 'git') | ||
| provides=("${pkgname}=${pkgver}") | ||
| conflicts=("${pkgname}" "amdxdna-driver-bin") |
| options=('!debug' '!strip') | ||
|
|
||
| package() { | ||
| local xdna_build_dir="${XDNA_BUILD_DIR:-../Release}" |
| package() { | ||
| local xdna_build_dir="${XDNA_BUILD_DIR:-../Release}" | ||
| cd "$srcdir" | ||
| local tarball=$(find "${xdna_build_dir}" -maxdepth 1 -type f -name "xrt_plugin.${pkgver}_-${CARCH}-amdxdna.tar.gz" -print -quit 2>/dev/null) |
| pkgdesc="AMD XDNA(tm) Driver (amdxdna.ko) for Linux" | ||
| arch=('x86_64') | ||
| url="https://github.com/amd/xdna-driver/" | ||
| license=('custom') |
| arch=('x86_64') | ||
| url="https://github.com/amd/xdna-driver/" | ||
| license=('custom') | ||
| depends=('dkms') |
| fi | ||
|
|
||
| # Remove DKMS module | ||
| $install_datadir/dkms_driver.sh --remove |
Comment on lines
+84
to
+90
| if [ -x "$(command -v wget)" ]; then | ||
| wget -O "$output" "$url" | ||
| elif [ -x "$(command -v curl)" ]; then | ||
| curl -fL -o "$output" "$url" | ||
| else | ||
| echo "Neither wget nor curl is installed; cannot download $url" >&2 | ||
| return 1 |
| license=('Apache-2.0') | ||
| depends=('xrt-base' 'xrt-npu' "amdxdna-driver>=${pkgver}") | ||
| conflicts=('amdxdna-driver-bin') | ||
| provides=("${pkgname}=${pkgver}") |
Comment on lines
+14
to
+24
| package() { | ||
| local xdna_build_dir="${XDNA_BUILD_DIR:-../Release}" | ||
| cd "$srcdir" | ||
| local tarball=$(find "${xdna_build_dir}" -maxdepth 1 -type f -name "xrt_plugin.${pkgver}_-${CARCH}-amdxdna.tar.gz" -print -quit 2>/dev/null) | ||
| if [ -z "$tarball" ]; then | ||
| error "XDNA plugin tarball not found" | ||
| return 1 | ||
| fi | ||
| msg2 "Extracting $tarball" | ||
| tar -xzf "$tarball" -C "$pkgdir" | ||
| } No newline at end of file |
| depends=('dkms') | ||
| makedepends=('bash' 'git') | ||
| provides=("${pkgname}=${pkgver}") | ||
| conflicts=("${pkgname}" "amdxdna-driver-bin") |
| pkgdesc="AMD XDNA(tm) Driver (amdxdna.ko) for Linux" | ||
| arch=('x86_64') | ||
| url="https://github.com/amd/xdna-driver/" | ||
| license=('custom') |
Comment on lines
153
to
+160
| # Build and install XDNA plugin package | ||
| cd arch | ||
| makepkg -p PKGBUILD-xrt-plugin | ||
| makepkg -p PKGBUILD-xrt-plugin-amdxdna | ||
| sudo pacman -U xrt-plugin-amdxdna-*.pkg.tar.zst | ||
|
|
||
| # Build and install AMDXDNA driver (separate package for DKMS-based kernel module) | ||
| makepkg -p PKGBUILD-amdxdna-driver | ||
| sudo pacman -U amdxdna-driver-*.pkg.tar.zst |
Collaborator
|
ok to test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.