diff options
author | goekce | 2022-08-23 17:10:11 +0200 |
---|---|---|
committer | goekce | 2022-08-23 17:10:11 +0200 |
commit | 95a785be083f2704f63c75166aec429496830bb4 (patch) | |
tree | 62a9cd20f0d2b65b97cdee64c235a75a048991ce | |
download | aur-95a785be083f2704f63c75166aec429496830bb4.tar.gz |
initial
-rw-r--r-- | .SRCINFO | 87 | ||||
-rw-r--r-- | PKGBUILD | 138 |
2 files changed, 225 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..422e8f4d9644 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,87 @@ +pkgbase = xrt-git + pkgdesc = Xilinx runtime for Ultrascale, Versal and MPSoC-based FPGAs + pkgver = r6625.da644adf6 + pkgrel = 1 + url = https://xilinx.github.io/XRT/master/html/ + arch = x86_64 + license = Apache + makedepends = cmake + makedepends = git + depends = lsb-release + depends = boost + depends = libtiff + depends = dkms + depends = linux-headers + depends = elfutils + depends = gcc + depends = gdb + depends = gnuplot + depends = gnutls + depends = gtest + depends = json-glib + depends = libdrm + depends = libjpeg-turbo + depends = util-linux-libs + depends = libyaml + depends = lm_sensors + depends = ncurses + depends = ocl-icd + depends = opencl-clhpp + depends = openssl + depends = pciutils + depends = perl + depends = protobuf + depends = python + depends = python-pip + depends = rapidjson + depends = strace + depends = unzip + depends = zlib + depends = pybind11 + provides = xrt + conflicts = xrt + source = xrt::git+https://github.com/xilinx/XRT + source = git+https://github.com/Xilinx/dma_ip_drivers + source = xrt-fixes-for-current-kernels-and-gcc.patch::https://github.com/Xilinx/XRT/pull/6908.patch + source = dma-ip-drivers-fixes-for-current-kernels.patch::https://github.com/Xilinx/dma_ip_drivers/pull/176.patch + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + +pkgname = xrt-git + depends = lsb-release + depends = boost + depends = libtiff + depends = dkms + depends = linux-headers + depends = elfutils + depends = gcc + depends = gdb + depends = gnuplot + depends = gnutls + depends = gtest + depends = json-glib + depends = libdrm + depends = libjpeg-turbo + depends = util-linux-libs + depends = libyaml + depends = lm_sensors + depends = ncurses + depends = ocl-icd + depends = opencl-clhpp + depends = openssl + depends = pciutils + depends = perl + depends = protobuf + depends = python + depends = python-pip + depends = rapidjson + depends = strace + depends = unzip + depends = zlib + depends = pybind11 + depends = xrt-xocl-dkms-git + +pkgname = xrt-xocl-dkms-git + pkgdesc = Drivers for Xilinx runtime (XRT) diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..3a9e6ae3663b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,138 @@ +# Maintainer: Gökçe Aydos <aur2022@aydos.de> +_name=xrt +pkgbase=$_name-git +pkgver=r6625.da644adf6 +pkgrel=1 +pkgdesc="Xilinx runtime for Ultrascale, Versal and MPSoC-based FPGAs" +arch=(x86_64) +url='https://xilinx.github.io/XRT/master/html/' +license=(Apache) +depends=( +# Based on src/runtime_src/tools/scripts/xrtdeps.sh + lsb-release # Used in tests + boost + libtiff + #cppcheck #TODO report upstream: not-needed since https://github.com/Xilinx/XRT/commit/0bd3e8c83840f341f028588a26cb9151fdd04542 + #curl #TODO report upstream: not required + dkms + linux-headers #TODO only makedepends for dkms? + elfutils + gcc + gdb + gnuplot + gnutls + gtest + json-glib + libdrm + libjpeg-turbo + util-linux-libs # for libuuid + libyaml + lm_sensors + ncurses + ocl-icd + opencl-clhpp + openssl + pciutils + perl + protobuf # includes protobuf-compiler + python + python-pip + rapidjson + strace + unzip + zlib + pybind11 +) +makedepends=( + cmake + git +) +provides=($_name) +conflicts=($_name) +source=( + $_name::git+https://github.com/xilinx/XRT + git+https://github.com/Xilinx/dma_ip_drivers + xrt-fixes-for-current-kernels-and-gcc.patch::https://github.com/Xilinx/XRT/pull/6908.patch + dma-ip-drivers-fixes-for-current-kernels.patch::https://github.com/Xilinx/dma_ip_drivers/pull/176.patch +) +sha256sums=( + SKIP + SKIP + SKIP + SKIP +) +pkgver() { + cd $_name + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} +prepare() { + echo Patch $_name + git -C $_name apply $srcdir/xrt-fixes-for-current-kernels-and-gcc.patch + + # Submodule integration based on + # https://wiki.archlinux.org/title/VCS_package_guidelines#Git_submodules + + # Patch dma_ip_drivers for current kernels + git -C $_name config \ + submodule.src/runtime_src/core/pcie/driver/linux/xocl/lib/libqdma.url \ + ../dma_ip_drivers + git -C $_name submodule update + echo Patch $_name/src/runtime_src/core/pcie/driver/linux/xocl/lib/libqdma + git -C $_name/src/runtime_src/core/pcie/driver/linux/xocl/lib/libqdma \ + apply $srcdir/dma-ip-drivers-fixes-for-current-kernels.patch +} +build() { + cd $_name + + # Remove -D_GLIBCXX_ASSERTIONS as a workaround for + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105545 + # (`__builtin_memcpy... may overlap up to` error) + #TODO remove after resolution + CXXFLAGS=${CXXFLAGS/-Wp,-D_GLIBCXX_ASSERTIONS} + mkdir clean-build && cd clean-build + local cmake_flags+=" -DCMAKE_BUILD_TYPE=Release" + cmake $make_flags ../src + make +} + +check() { + # Tests require the package to be installed in the build directory. + DESTDIR=$srcdir/$_name/clean-build \ + make -C $_name/clean-build install + + cd $srcdir/$_name/clean-build + ctest --output-on-failure +} + +pkgname=($pkgbase xrt-xocl-dkms-git) +package_xrt-git() { + depends+=(xrt-xocl-dkms-git) + echo ${depends[@]} + DESTDIR=$pkgdir make -C $_name/clean-build install + + # Drivers belong to the DKMS package, move them to a temporary dir. + mv $pkgdir/usr/src $pkgdir/.. + + # Systemd services + local dest=$pkgdir/usr/lib/systemd + mkdir -p $dest + mv $pkgdir/opt/xilinx/xrt/etc $dest/system + + # Fix /usr/local + mv $pkgdir/usr/{local,bin} +} +package_xrt-xocl-dkms-git() { + pkgdesc="Drivers for Xilinx runtime (XRT)" + # Collect drivers + local dest=$pkgdir/usr + mkdir $dest + cp -r $pkgdir/../src $dest + + cd $pkgdir + + # AWS drivers not required + rm -r usr/src/xrt-aws* + + # Set version + mv usr/src/{xrt-*,xrt-xocl-$pkgver} +} |