From owner-freebsd-current@FreeBSD.ORG Sun Sep 25 16:36:15 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD45416A41F for ; Sun, 25 Sep 2005 16:36:15 +0000 (GMT) (envelope-from stsp@stsp.in-berlin.de) Received: from einhorn.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 01BFA43D55 for ; Sun, 25 Sep 2005 16:36:14 +0000 (GMT) (envelope-from stsp@stsp.in-berlin.de) X-Envelope-From: stsp@stsp.in-berlin.de Received: from dice.bliss.lan (e178184157.adsl.alicedsl.de [85.178.184.157]) (authenticated bits=0) by einhorn.in-berlin.de (8.12.10/8.12.10/Debian-4) with ESMTP id j8PGaAu1013165 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 25 Sep 2005 18:36:10 +0200 Received: by dice.bliss.lan (nbSMTP-1.01-cvs) for uid 1001 (using TLSv1/SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits)) stsp@stsp.in-berlin.de; Sun, 25 Sep 2005 18:36:10 +0200 (CEST) Date: Sun, 25 Sep 2005 18:35:53 +0200 From: Stefan Sperling To: kamal kc Message-ID: <20050925163553.GA956@dice.bliss.lan> Mail-Followup-To: kamal kc , freebsd-current@freebsd.org References: <20050925103151.68094.qmail@web35703.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050925103151.68094.qmail@web35703.mail.mud.yahoo.com> User-Agent: Mutt/1.4.2.1i X-Spam-Score: (0.188) AWL,BAYES_50,FORGED_RCVD_HELO X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Cc: freebsd-current@freebsd.org Subject: Re: kernel hack X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2005 16:36:15 -0000 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