2001-03-10 05:28:46 +00:00
|
|
|
$FreeBSD$
|
1997-02-02 07:35:59 +00:00
|
|
|
|
2001-03-10 05:28:46 +00:00
|
|
|
Author: Julian Elischer
|
|
|
|
|
|
|
|
The files in this directory are shell scripts.
|
1997-02-02 07:35:59 +00:00
|
|
|
|
|
|
|
They will, when run, create an example skeleton driver
|
|
|
|
for you. You can use this driver as a starting point for
|
|
|
|
writing drivers for your own devices. They have all the hooks needed
|
2001-03-10 05:28:46 +00:00
|
|
|
for initialization, probing, attaching, as well as DEVFS
|
1997-02-02 07:35:59 +00:00
|
|
|
node creation. They also create sample ioctl commands and a sample
|
1998-01-15 13:42:28 +00:00
|
|
|
ioctl definition .h file in /sys/sys. In other words they are fully
|
1997-02-02 07:35:59 +00:00
|
|
|
functional in a 'skeleton' sort of a way. They support multiple devices
|
2001-03-10 05:28:46 +00:00
|
|
|
so that you may have several of your 'foobar' devices probed and attached
|
1997-02-02 07:35:59 +00:00
|
|
|
at once.
|
|
|
|
|
|
|
|
I expect that these scripts will improve with time.
|
|
|
|
|
|
|
|
At present these scripts also link the newly created driver into
|
|
|
|
the kernel sources in /sys. Possibly a better way would be
|
|
|
|
to make them interactive. (and ask what kernel tree to use as well as
|
|
|
|
a name for the driver.).
|
|
|
|
|
|
|
|
There are presently two scripts.
|
|
|
|
One for making a real device driver for ISA devices, and
|
|
|
|
one for making a device driver for pseudo devices (e.g. /dev/null).
|
|
|
|
Hopefully they will be joined by similar scripts for creating
|
|
|
|
skeletons for PCI and EISA devices as well.
|
|
|
|
|
|
|
|
Give them a single argument: the name of the driver.
|
|
|
|
They will use this given name in many places within the driver,
|
|
|
|
both in lower and upper case form. (conforming to normal usage).
|
|
|
|
|
|
|
|
The skeleton driver should already link with the kernel
|
|
|
|
and in fact the shell script will compile a kernel with the new
|
|
|
|
drive linked in.. The new kernel should still be
|
|
|
|
runnable and the new driver should be
|
|
|
|
fully callable (once you get your device to probe).
|
|
|
|
You should simply edit the driver and continue to use
|
|
|
|
'make' (as done in the script) until your driver does what you want.
|
|
|
|
|
|
|
|
The driver will end up in /sys/i386/isa for the device driver script,
|
|
|
|
and in /sys/dev for the pseudo driver script.
|