-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
205 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,3 +36,6 @@ czmq | |
libsodium | ||
libzmq | ||
malamute | ||
|
||
# Generated files from .in templates | ||
ldconf/halcs.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/sh | ||
|
||
# Adapted from Xilinx XRT project: | ||
# https://github.com/Xilinx/XRT/blob/master/src/CMake/config/postinst.in | ||
|
||
rmmodules() | ||
{ | ||
find /lib/modules -type f -name pciDriver.ko -delete | ||
depmod -A | ||
} | ||
|
||
|
||
echo "Unloading old pciDriver Linux kernel modules" | ||
rmmod pciDriver | ||
|
||
PCIDRIVER_VERSION_STRING_OLD=`dkms status -m pciDriver | awk -F, '{print $2}'` | ||
for OLD in $PCIDRIVER_VERSION_STRING_OLD; do | ||
echo "Unregistering old pciDriver Linux kernel module sources $OLD from dkms" | ||
dkms remove -m pciDriver -v $OLD --all | ||
break | ||
done | ||
|
||
rmmodules | ||
|
||
echo "Invoking DKMS common.postinst for pciDriver" | ||
/usr/lib/dkms/common.postinst pciDriver @PCIDRIVER_VERSION_STRING@ "" "" $2 | ||
|
||
if [ $? -eq 0 ]; then | ||
echo "Finished DKMS common.postinst" | ||
install -m 644 /usr/src/pciDriver-@PCIDRIVER_VERSION_STRING@/60-udev_fpga.rules /etc/udev/rules.d | ||
|
||
echo "Loading new pciDriver Linux kernel modules" | ||
udevadm control --reload-rules | ||
modprobe pciDriver | ||
udevadm trigger | ||
fi | ||
|
||
if [ -z "`dkms status -m pciDriver -v @PCIDRIVER_VERSION_STRING@ |grep installed`" ]; then | ||
echo "****************************************************************" | ||
echo "* DKMS failed to install pciDriver drivers." | ||
echo "* Please check if kernel development headers are installed for OS variant used." | ||
echo "* " | ||
echo "* Check build logs in /var/lib/dkms/pciDriver/@PCIDRIVER_VERSION_STRING@" | ||
echo "****************************************************************" | ||
fi | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/sh | ||
|
||
# Adapted from Xilinx XRT project: | ||
# https://github.com/Xilinx/XRT/blob/master/src/CMake/config/postinst.in | ||
|
||
lsb_release -si | grep -Eq "^RedHat|^CentOS" | ||
if [ $? -eq 0 ] && [ $1 -ge 1 ]; then | ||
echo "Cleanup is skipped for package upgrade/downgrade/re-install on RHEL/CentOS" | ||
exit 0 | ||
fi | ||
|
||
lsb_release -si | grep -Eq "^Ubuntu|^Debian" | ||
if [ $? -eq 0 ] && [ "$1" = "upgrade" ]; then | ||
echo "Unregistering old pciDriver Linux kernel module sources @PCIDRIVER_VERSION_STRING@ from dkms on Ubuntu/Debian" | ||
dkms remove -m pciDriver -v @PCIDRIVER_VERSION_STRING@ --all | ||
echo "Cleanup is skipped for package upgrade/downgrade/re-install on Ubuntu/Debian" | ||
exit 0 | ||
fi | ||
|
||
# If we are here pciDriver is being uninstalled. It is NOT one of upgrade, downgrade or | ||
# re-install. | ||
|
||
echo "Unloading old pciDriver Linux kernel modules" | ||
rmmod pciDriver | ||
|
||
echo "Unregistering pciDriver Linux kernel module sources @PCIDRIVER_VERSION_STRING@ from dkms" | ||
dkms remove -m pciDriver -v @PCIDRIVER_VERSION_STRING@ --all | ||
find /lib/modules -type f -name pciDriver.ko -delete | ||
depmod -A | ||
|
||
rm -f /etc/udev/rules.d/60-udev_fpga.rules | ||
|
||
exit 0 |
Submodule pcie-driver
updated
11 files
+12 −10 | Makefile | |
+3 −3 | drivers/pcie/src/.gitignore | |
+1 −0 | drivers/pcie/src/60-udev_fpga.rules | |
+23 −4 | drivers/pcie/src/Makefile | |
+0 −0 | drivers/pcie/src/config.h | |
+7 −0 | drivers/pcie/src/dkms.conf.in | |
+1 −0 | drivers/pcie/src/pciDriver.h | |
+0 −0 | drivers/pcie/src/umem.c | |
+30 −0 | drivers/pcie/src/version.sh | |
+12 −0 | include/pcie/driver/pciDriver.h | |
+30 −0 | version.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
ldconf_DIR = $(LDCONF_DIR) | ||
|
||
ldconf_SCRIPT_IN = halcs.conf.in | ||
ldconf_SCRIPT = halcs.conf | ||
|
||
# configure file | ||
DUMMY := $(shell sed 's/@ldconf_PREFIX@/$(ldconf_PREFIX)/g' $(ldconf_DIR)/$(ldconf_SCRIPT_IN) > $(ldconf_DIR)/$(ldconf_SCRIPT)) | ||
|
||
# Top Makefile uses $(ldconf)_ETC_SCRIPTS this to install | ||
# config files | ||
ldconf_ETC_SCRIPTS = $(addprefix $(ldconf_DIR)/:,$(ldconf_SCRIPT)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.