Skip to content

cmake: add Void Linux to recognized package flavors#1424

Open
AndreNijman wants to merge 1 commit into
amd:mainfrom
AndreNijman:void-pkg-flavor
Open

cmake: add Void Linux to recognized package flavors#1424
AndreNijman wants to merge 1 commit into
amd:mainfrom
AndreNijman:void-pkg-flavor

Conversation

@AndreNijman

Copy link
Copy Markdown

What

Add Void Linux to the recognized Linux package flavors in CMake/pkg.cmake.

On Void, build.sh -release aborts at configure time:

CMake Error at CMake/pkg.cmake:137 (message):
  Unknown Linux package flavor: void.  Supported distributions: Debian/Ubuntu
  (deb), Fedora/RHEL (rpm), Arch Linux (TGZ).

Void's /etc/os-release ID is void (with empty ID_LIKE), so it matched no branch.

Fix

Route void to the same TGZ generator already used for Arch — both are
source-based distros with no native deb/rpm in this flow — and make the
comment/status message distro-neutral. The behavioral change is one line
(MATCHES "arch"MATCHES "arch|void").

Validation

Tested on Void Linux (glibc 2.41, kernel 7.0.11, in-tree amdxdna driver).
With this change build.sh -release -nokmod configures cleanly and produces
xrt_plugin.*-amdxdna.tar.gz. Installed alongside an XRT base built from the
xrt submodule, xrt-smi examine then enumerates the Phoenix NPU
(RyzenAI-npu1) and mlir-aie example kernels run on it — i.e. the SHIM-only
path the README documents for kernel >= 6.14 (in-tree driver) now works on Void.

checkpatch.pl is not applicable (CMake-only change).

`build.sh -release` aborts on Void Linux with
"Unknown Linux package flavor: void" (CMake/pkg.cmake), because Void's
/etc/os-release ID is `void` and is not matched by any branch.

Void has no native deb/rpm in this packaging flow, so route it to the
same TGZ generator already used for Arch (both are source-based distros)
and make the comment/status message distro-neutral. This lets users on
Void build and install the XRT amdxdna SHIM plugin (e.g. `-nokmod`
against the in-tree amdxdna driver on kernel >= 6.14).

Signed-off-by: Andre Nijman <andre.perth.2010@gmail.com>
Copilot AI review requested due to automatic review settings June 16, 2026 15:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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.

Updates Linux packaging logic to treat Void Linux similarly to Arch by generating a TGZ archive instead of DEB/RPM artifacts.

Changes:

  • Expand the distro flavor match to include void in the TGZ packaging branch.
  • Update status messaging and comments to reflect Arch/Void behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CMake/pkg.cmake
set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/package/prerm")
endif()
elseif("${XDNA_CPACK_LINUX_PKG_FLAVOR}" MATCHES "arch")
elseif("${XDNA_CPACK_LINUX_PKG_FLAVOR}" MATCHES "arch|void")
Comment thread CMake/pkg.cmake
Comment on lines +126 to +128
# Source-based distros (Arch, Void) have no native deb/rpm in this flow, so we
# generate a tarball that can be repackaged into a native package (e.g. the
# provided Arch PKGBUILD, whose install hooks handle post-install/pre-remove).
@maxzhen

maxzhen commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

ok to test

@maxzhen

maxzhen commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

retest this please

1 similar comment
@maxzhen

maxzhen commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

retest this please

@maxzhen

maxzhen commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

@AndreNijman , could you address Copilot review comments?

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