LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   kernel source tree? (https://www.linuxquestions.org/questions/linux-kernel-70/kernel-source-tree-441744/)

nmainak 05-04-2006 10:26 PM

kernel source tree?
 
Hi all,

I would like to get into device drivers and therefore picked up the linux device drivers book by alessandro rubini ..etc. I have soo many questions right off the bat its depressing.

1. Okay, the prerequisite is to "..come up with a kernel source tree (either from kernel.org network or your distro's kernel source package), build a new kernel and install it in your system..." So right there, im lost. I am running SUSE linux 9.3 and i do have a /usr/src/linux-2.6 ..etc drectory with the sources...does that mean that i already have that kernel tree? I have not compiled it (do I need to ?) and dont know how.

2. Secondly, the book continues to say (and ive heard from others as well) that its best to download the recent kernel from kernel.org instead and use it coz of some differences in API as seen by device drivers? Okay so assuming that I want to take this route (download kernel), wont that interfere with my existing kernel?

3. The book also says that its best to be "..running the target kernel when you build your modules..". Haa, Im totally lost coz how can I be running a different kernel from the one installed on my laptop? How many active kernels can you have?

I want to believe that this is not soo hard and at one point Ill sit back and remember the questions I had and laugh out loud but boy....talk about the horizon. So please, any help is greatly appreciated (if you would, please try to number the answers according to the numbers along the question - that way, I know what goes where and dont get even more confused). Thanks

Nick../

raskin 05-05-2006 12:35 AM

1. I guess this is the kernel tree. Go to Documentation/HOWTO . Follow its recommendations. For instance, read all mentioned aout how to build. It's a prerequisite of writing a driver, I guess.
2. It's harmless until it's loaded.. Maybe you'll have to load it, but it won't break much things (if properly built)
3. You can have a lot of kernel versions _installed_ and choose one on each reboot to _load_


All times are GMT -5. The time now is 11:15 PM.