LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   linux device driver (https://www.linuxquestions.org/questions/linux-kernel-70/linux-device-driver-571766/)

faris10 07-23-2007 10:21 PM

linux device driver
 
Hi all,
I have been searching for writing a linux device driver.
Can anyone give me a hint on how to write a driver? What need to be configured for this process.
Thanks

VampireL0rd 07-24-2007 09:49 AM

Yes, I have also begun learning to write drivers as well. The industry standard book is Linux Device Drivers by O'Reilly. The book is now in third edition and you will need it if you want to write drivers for the latest kernel 2.6.* or an eariler book for the 2.4*, but he does often mention the older kenrel system calls in the book. You can actually find a link to download second editon for free at www.freescale.com website, you have to make an account. Just look around in the Codewarrior for linux documentation and you should see it :D

faris10 07-24-2007 12:57 PM

Quote:

Originally Posted by VampireL0rd
Yes, I have also begun learning to write drivers as well. The industry standard book is Linux Device Drivers by O'Reilly. The book is now in third edition and you will need it if you want to write drivers for the latest kernel 2.6.* or an eariler book for the 2.4*, but he does often mention the older kenrel system calls in the book. You can actually find a link to download second editon for free at www.freescale.com website, you have to make an account. Just look around in the Codewarrior for linux documentation and you should see it :D

HI I have the third edition of the book. I installed the fedora 6 . but even the simple example does not work. Do I need to have source of the kernel? My point is about the preparation before start the writing process

jiml8 07-24-2007 07:50 PM

Oh, you absolutely have to have the kernel source. Yes, indeedy.

faris10 07-25-2007 09:51 AM

Quote:

Originally Posted by jiml8
Oh, you absolutely have to have the kernel source. Yes, indeedy.

Ok I was reading around on how to build the simplest device driver program. I see that I have to build a kernel tree. For that I have downloaded the last version of kernel from kernel.org and I have to build the new kernel in /usr/src/linux-2.6.X .
I do see that most of the documentations talk about the lilo. I dont have that on my system. I have the grub, so that should work the same almost, right?


All times are GMT -5. The time now is 12:22 PM.