LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-23-2005, 07:20 AM   #1
koodoo
Member
 
Registered: Aug 2004
Location: a small village faraway in the mountains
Distribution: Fedora Core 1, Slackware 10.0 | 2.4.26 | custom 2.6.14.2, Slackware 10.2 | 11.0, Slackware64-13
Posts: 345

Rep: Reputation: 33
Beginning Kernel Programming -- where to start?


Hi,

I am a Computer Science student. I would like to begin kernel programming. I am stuck as where to start. I did some research and found one guide and a tutorial at tldp
1) The linux kernel modules programming guide and,
2) The Linux kernel

Now I am not sure if these are proper to start with. I know C and have done some programming on the Linux platform but nothing related to the kernel. I know that kernel programming is no child's play, it requires considerable knowledge. I do not say that I have all the required knowledge, but I am ready to learn.
I would like to have your valuable suggestions on how/where to start, any good books/tutorials, or any other relevant information.
Thanks in anticipation.
 
Old 10-23-2005, 07:43 AM   #2
georgekjolly
LQ Newbie
 
Registered: Oct 2005
Posts: 5

Rep: Reputation: 0
kernal programming

hi koodoo

I would like to introduce u a guy who is proficient in kernal programming .His email id is
<zacharia@focuzinfotech.com>
 
Old 10-23-2005, 07:48 AM   #3
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
I would suggest that there are no short cuts. If you want to learn about kernel hacking, download the kernel source and start reading the code
 
Old 10-23-2005, 11:59 AM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
I would also suggest Linux Kernel Development by Robert Love as a pretty good introduction. The book Linux Device Drivers is also available online free courtesy of O'Reilly and the authors. I've not gotten very far into it, but in covering drivers it touches on a lot of other areas of the kernel. The Bovet and Cesati book Understanding the Linux Kernel is good and covers some stuiff that Love's book (at least the 1st ed., I don't have the 2nd ed. yet) doesn't, but it's based on the 2.4 kernel, not the 2.6. I imagine it will be updated at some point, but I'm not usre when.

Also, it's nice to get a comparative look at other *nix systems -- I've found Vahalia's Unix Internals, the New Frontiers good. For perspectives on a totally different OS, try Windows Internals plublished by (you guessed it) Microsoft Press.

Also, as was said, the only realy way to get good is to write code. Books will get you in the door, but you need to study and work with the code to make things happen.Sadly I don't have much time to do this myself. Also, if your college has an OS course, definitely take it. If not, consider investing in a beginning OS text such as Tanenbaum or the dinosaur book. This will help you come to grips with some of the terminology.
 
Old 10-23-2005, 08:08 PM   #5
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
The books btmiller recommended are all very good.

As far as downloading and looking through the code. The kernel can be daunting. There are millions of lines of code. The best way to go about learning the kernel is to take it in small chunks. Some things are more difficult then others (I had a hard time getting my mind around the memory management myself) and some are easier (scheduling for instance, is a pretty brilliant and simple piece of code).

The Linux Cross-Reference is a great site for looking through the code and finding things.
 
Old 10-24-2005, 07:38 AM   #6
koodoo
Member
 
Registered: Aug 2004
Location: a small village faraway in the mountains
Distribution: Fedora Core 1, Slackware 10.0 | 2.4.26 | custom 2.6.14.2, Slackware 10.2 | 11.0, Slackware64-13
Posts: 345

Original Poster
Rep: Reputation: 33
Thanks

Hi,

Thanks for your replies. I greatly appreciate your help.
Yes, I agree with Jtshaw as far as taking it in small chunks coz I don't feel confident that I can get started by just looking at the code. It seems to be quite daunting (at least to me).
Having said this I am not saying that I am looking for shortcuts, ya I know in the end it would be the actual code that I'll have to deal with, but I need a good book to get started.
One problem that I am facing is that at my place such books are not readily available and so I have to first request the local booksellers to get those books for me and then wait for sometime until they arrive. Meanwhile I am looking for some good stuff which I can find free on the internet. I have got the book Linux Device Drivers as it is available free on the net. I've also downloaded Kernel Hacking HOWTO and The Linux Kernel Hacker's Guide.
Okay so now I'll go to the local bookstore and ask if he can get me some of the books you've mentioned, until then I'll have to start off with the one's I've downloaded.

Thanks Btmiller for your suggestions on taking an OS course. Yes, I've already taken that and have read The Dinosaur Book
Any more suggestions/help is greatly appreciated.
Thanks again

Last edited by koodoo; 10-24-2005 at 07:40 AM.
 
Old 10-24-2005, 07:53 AM   #7
RipClaw
LQ Newbie
 
Registered: Oct 2005
Distribution: PCQ Linux 2006
Posts: 19

Rep: Reputation: 0
I would very very much suggest you to learn about how the hardware works, along with your kernel studies. Once you gain knowledge about hardware & signals, writing a kernel should be a walk in the park .Optimization skills won't hurt too.

There are a bunch of architecture books from Mindshare. Read them and I bet you become the king
See the pics of them here

Last edited by RipClaw; 10-24-2005 at 07:56 AM.
 
Old 11-17-2005, 01:08 PM   #8
koodoo
Member
 
Registered: Aug 2004
Location: a small village faraway in the mountains
Distribution: Fedora Core 1, Slackware 10.0 | 2.4.26 | custom 2.6.14.2, Slackware 10.2 | 11.0, Slackware64-13
Posts: 345

Original Poster
Rep: Reputation: 33
Hi, thanks for the pointers you all provided. I ordered my copy of Linux Kernel Development (2nd edition) by Robert Love and finally got the book (after quite sometime, I must say). I'm finding the book quite interesting. The style of the author is also quite good.
I'll need help as I move along in Kernel Programming and I look forward to you all and these forums
Thanks again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginning programming mikeymorgan Programming 38 06-28-2005 07:59 AM
just beginning c programming mcd Programming 12 02-24-2005 05:06 PM
Absolute Basics, I need to start at the beginning ffilc7373 Linux - Newbie 58 03-23-2004 04:49 PM
iptables coont start in the beginning dominant Linux - Newbie 4 02-25-2004 07:37 AM
Beginning Programming, What Language To Use For Linux sovietpower Programming 21 02-11-2004 09:44 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration