Subject: Re: guidelines for including a newly-created driver?
To: None <thorpej@nas.nasa.gov>
From: Berndt Josef Wulf <wulf@hotdog.satech.net.au>
List: port-i386
Date: 08/13/1996 17:31:07
Jason Thorpe wrote
>
> On Mon, 12 Aug 1996 13:02:41 -0700
> Netbsd Mailing List <netbsd@vu.vu.com> wrote:
>
> > assuming that one has written a driver (call it "whatever.[ch]"), how
> > does one insert it into the configuration so that it is correctly
> > placed into the source tree for later compilation? is there a set
> > of documents/guidelines for doing this?
>
> Hm, there's not a manual page on that (yet), but I can answer your question:
>
> "it depends" :-)
>
> What kind of driver is it? Is it ISA, EISA, or PCI? (I'll assume it's
> one of those three, since you posted this to port-i386 :-)
>
> If you wrote an MI ISA, EISA, or PCI driver, you'll need to place it in
> sys/dev/{isa,eisa,pci}/files.{isa,eisa,pci} ...
>
> [ e.g. foo is a completely isa driver ]
>
> # The Zap Products foo card
> device foo
> attach foo at isa
> file dev/isa/foo.c foo
>
> That will get it to pull in foo.c. Now, if you need to put this in the
> {b,c}devsw, it needs to have a "flag" generated:
>
> device foo
> attach foo at isa
> file dev/isa/foo.c foo needs-flag
>
> That will generate a "foo.h" in the compile directory, which will define
> NFOO to 0 if no foo in config file, or 1 if foo is in the config file.
>
> Hope that helps ... let me know if you have more questions.
>
I have one on this topic:
How are major/minor device numbers handelt e.g. for the stallion
driver? Who assigns them and/or what is the criteria?
cheerio Berndt
--
Name : Berndt Josef Wulf
E-Mail : wulf@hotdog.satech.net.au
Sysinfo : DEC AXPpci33+, NetBSD-1.2Beta