xrt-xocl-dkms-npu-git
maintainer That1Calculator
· 0 votes
· base
xrt-npu-git
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The package downloads a precompiled Debian package from an official Xilinx Artifactory host for firmware extraction, which is a legitimate use of a non-whitelisted but official vendor domain; the rest of the build uses official upstream sources and builds from source, posing no execution risk from untrusted remote code.
Triggered rules
LOW
AI review downgraded a static finding
llm_review
The static rules flagged this MEDIUM, but an AI model (qwen/qwen3-235b-a22b-07-25) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The package downloads a precompiled Debian package from an official Xilinx Artifactory host for firmware extraction, which is a legitimate use of a non-whitelisted but official vendor domain; the rest of the build uses official upstream sources and builds from source, posing no execution risk from untrusted remote code.
1 higher static finding superseded - not the current verdict (shown for transparency)
MEDIUM
source=() URL on a non-standard host
source_untrusted_domain
One or more source=() URLs point to a host outside the trusted allowlist (github.com, gitlab.com, codeberg.org, pypi.org, …).
-
PKGBUILD:62
xrt-precompiled::https://packages.xilinx.com/artifactory/debian-packages-cache/pool/xrt_202320.2.16.204_22.04-amd64-xrt.deb
PKGBUILD
1 offending line(s) highlighted
1
# Maintainer: Kainoa Kanter <kainoa@t1c.dev>
2
# Maintainer: Gökçe Aydos <aur2024@aydos.de>
3
4
_name=xrt
5
pkgbase=$_name-npu-git
6
pkgver=r8007.42e5fb6f57
7
pkgrel=2
8
pkgdesc="Xilinx runtime configured for AMD NPUs"
9
arch=(x86_64)
10
url='https://xilinx.github.io/XRT/master/html'
11
license=(Apache)
12
depends=(
13
# Based on src/runtime_src/tools/scripts/xrtdeps.sh
14
lsb-release # Used in tests
15
boost
16
libtiff
17
linux-headers #TODO only makedepends for dkms?
18
elfutils
19
gcc
20
gdb
21
gnuplot
22
gnutls
23
gtest
24
json-glib
25
libdrm
26
libjpeg-turbo
27
util-linux-libs # for libuuid
28
libyaml
29
lm_sensors
30
ncurses
31
ocl-icd
32
opencl-clhpp
33
openssl
34
pciutils
35
perl
36
protobuf # includes protobuf-compiler
37
python
38
python-pip
39
rapidjson
40
strace
41
unzip
42
zlib
43
pybind11
44
xilinx-u280-gen3x16-xdma-base # create_xsabin.sh in post_install, otherwise platform file empty
45
)
46
makedepends=(
47
cmake
48
git
49
)
50
optdepends=(
51
'linux-mainline-um5606: Linux kernel that can use the XDNA drivers'
52
'amdxdna-driver: Driver that coencides with these libraries'
53
)
54
provides=($_name)
55
conflicts=($_name)
56
options=(!debug)
57
58
source=(
59
$_name::git+https://github.com/xilinx/XRT
60
git+https://github.com/Xilinx/dma_ip_drivers
61
git+https://github.com/serge1/ELFIO
62
xrt-precompiled::https://packages.xilinx.com/artifactory/debian-packages-cache/pool/xrt_202320.2.16.204_22.04-amd64-xrt.deb
63
xsabin.install
64
)
65
66
sha256sums=(
67
SKIP
68
#SKIP
69
SKIP
70
SKIP
71
SKIP
72
'042778107e71a7f3304b15e9bfa3b11677569205f7fe9baa392834aa11b24709'
73
)
74
75
pkgver() {
76
cd $_name
77
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
78
}
79
80
prepare() {
81
# Submodule integration based on
82
# https://wiki.archlinux.org/title/VCS_package_guidelines#Git_submodules
83
git -C $_name config \
84
submodule.src/runtime_src/core/pcie/driver/linux/xocl/lib/libqdma.url \
85
../dma_ip_drivers
86
git -C $_name config \
87
submodule.src/runtime_src/core/common/elf.url \
88
../ELFIO
89
git -C $_name \
90
-c protocol.file.allow=always \
91
submodule update --recursive --init # Kainoa: added this here!
92
mkdir -p microblaze-fw
93
tar xf data.tar.gz -C microblaze-fw ./lib/firmware/xilinx
94
}
95
96
build() {
97
cd $_name
98
mkdir -p build && cd build
99
local cmake_flags+=" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/xilinx -DXRT_INSTALL_PREFIX=/opt/xilinx -DXRT_DKMS_ALVEO=OFF -DXDP_CLIENT_BUILD_CMAKE=yes -DNPU=1"
100
XRT_FIRMWARE_DIR="$srcdir"/microblaze-fw/lib/firmware/xilinx cmake $cmake_flags ../src
101
make
102
}
103
104
#TODO
105
# somehow test 8 fails, even it does not seem like a fail.
106
#check() {
107
# # Tests require the package to be installed in the build directory.
108
# DESTDIR=$srcdir/$_name/clean-build \
109
# make -C $_name/clean-build install
110
#
111
# cd $srcdir/$_name/clean-build
112
# ctest --output-on-failure
113
#}
114
115
pkgname=($pkgbase xrt-xocl-dkms-npu-git)
116
package_xrt-npu-git() {
117
depends+=(xrt-xocl-dkms-npu-git)
118
install=xsabin.install
119
DESTDIR=$pkgdir make -C $_name/build install
120
# Move /lib to /usr/lib, otherwise: `failed to commit transaction (conflicting files)`
121
# mv $pkgdir/lib $pkgdir/usr
122
123
# Drivers belong to the DKMS package, move them to a temporary dir.
124
mv $pkgdir/usr/src $pkgdir/..
125
126
# Moving systemd services
127
local dest=$pkgdir/usr/lib/systemd/system
128
mkdir -p $dest
129
mv $pkgdir/opt/xilinx/xrt/etc/*service $dest
130
131
# Moving binaries
132
# local dest=$pkgdir/usr/bin
133
# mkdir -p $dest
134
# mv $pkgdir/usr/local/bin/* $dest
135
# rm -r $pkgdir/usr/local/bin
136
137
# Moving appdebug
138
# mv $pkgdir/opt/xilinx/xrt/share/appdebug $pkgdir/usr/local/xrt/python
139
#rmdir $pkgdir/opt/xilinx{/xrt/share,/xrt,}
140
141
# The following lines are adapted from postinst of control.tar.gz of the debian package
142
# ln -s 283bab8f654d8674968f4da57f7fa5d7 "$pkgdir"/usr/lib/firmware/xilinx/fb2b2c5a19ed63593fea95f51fbc8eb9
143
mkdir -p "$pkgdir"/opt/xilinx/firmware/u280/gen3x16-xdma/base/firmware
144
ln -s /lib/firmware/xilinx/283bab8f654d8674968f4da57f7fa5d7/partition_metadata.json "$pkgdir"/opt/xilinx/firmware/u280/gen3x16-xdma/base/partition_metadata.json
145
ln -s /lib/firmware/xilinx/283bab8f654d8674968f4da57f7fa5d7/partition.xsabin "$pkgdir"/opt/xilinx/firmware/u280/gen3x16-xdma/base/partition.xsabin
146
## Gökçe says: "I changed /opt/xilinx/xrt/share/fw to /lib/firmware/xilinx/ because XRTFW_FILES is somehow not defined in:"
147
# https://github.com/Xilinx/XRT/blob/50f17b1d5a29b7af9a9abbc88815883958efdb35/src/runtime_src/ert/CMakeLists.txt#L29
148
ln -s /lib/firmware/xilinx "$pkgdir"/opt/xilinx/firmware/u280/gen3x16-xdma/base/firmware/ert-v30
149
ln -s /opt/xilinx/firmware/cmc/u280 "$pkgdir"/opt/xilinx/firmware/u280/gen3x16-xdma/base/firmware/cmc-u280
150
ln -s /opt/xilinx/firmware/sc-fw/u280 "$pkgdir"/opt/xilinx/firmware/u280/gen3x16-xdma/base/firmware/sc-fw-u280
151
}
152
package_xrt-xocl-dkms-npu-git() {
153
pkgdesc="Drivers for Xilinx runtime (XRT) (configured for AMD NPUs)"
154
provides=(xrt-xocl-dkms)
155
conflicts=(xrt-xocl-dkms)
156
157
# Collect drivers
158
local dest=$pkgdir/usr
159
mkdir $dest
160
cp -r $pkgdir/../src $dest
161
162
cd $pkgdir
163
# AWS drivers not required
164
# rm -r usr/src/xrt-aws*
165
166
# Set version
167
mv usr/src/{xrt-*,xrt-xocl-$pkgver}
168
}
169
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-08-03 00:08:14 | LOW | 2 |
| 2026-08-02 00:16:08 | LOW | 2 |
| 2026-08-01 00:11:18 | LOW | 2 |
| 2026-07-31 00:14:10 | LOW | 2 |
| 2026-07-30 00:17:23 | LOW | 2 |
| 2026-07-29 00:25:53 | LOW | 2 |
| 2026-07-28 00:07:28 | LOW | 2 |
| 2026-07-27 00:24:32 | LOW | 2 |
| 2026-07-26 00:07:32 | LOW | 2 |
| 2026-07-25 00:13:44 | LOW | 2 |
| 2026-07-24 00:02:28 | LOW | 2 |
| 2026-07-23 00:14:47 | LOW | 2 |
| 2026-07-22 00:29:32 | LOW | 2 |
| 2026-07-21 00:24:15 | LOW | 2 |
| 2026-07-20 00:19:49 | LOW | 2 |
| 2026-07-19 00:17:08 | LOW | 2 |
| 2026-07-18 00:14:48 | LOW | 2 |
| 2026-07-17 00:06:16 | LOW | 2 |
| 2026-07-16 00:05:41 | LOW | 2 |
| 2026-07-15 00:09:25 | LOW | 2 |