Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Sep 2005 18:35:53 +0200
From:      Stefan Sperling <stsp@stsp.in-berlin.de>
To:        kamal kc <kamal_ckk@yahoo.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: kernel hack
Message-ID:  <20050925163553.GA956@dice.bliss.lan>
In-Reply-To: <20050925103151.68094.qmail@web35703.mail.mud.yahoo.com>
References:  <20050925103151.68094.qmail@web35703.mail.mud.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Sep 25, 2005 at 03:31:51AM -0700, kamal kc wrote:
> does anybody know what is the best way
> to start kernel hack.

IMHO, the best way to start kernel hacking is to invest
an awful lot of time into reading books.

I presume you know C _really_ well already :)
And by really well I also mean you know what is wrong about C!

Any modern book on writing device drivers should be a good starting point.
It does not really matter which UNIX-derivative the book is about.
Hint: There are a lot of these books about Linux.

Read programmer's datasheets, preferably for devices you own,
and learn how to talk to registers from C.
ftp.alsa-project.org has datasheets for sound cards, for example.

Make sure you also learn about multi-threading (mutexes, semaphores etc).
A lot of kernels are multi-threaded these days.

A very good overview of the FreeBSD kernel is given in "The Design
and Implementation of the FreeBSD Operating System", by Mr. McKusick
and Mr. Neville-Neil. Read all of it. Having learned about drivers
and multi-threading beforehand helps a lot.

> Any references to any web page would 
> be appreciated

Get books, it's worth it! You really don't want to read this much
material on your monitor! (Unless you have a 28" TFT of course ;).
Plus books are often much better written, easier to understand,
and a lot more detailed than tutorials on the web.

http://www.NetBSD.org/Documentation also has an interesting kernel
section to get you started before your books arrive :)

-- 
stefan
http://stsp.in-berlin.de                                 PGP Key: 0xF59D25F0




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