Re: Adding a driver
- From: andrew@xxxxxxxxxxxxxxxxxxxx (Andrew Gabriel)
- Date: 04 Feb 2008 22:12:57 GMT
In article <cl1fq35of7ga8q1un8se9qjicq7papv4o9@xxxxxxx>,
John <jvasquez@xxxxxxxxxxxx> writes:
Newbie here!
Ok, I compiled and link the driver.
I created an installation script that appears to load the driver
(running OS). I'm getting debug messages that displays the execution
of the _init routine.
How do a load the module or create the device name.
I have a test program that uses the device name, "/dev/catds0". How do
I get the device name in /dev?
Are you calling ddi_create_minor_node()?
What sort of device are you (5th parameter)?
For some types of device, the /dev node is created automatically
as there are uniform naming rules for things like serial ports.
Otherwise, you'll need to add a line to /etc/devlink.tab to
cause your /dev link to be created, and that can be fiddly (it's
a very non-obvious format file).
Drivers which are part of Solaris have a piece of code in devfsadm
which creates their /dev entry (or that's where it used to be before
devfs -- I haven't looked recently to see how it works with devfs).
Drivers which are not part of Solaris use devlink.tab instead so
third parties can easily add an entry to that file when they pkgadd
their driver (and remove it when they pkgrm their driver).
Presumably you have a /devices link already? You could use this
to test your driver temporarily if you can't get the /dev link
created, although completed applications shouldn't access /devices
links directly.
--
Andrew Gabriel
[email address is not usable -- followup in the newsgroup]
.
- Follow-Ups:
- Re: Adding a driver
- From: John
- Re: Adding a driver
- References:
- Adding a driver
- From: John
- Adding a driver
- Prev by Date: hardware RAID to copy system?
- Next by Date: Re: Adding a driver
- Previous by thread: Adding a driver
- Next by thread: Re: Adding a driver
- Index(es):
Relevant Pages
|