LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 07-02-2006, 06:20 PM   #1
harsh_electro
LQ Newbie
 
Registered: Jun 2006
Location: New York
Distribution: Ubuntu
Posts: 12

Rep: Reputation: 0
Device Driver


Hi Friends,
I have been trying to learn Linux device driver programming.I have been following LKM Programming guide and Linux Device driver 3rd Edition.But it seems i have no clue of entire process to write a complete driver which i can use to interface the serial port or parrallel port.
I am looking for some concrete document/link/code which can give me a better idea of complete driverdevelopment cycle.

Thanks & Regards
 
Old 07-02-2006, 11:55 PM   #2
rjsiva
LQ Newbie
 
Registered: Jul 2006
Location: chennai,tamilnadu,india
Posts: 10

Rep: Reputation: 0
help me too

hai ,
iam also a beginer of a device driver program.. if you find any code/ebook/website please share with me to start in a device driver.. i dont have any idea of how to enter into it.. can u guide me in this regard. where to start and proceed to be device driver programmer in linux..

regards
sivakumar
 
Old 07-03-2006, 11:08 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,649
Blog Entries: 4

Rep: Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934
Duplicate thread...
Use the source-code of Linux itself.
It's in /usr/src/linux/drivers/block, probably.
If you are using packages, source-code might be in an optionally installed package.
 
Old 07-03-2006, 02:59 PM   #4
madluther
Member
 
Registered: Aug 2004
Distribution: LFS
Posts: 350

Rep: Reputation: 31
Code examples that LDD3 refers to, that can be compiled and tested are available at

ftp://ftp.oreilly.com/pub/examples/l...xamples.tar.gz

They may help to fill in some gaps.

Mad.
 
Old 08-20-2006, 09:18 AM   #5
Ulises
LQ Newbie
 
Registered: Aug 2006
Location: Argentina
Distribution: Ubuntu 6.06 - Kernel 2.6.15
Posts: 4

Rep: Reputation: 0
Hi:
I'm a newbie too and also trying to start in kernel programming. These links (most of it, related with serial port driver) I have found, maybe can help:
(I cannot post URLS yet ;-< ; don't copy&past! )

www[.]linux.it/~rubini/docs/serial/serial[.]html
www[.]linuxjournal[.]com/node/6331/print
www[.]linuxjournal[.]com/node/5896/print

Other resource to start is www[.]kernelnewbies[.]org Take a look of the mail list, it really can help you a lot!

Of course, the most important (also the hardest way):
/usr/src/linux/drivers/...
(For Serial Port - Generic UART)
/usr/src/linux/drivers/serial/serial_core.c
/usr/src/linux/drivers/serial/8250.c
/usr/src/linux/drivers/serial/8250_pnp.c

Regards,
Ulises
 
Old 09-08-2006, 07:52 AM   #6
satya482
LQ Newbie
 
Registered: Sep 2006
Posts: 1

Rep: Reputation: 0
hai friends....

iam also newbie..

please help me in adding a new driver source code into /usr/sr/linux/drivers/ directory..
and what all the files i need to manipulate..

can u take example of adding bnx2.c driver into /usr/sr/linux/drivers/net/ directory .... and what all the changes should be made to make file and Kconfig file...
 
Old 09-10-2006, 09:54 PM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,649
Blog Entries: 4

Rep: Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934
Please, gentlebeings, save yourself a lot of trouble and start by reading the existing source! I wasn't trying to "blow you off" by saying that.

You're not the first ones on the planet to start trying to write a driver, so it makes no sense at all to try to start from-scratch. The most efficient way to learn is by example, and Linux is by its very nature stuffed with literally hundreds of these.

Find a driver that's as close as possible to the one you need to write. Read all of the source-code systematically and then try to trace a request through it. Try to see what happens when an interrupt comes in.

Keep a diary. If you run into something you don't understand, write it down but keep going. Once you've captured the question on paper you won't forget it and you can pursue it at the most opportune time.
 
  


Reply



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
device driver jful99 Programming 6 10-09-2005 12:34 AM
Device driver from 2.4 to 2.6 setu_garg Programming 1 09-16-2005 11:27 AM
Device Driver deveshs Programming 1 04-26-2005 11:53 PM
device driver rjc915 Programming 4 10-06-2003 11:43 AM
device driver yanw Linux - Hardware 1 01-23-2003 09:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 12:52 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