summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO18
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD36
-rw-r--r--patch-subdirs.patch11
-rw-r--r--riffa.install17
5 files changed, 52 insertions, 31 deletions
diff --git a/.SRCINFO b/.SRCINFO
index aab926422ea7..46bfcafdc0b2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,21 @@
-# Generated by mksrcinfo v8
-# Thu Feb 9 19:56:05 UTC 2017
pkgbase = riffa-git
pkgdesc = RIFFA: A Reusable Integration Framework For FPGA Accelerators
- pkgver = 2.2.2.git20161214
+ pkgver = 2.2.2.git20220907
pkgrel = 1
url = http://riffa.ucsd.edu/
install = riffa.install
arch = i686
arch = x86_64
license = custom
- makedepends = linux-headers
- source = git://github.com/marzoul/riffa.git
+ makedepends = linux-headers=5.18.7.arch1-1
+ depends = linux=5.18.7.arch1-1
+ source = git+https://github.com/marzoul/riffa.git
source = riffa.install
+ source = patch-subdirs.patch
source = 99-riffa.rules
- md5sums = SKIP
- md5sums = SKIP
- md5sums = d37355781ef46d1f4aa21cd169964f08
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = 102cc4edf8008a193faf15dfe507d8cdb223036de6059b4c8f495b69ead246ac
+ sha256sums = 6dd2aee2ba41d68419004f7a80b87fbd6a1d8c723d5a2b3d293fe460a7364676
pkgname = riffa-git
-
diff --git a/.gitignore b/.gitignore
index 3ab53dd6b649..a77e7ac8292d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,4 +9,5 @@ pkg
*.tar
*.tgz
*.xz
+*.zst
diff --git a/PKGBUILD b/PKGBUILD
index b7f76f534f56..ef47f9e6a43d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,40 +2,54 @@
# Important: the versions of the packages linux and linux-header must match
pkgname=riffa-git
-pkgver=2.2.2.git20161214
+pkgver=2.2.2.git20220907
pkgrel=1
arch=('i686' 'x86_64')
pkgdesc='RIFFA: A Reusable Integration Framework For FPGA Accelerators'
url='http://riffa.ucsd.edu/'
license=('custom')
-makedepends=('linux-headers')
+# Note : Dependency is on currently running kernel, which the compilation based on, NOT on the kernel package installed
+_local_linux_version=$(uname -r | sed -r 's/(-arch)/.arch/')
+
+depends=("linux=$_local_linux_version")
+makedepends=("linux-headers=$_local_linux_version")
install='riffa.install'
source=(
- #"git://github.com/drichmond/riffa.git"
- "git://github.com/marzoul/riffa.git"
+ #"git+https://github.com/drichmond/riffa.git"
+ "git+https://github.com/marzoul/riffa.git"
'riffa.install'
+ 'patch-subdirs.patch'
'99-riffa.rules'
)
# Note: No check for riffa.install because it is modified by the package() function.
-md5sums=(
+sha256sums=(
'SKIP'
'SKIP'
- 'd37355781ef46d1f4aa21cd169964f08'
+ '102cc4edf8008a193faf15dfe507d8cdb223036de6059b4c8f495b69ead246ac'
+ '6dd2aee2ba41d68419004f7a80b87fbd6a1d8c723d5a2b3d293fe460a7364676'
)
pkgver() {
cd "${srcdir}/riffa"
# RIFFA version (extracted from Makefile)
- _distver=`sed -n -e 's/^RELEASE_VER=\([0-9.a-z]*\)\s*$/\1/p' Makefile`
+ local _distver=$(sed -n -e 's/^RELEASE_VER=\([0-9.a-z]*\)\s*$/\1/p' Makefile)
# Date of the last git commit
- _gitver=`git log -n 1 --date=short | sed -n -e 's/^Date:\s*\([0-9-]*\)\s*$/\1/p' | tr -d -`
+ local _gitver=$(git log -n 1 --date=short | sed -n -e 's/^Date:\s*\([0-9-]*\)\s*$/\1/p' | tr -d -)
echo $_distver.git$_gitver;
}
+prepare() {
+ cd "${srcdir}/riffa"
+
+ # At least for Linux >= 5.12
+ patch -p0 -N -i ../../patch-subdirs.patch
+
+}
+
build() {
cd "${srcdir}/riffa/driver/linux"
@@ -50,16 +64,12 @@ build() {
}
package() {
- # Note: Can't use the riffa provided install commands because all is hardcoded for Red Hat / Debian
-
- _extramodules=extramodules-`uname -r | sed -e 's/\([[:digit:]]*\).\([[:digit:]]\).*/\1.\2/g'`-ARCH
- sed --follow-symlinks -i -e 's/^\([[:blank:]]*EXTRAMODULES=\).*$/\1'"$_extramodules"'/g' "${srcdir}/riffa.install"
install -Dm0755 "${srcdir}/99-riffa.rules" "${pkgdir}/etc/udev/rules.d/99-riffa.rules"
cd "${srcdir}/riffa/driver/linux"
- install -D riffa.ko "${pkgdir}/usr/lib/modules/$_extramodules/riffa.ko"
+ install -D riffa.ko "${pkgdir}/usr/lib/modules/$(uname -r)/kernel/drivers/riffa/riffa.ko"
install -Dm0644 riffa.h "${pkgdir}/usr/include/riffa.h"
install -Dm0644 riffa_driver.h "${pkgdir}/usr/include/riffa_driver.h"
diff --git a/patch-subdirs.patch b/patch-subdirs.patch
new file mode 100644
index 000000000000..8253f3ea3ad9
--- /dev/null
+++ b/patch-subdirs.patch
@@ -0,0 +1,11 @@
+--- driver/linux/Makefile
++++ driver/linux/Makefile
+@@ -98,7 +98,7 @@ $(NAME).ko: *.c *.h
+ sed -i 's/#define VENDOR_ID1 [^\n]*/#define VENDOR_ID1 0x$(VENDOR_ID1)/g' $(DRVR_HDR)
+ sed -i 's/#define DEBUG [^\n]*/#define DBUG 1/g' $(DRVR_HDR)
+ sed -i 's/#define DBUG [^\n]*/#define $(DBUGVAL) 1/g' $(DRVR_HDR)
+- make -C $(KDIR) SUBDIRS=`pwd` modules
++ make -C $(KDIR) M=`pwd` modules
+ rm -rf $(LIB_OBJS)
+
+ $(NAME).so.$(LIB_VER): $(LIB_OBJS)
diff --git a/riffa.install b/riffa.install
index 00dcd93cc2e0..1306f0786720 100644
--- a/riffa.install
+++ b/riffa.install
@@ -1,19 +1,18 @@
-_depmod() {
- EXTRAMODULES=extramodules-4.8-ARCH
- depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
-}
+# Note : pacman autoimatically performs the following tasks after package install/update/remove:
+# Update libraries with ldconfig
+# Update kernel module dependencies with depmod (provided the module is installed at aappropariate path)
post_install() {
- echo '==> You must load the riffa kernel module before using Riffa: # modprobe riffa'
- _depmod
+ echo '==> The RIFFA driver must be enabled to be used : # modprobe riffa'
}
post_upgrade() {
- _depmod
- echo '==> Manually reload the riffa kernel module to use the new version.'
+ echo '==> To use the new RIFFA driver without rebooting : # rmmod riffa ; modprobe riffa'
}
post_remove() {
- _depmod
+ echo '==> Removing the Riffa kernel module'
+ rmmod riffa
}
+