David Preece wrote:
>
> At 13:02 17/12/00 +0000, you wrote:
> >Does anyone have any good tips to get started / HowTo's, or some simple
> >examples
> >that will give me knowledge like the PC Speaker or something simple like
> >that?
>
> This is turning into a FAQ, but don't worry about it. The usual answer is
> to take one of the existing drivers and work out what it does. There's also
> a script for making shell drivers under /usr/share/examples/drivers. As for
> things like "how does DMA work?", "what exactly is an interrupt and what do
> I do with it?" or "what's the story with memory ranges and devices then?"
> then I'm afraid I can't help you there.
>
> In fact (to -hackers) this strikes me as one of the more fundamental
> problems of free software: I would go and write/fix some device drivers
> (for example the unknown phy in fxp that bothers me so much), except I
> can't really get a handle on how you're supposed to start on these things.
> Comments? URL's for IRQ101? Perhaps I should just stop whingeing and go
> hack with it to see what happens? (probably best).
>
> >Jamie
>
> Dave
>
I've had to deal with this frustration too (and I still do) because
there is no good documentation to speak of for writing FreeBSD device
drivers. It wouldn't be so bad if there were man pages for many of the
commonly used functions like rman_get_bustag(), etc. This way you could
study the code of other drivers and quickly be able to identify and
understand the function calls you were seeing. Instead of grumbling
"what the !@#$ does that function call do?" just type "man 9 foo" or
whatever.
This is IMHO one of the advantages linux has over FreeBSD. You can run
by your local Barnes & Noble bookstore and pick up a copy of "Linux
Device Drivers" and start writing code that you actually understand.
<GRIPE> You'd think a couple of these FreeBSD wizards would get together
and write "FreeBSD Device Drivers" to spare us the pain and make a
little $$ while they're at it! </GRIPE>
Just my 2 cents.
--
Regards, Devin.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message