Skip to content

arch: split amdxdna-driver into separate package with DKMS support#1354

Open
kashif wants to merge 3 commits into
amd:mainfrom
kashif:arch-linux-pkgbuilds
Open

arch: split amdxdna-driver into separate package with DKMS support#1354
kashif wants to merge 3 commits into
amd:mainfrom
kashif:arch-linux-pkgbuilds

Conversation

@kashif
Copy link
Copy Markdown
Contributor

@kashif 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
Copilot AI review requested due to automatic review settings May 23, 2026 08:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 either wget or curl during 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 thread build/arch/PKGBUILD-amdxdna-driver Outdated
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
Copilot AI review requested due to automatic review settings May 23, 2026 09:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Comment thread build/build.sh
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 thread README.md
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
@maxzhen
Copy link
Copy Markdown
Collaborator

maxzhen commented May 23, 2026

ok to test

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.

3 participants