FreeBSD Kernel "Newbies"

Wojciech A. Koszek wkoszek at freebsd.org
Sun Dec 16 11:06:15 PST 2007


On Sat, Dec 15, 2007 at 10:42:11AM -0800, Sean Bruno wrote:
> I noticed that the Linux folks have started up a "newbies" project 
> recently that allows mentoring and growth of new kernel programmers as 
> well as a conduit for manufacturers to get drivers written and bugs fixed.
> http://kernelnewbies.org/
> 
> Is there any interest in starting up such an endeavor in the FreeBSD 
> community?  I think I could spend ~10 hours a week on such a project, 
> but my kernel programming skills are mediocre at best.

For me personally FreeBSD project was the best place to start for doing
anything related with device drivers and kernel and low-level
programming in general.  Although I don't know if there's a place
similar to what Linux hackers have, but freebsd-hackers@ and
freebsd-drivers@ are good places to start.

I think there is non-written agreement of what is considered to be
useful across the kernel, and what seems to be a pretty standard toolset
for all kernel developers.

Those are:

- ioctl() handler:

  You have very simple example in src/share/examples/kld. 

- sysctl handler:

  You have appropriate manual pages (SYSCTL_, sysctl). Within
  src/sys/kern/... directory there are number of files implementing
  static sysctls as well as handlers declared with SYSCTL_PROC(), which
  let you to have an easy way between kernel and user space for
  exchanging data

- system call within your own file hooked to the kernel configuration:

  This task was pretty educational for me. It gives a sort of feeling of
  knowing, where to look in case something goes wrong with your future
  work (it involves a bit of knowledge of FreeBSD build infrastructure).
  Good places to look at:

  - src/sys/conf/...

  - src/sys/i386/conf/... (or whethever your computer architecture is)

  - src/sys/kern/... (geteuid() from src/sys/kern/kern_prot.c is good
    example).

Remember about style(9). We could put results of experiments like that
on the FreeBSD Wiki page if you're bored and could take some
snapshots/source code examples for others.

If you've done some (or all) of those already,
you can look at FreeBSD page about proposed ideas and problems to solve:

- http://www.freebsd.org/projects/ideas/

That's a pity we don't have freebsd-kernel@ to discuss only
kernel-related ideas, where advanced kernel programmers could share with
us some of their "tips & tricks". Hopefully, you also get some feedback
from one of those as a follow-up.

-- 
Wojciech A. Koszek
wkoszek at FreeBSD.org
http://FreeBSD.czest.pl/dunstan/


More information about the freebsd-drivers mailing list