Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[refactor] - split more cleanly into driver/ and pb_utils/
This is really 2 projects in one repository.
- Loading branch information
Richard Neill
committed
Sep 17, 2013
1 parent
a20a73a
commit 149693c
Showing
27 changed files
with
237 additions
and
58 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
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,3 @@ | ||
This is all Free Software, licensed under the GNU GPL. | ||
Copyright 2010 - 2013, Michael Brown and Richard Neill. | ||
License version is "v3 or later", except for the kernel driver which is "v2". |
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,64 @@ | ||
PREFIX = $(DESTDIR)/usr/local | ||
BINDIR = $(PREFIX)/bin | ||
DATAROOTDIR = $(PREFIX)/share | ||
DOCDIR = $(DATAROOTDIR)/doc/pb_driver | ||
MANDIR = $(DATAROOTDIR)/man | ||
MAN1DIR = $(MANDIR)/man1 | ||
|
||
all :: compile | ||
|
||
compile: | ||
@[ -d /usr/src/*`uname -r` ] || (echo "Error: please install the kernel sources"; exit 1) | ||
cd kernel; make -C /lib/modules/`uname -r`/build M=`pwd` ; cd - | ||
pod2man pb_ctl/pb_ctl -c "User Commands" | bzip2 > man/pb_ctl.1.bz2 | ||
bzip2 -kf man/pb_driver-load.1 | ||
bzip2 -kf man/pb_test-flash-2Hz.1 | ||
ln -sf pb_test-flash-2Hz.1.bz2 man/pb_test-flash-fastest-5.55MHz.1.bz2 | ||
ln -sf pb_test-flash-2Hz.1.bz2 man/pb_test-identify-output.1.bz2 | ||
ln -sf pb_driver-load.1.bz2 man/pb_driver-unload.1.bz2 | ||
|
||
install: | ||
@[ `whoami` = root ] || (echo "Error, please be root"; exit 1) | ||
@#Kernel module | ||
mkdir -p /lib/modules/`uname -r`/kernel/3rdparty/pulseblaster | ||
cp kernel/pulseblaster.ko /lib/modules/`uname -r`/kernel/3rdparty/pulseblaster | ||
gzip -f /lib/modules/`uname -r`/kernel/3rdparty/pulseblaster/pulseblaster.ko | ||
depmod -A | ||
|
||
@#PAM permissions. | ||
echo '<console> 0660 /sys/class/pulseblaster/pulseblaster*/* 660 root.usb' > /etc/security/console.perms.d/90-pulseblaster.perms | ||
@#Do it | ||
modprobe pulseblaster; pam_console_apply | ||
|
||
mkdir -p $(BINDIR) $(MAN1DIR) $(DOCDIR) | ||
install pb_ctl/pb_ctl $(BINDIR) | ||
install pb_ctl/pb_driver-load.sh $(BINDIR)/pb_driver-load | ||
install pb_ctl/pb_driver-unload.sh $(BINDIR)/pb_driver-unload | ||
install pb_ctl/pb_test-flash-2Hz.sh $(BINDIR)/pb_test-flash-2Hz | ||
install pb_ctl/pb_test-flash-fastest-5.55MHz.sh $(BINDIR)/pb_test-flash-fastest-5.55MHz | ||
install pb_ctl/pb_test-identify-output.sh $(BINDIR)/pb_test-identify-output | ||
install -m644 README.txt LICENSE.txt doc/* $(DOCDIR) | ||
install -m644 man/*.1.bz2 $(MAN1DIR) | ||
|
||
clean: | ||
rm -f kernel/*.o kernel/*.ko | ||
rm -f man/*.bz2 man/*.html | ||
|
||
uninstall: | ||
@[ `whoami` = root ] || (echo "Error, please be root"; exit 1) | ||
rm -rf /lib/modules/`uname -r`/kernel/3rdparty/pulseblaster | ||
depmod -A | ||
rm -f /etc/security/console.perms.d/90-pulseblaster.perms | ||
rm -f $(BINDIR)/pb_ctl | ||
rm -f $(BINDIR)/pb_driver-load | ||
rm -f $(BINDIR)/pb_driver-unload | ||
rm -f $(BINDIR)/pb_test-flash-2Hz | ||
rm -f $(BINDIR)/pb_test-flash-fastest-5.55MHz | ||
rm -f $(BINDIR)/pb_test-identify-output | ||
rm -f $(MAN1DIR)/pb_ctl.1.bz2 | ||
rm -f $(MAN1DIR)/pb_driver-load.1.bz2 | ||
rm -f $(MAN1DIR)/pb_driver-unload.1.bz2 | ||
rm -f $(MAN1DIR)/pb_test-flash-2Hz.1.bz2 | ||
rm -f $(MAN1DIR)/pb_test-flash-fastest-5.55MHz.1.bz2 | ||
rm -f $(MAN1DIR)/pb_test-identify_output.1.bz2 | ||
rm -rf $(DOCDIR) |
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,58 @@ | ||
INTRODUCTION | ||
------------ | ||
|
||
This is a GPL'd Linux driver for the SpinCore PulseBlaster PCI Digital Timing card: | ||
|
||
kernel/ | ||
The driver. This builds on kernel 3.8. | ||
It creates entries in /sys, under /sys/class/pulseblaster/ | ||
|
||
pb_ctl/ | ||
A simple control script and some low-level debugging/diagnostic utilities. | ||
|
||
|
||
MODULE LOADING | ||
-------------- | ||
|
||
insmod ./pulseblaster.ko ; rmmod pulseblaster | ||
|
||
Loading the module will create entries within /sys/class/pulseblaster, | ||
typically /sys/class/pulseblaster/pulseblaster0/* | ||
|
||
After running make install, this will happen automatically on reboot, and pam_console_apply | ||
will automatically grant permissions the the logged-in user. Or use pb_driver-load. | ||
|
||
|
||
USERSPACE | ||
--------- | ||
|
||
It's possible to just write directly to the /sys interface. | ||
|
||
Eg: doc/flash.bin is a pulseblaster executable to flash all the outputs at 2Hz | ||
|
||
To program it: | ||
cat doc/flash.bin > /sys/class/pulseblaster/pulseblaster0/program | ||
To start the program: | ||
echo 1 > /sys/class/pulseblaster/pulseblaster0/start | ||
|
||
|
||
Identify specific outputs with pb_test-identify-output.sh | ||
(this generates simple PB programs). | ||
|
||
|
||
DISTRIBUTION | ||
------------ | ||
|
||
Once the driver becomes part of the kernel, there's no need to install pb_ctl/*. | ||
Just use pb_utils. | ||
|
||
|
||
SEE ALSO | ||
-------- | ||
|
||
* pb_utils - PulseBlaster control and assembler. | ||
|
||
* pb_parse - High-level compiler. | ||
|
||
* GIT tree at: http://git.ipxe.org/people/rjn/pulseblaster.git | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
Oops, something went wrong.