Skip to content

Commit 9ee5a38

Browse files
committed
Reworked udev rule to Heikos rule and removed pda_sysfs script.
1 parent b4796d1 commit 9ee5a38

File tree

4 files changed

+6
-38
lines changed

4 files changed

+6
-38
lines changed

patches/linux_uio/99-pda.rules

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
SUBSYSTEM=="uio", ACTION=="add", RUN+="/bin/bash /etc/pda_sysfs.sh"
2-
SUBSYSTEM=="dma", ACTION=="add", RUN+="/bin/bash /etc/pda_sysfs.sh"
3-
SUBSYSTEM=="drivers", ACTION=="add", RUN+="/bin/bash /etc/pda_sysfs.sh"
1+
# on module load; set perms on /sys/...../new_id
2+
SUBSYSTEM=="drivers", ACTION=="add", KERNEL=="uio_pci_dma", RUN+="/bin/chgrp pda /sys/%p/new_id", RUN+="/bin/chmod 0220 /sys/%p/new_id"
3+
4+
# new device added; set perms on /dev/uioX and PCI config and resources
5+
SUBSYSTEM=="uio", ACTION=="add", RUN+="/bin/chgrp pda %N /sys/%p/device/config /sys/%p/device/resource0 /sys/%p/device/resource1", RUN+="/bin/chmod 0664 %N /sys/%p/device/config" RUN+="/bin/chmod 0660 %N /sys/%p/device/resource0 /sys/%p/device/resource1"

patches/linux_uio/Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,12 @@ prepare: clean
1313

1414
install: all
1515
cp uio_pci_dma.ko /lib/modules/$(shell uname -r)/kernel/drivers/uio/
16-
install pda_sysfs.sh /etc/
1716
cp 99-pda.rules /etc/udev/rules.d/
1817
depmod -a
1918

2019
rpminstall: all
2120
mkdir -p $(INSTALL_MOD_PATH)/lib/modules/$(shell uname -r)/kernel/drivers/uio/
2221
cp uio_pci_dma.ko $(INSTALL_MOD_PATH)/lib/modules/$(shell uname -r)/kernel/drivers/uio/
23-
mkdir -p $(INSTALL_MOD_PATH)/etc/
24-
install pda_sysfs.sh $(INSTALL_MOD_PATH)/etc/
2522
mkdir -p $(INSTALL_MOD_PATH)/etc/udev/rules.d/
2623
cp 99-pda.rules $(INSTALL_MOD_PATH)/etc/udev/rules.d/
2724

@@ -35,7 +32,7 @@ rpm: pack
3532
pack:
3633
rm -rf pda_kadapter-${VERSION}
3734
mkdir pda_kadapter-${VERSION}
38-
cp Makefile Makefile_dma.temp uio_pci_dma.c uio_pci_dma.h pda_sysfs.sh 99-pda.rules pda_kadapter-${VERSION}/
35+
cp Makefile Makefile_dma.temp uio_pci_dma.c uio_pci_dma.h 99-pda.rules pda_kadapter-${VERSION}/
3936
tar -cf pda_kadapter-${VERSION}.tar pda_kadapter-${VERSION}
4037
gzip pda_kadapter-${VERSION}.tar
4138
rm -rf pda_kadapter-${VERSION}

patches/linux_uio/pda_kadapter.template

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ make INSTALL_MOD_PATH=$RPM_BUILD_ROOT rpminstall
2828
%files
2929
%defattr(644,root,root,755)
3030
/lib/modules/%{UNAME}/kernel/drivers/uio/uio_pci_dma.ko
31-
/etc/pda_sysfs.sh
3231
/etc/udev/rules.d/99-pda.rules
3332

3433
%post
3534
/sbin/depmod -a
36-
chmod u+x /etc/pda_sysfs.sh

patches/linux_uio/pda_sysfs.sh

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)