Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Feb 2000 10:46:31 +0100
From:      Alexander Langer <alex@big.endian.de>
To:        current@freebsd.org
Subject:   how to write kernel modules with newbus?
Message-ID:  <20000217104631.B4554@cichlids.cichlids.com>

next in thread | raw e-mail | index | archive | help
Hello!

I wanted to write a device driver as kernelmodule, using newbus.

Since there is almost no documentation, I've read some source.

It seems, that I have to do something like:

static device_method_t zivads_methods[] = {
    /* interface */                        
    DEVMETHOD(device_identify,      zivads_identify),
    DEVMETHOD(device_probe,         zivads_probe),   
    DEVMETHOD(device_attach,        zivads_attach),
    { 0, 0 }                                       
};

and to use zivads_* functions then.

But this fails because I don't know the right include files - DEVMETHOD
is expanded to unknown funtions

What I'm searching for is some info on how to do this.
Can anyone point me to a SIMPLE device driver module, that does this?
Or any documentation?

Or summarize how exactly stuff is done, e.g. which include files are
needed for the above?

It's very hard to find this things out when starting from scratch :)

When I will have got this working, I would even write a small
manual/introduction, that can be used as an example/manual for other
people, e.g. third party vendors, that want to write drivers for
newbus.

TIA

Alex
-- 
I need a new ~/.sig.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000217104631.B4554>