[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MkIV Driver prototype posted
- To: tass@wwa.com
- Subject: MkIV Driver prototype posted
- From: Chris Albertson <chrisja@jps.net>
- Date: Sun, 03 May 1998 01:44:21 +0000
- Old-Return-Path: <chrisja@jps.net>
- Resent-Date: Sat, 2 May 1998 21:47:08 -0400
- Resent-From: tass@wwa.com
- Resent-Message-ID: <"oBfIsC.A.s5C._v8S1"@kani.wwa.com>
- Resent-Sender: tass-request@wwa.com
- Sender: chris@dry3.jps.net
I have been wanting to learn how to write a standard Linux kernel
level device driver. So mostly as an educational exercise I
wrote one that could be used for the Mk IV memory buffer card.
Of course with no MkIV system the driver only returns a test
string, no images.
My goal was to make a device driver that would install at run time
with no re-boot required and be simple enough that a Linux novice
could build, install and use it. I have posted the driver tar file
to
ftp://ftp.tass-survey.org/pub/incoming/Mk4_Buffer_Driver_0.1_02MAY98.tgz
I'd be interested to know how close I came on the "simple to set
up and use" front.
A full up Mk IV software system will have multiple layers. The
device driver is the lowest. What this driver does is make the RAM
buffer "look" like a file. To get an image off the card the next
higher level software would 1) open the file, 2) read until end
of file, 3) close the file.
It should be possible to use the standard UNIX copy command to
save an image to disk "cp /dev/mk4 filename.dat". The image would
not be in FITS format but the above does illustrate the idea.
I have posted the driver just in case someone wants to check it out.
If you do try "cp /dev/mk4 filename.dat" be sure and kill it after
a few seconds as it will never reach end of file and fill your
disk. "cat /dev/mk4" is a better test. Also check out the file
/proc/mk4. Try "cat /proc/mk4" I write status and version info
there. This file exists only while the driver is loaded. Finally,
"rmmod mk4" will remove the driver from the kernel.
I'll improve this driver from time to time. Plans are to add a few
"iocntl" commands and to also adapt this to control a CookBook CB245.
--
--Chris Albertson home: chrisja@jps.net
Redondo Beach, California work: chris@topdog.logicon.com