Thomas De Schampheleire writes:
> The code I am writing does not really handle a certain device, so I guess a
> device driver is not what I am aiming at.
> A loadable module sounds ok to me.
> 
> How do I tell OpenSolaris that this module should be loaded? Is there any
> documentation regarding developing modules for OpenSolaris?
> Can a user also load and unload modules?

Sure ... but that's probably not the top-level question here.

What are you trying to do?  What does your project look like?

Sometimes (perhaps "often"), the right answer is to make your kernel
module be a pseudo driver.  You'll be loaded into memory automatically
when someone references any of your device nodes (/devices or /dev).

Another possibility is that you're designing something that other
drivers call into (a "framework" or "library" of some sort).  In that
case, you should have those other modules use "-dy -Nmisc/yourmodule"
and you'll be loaded into memory when they are.

Still another is that you're a module in some other framework, such as
STREAMS.  If so, then follow the rules there, and you'll be loaded
when needed (as for "I_PUSH").

Yet another (and one I would not necessarily recommend or is just not
doable outside of ON) is that you're explicitly loaded by the kernel,
either by some part of the kernel's startup_modules() or via the magic
of modstubs.  These are generally odd beasts.

It's rarely the case that an explicit user-level /usr/sbin/modload is
the right answer, but I guess that's possible.

-- 
James Carlson, Solaris Networking              <[EMAIL PROTECTED]>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to