Subject: Kernel source tree specifications
To: None <>
From: Ian Zagorskih <>
List: tech-kern
Date: 06/18/2003 23:54:23
Hi all,

I would likt to ask is there available any clean and complete documentati=
on or=20
better specification related to the structure of kernel source tree ?

Let me explain. I read article about "How to write your own pseudo device=
driver" from

Nice and usefull article at least for the beginner as I am. It says that=20
machine independant device driver code should be place at /sys/dev and=20
machine dependant should be at /sys/arch/<arch>/<arch>.

Ok, good statement. But this article says nothing about content of /src/d=
There are more then 40 sub-dirrectories in NetBSD 1.6.1 related to ISA, P=
USB and so so on. What about this structure ? Is it explicitly defined by=
document or "it happened so historically" ? What about other kernel sourc=
code tree structure ? How can i add my own "bus" into the kernel ? Where=20
should i place my code ?

Even while it's quite specific custom hardware and i doubt this code will=
ever released outside of our company, i would like to play with rules of=20
operating system rather inventing my own wheel.

At this moment i have several different PC104 addapters which implement a=
higher level some custom bus dependant message passing mechanism. CANBUS,=
BITBUS and DSP boards if to be exact. This message passing schemes do not=
in block nor character device scheme. For field busses like CANBUS or BIT=
IMO datagram socket scheme would be good.

While i have done all underlying hardware dependant board raw interface, =
i do=20
not know at this moment how to implement kernel <-> userland interface. C=
you suggest me a good example of alike "non-standard" interface ? ATM i'm=
trying to implement client synchronous message send->reply call through i=
but it dosn't look so well for me. Even ugly :)

Thank you.

RF, JSC Novosibirsk Geophysical Equipment Development Center.