[openbeos] Re: add-ons and drivers and problems

  • From: "Erik Jaesler" <erik@xxxxxxxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Tue, 09 Jul 2002 20:48:22 -0700

>Oh, I just have been at http://www.cgsoftware.com/erik/Repository/
>trying to find a place for a kernel driver to checkin. Noticed quite a 
problem:
>
>src 
>       add-ons (should mirror /boot/beos/system/add-ons; drivers go in here) 
>
>Well  /boot/beos/system/add-ons does not only contain drivers. It 
contains
>add-ons running in userspace, as well as drivers

As per discussions some weeks back about this very issue, this is the 
correct place to put drivers (as well as add-ons of other sorts).  I 
seem to recall you suggesting this very layout.

>1) we put all kernel drivers into subdirectories of 
/boot/beos/system/add-ons/kernel

Yes.

>This means, we need to move /boot/beos/system/add-ons/net into 
/boot/beos/system/add-ons/kernel/net
> (there also is something from networking currently, why is it in two 
places?)

The distinction, which I admit is somewhat artificial, is that the stuff 
in current/src/add-ons/net are add-ons to the net_server, not the kernel 
directly.

>2) we use a different directory for kernel drivers, 
current/src/kernel/add-ons is already there.
>It also caontains a networking driver, this means we have networking 
drivers/modules in three 

I'm not sure why this is there (if someone on the kernel team had caught 
it, I would have removed it); current/src/add-ons/ is where it should 
live.

>3) we put all drivers into current/src/kernel/drivers, where also some 
drivers are located.

My understanding is that these are largely temporary, and will be 
replaced by "real" drivers in current/src/add-ons/kernel.

>4) we mix kernel drivers and userland add-ons, which is a very very bad 
thing.

Agreed. =)

>Come on, tell me that we can do better. What do we do now?

Add-ons and drivers both go in current/src/add-ons.  Drivers 
specifically should go in current/src/add-ons/kernel/drivers; other 
direct kernel add-ons in current/src/add-ons/kernel; all other add-ons 
(whether loaded in kernel or user space) go in current/src/add-ons.  
Various subdirectories at each level are to be expected just to keep 
things organizationally sane.

>Another problem:
>
>/current/src/kernel/drivers/arch/i386
>
>I assumed all i386 had been changed to x86. Why it there i386 again?

There were some i386 directories whose disposition had not been 
concretely decided; I suppose it's my fault for not pursuing the issue 
more vigorously. =\

>Proposal:
>We put all drivers handling some specific hardware and running in the 
kernel into /current/src/kernel/drivers
>We put all modules running in the kernel, like tcp, udp, ... into 
/current/src/kernel/add-ons
>We put all add-ons running in userspace, like Screensaver into 
/current/src/add-ons

This is not what is currently intended, but if the kernel team is OK 
with all kernel-mode add-ons being in their directory, it's fine with 
me.  Personally, I prefer the current setup, as it more closely mirrors 
what you see on an actual R5 system.

> /current/src/kernel/drivers/audio/ac97/ich

Assuming we decide to place drivers in the kernel source tree, this is 
my preferred placement.  Under the current setup, it would be

/current/src/add-ons/kernel/drivers/audio/ac97/ich

which is my *preferred* preferred placement. ;)

e

Necessity is the plea for every infringement of human freedom. It is the 
argument of tyrants; it is the creed of slaves.
        -William Pitt, British prime-minister (1759-1806)


Other related posts: