LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 08-22-2005, 04:37 AM   #1
pr@vn_t
LQ Newbie
 
Registered: Aug 2005
Posts: 2

Rep: Reputation: 0
Writing Linux Device Drivers


I want to learn writing device drivers for linux...
Plzz advice me what to study...
Actually i have gone through following books already-->
1. Writing UNIX device Drivers by George Pajari
2. Linux Device Drivers by Alessandro et.al.
ny other reference material i can get plzz tell me
Do i also need to study the Linux Kernel?
Moreover which platform will be the best to use?
Another question Is it possible to make A Universal Device Driver I mean u need not have to write a diff device driver for diff Chipset features...(I m not talking about generic drivers)

bye
 
Old 08-22-2005, 07:11 AM   #2
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 Linux Device Drivers book you spoke of above is full of good examples on writing device drivers.

As far as "platform" is concerned... writting a Linux driver in anything other then C compiled by anything other then GCC is going to be a loosing battle. There are some people doing C++ runtime support for the linux kernel but it is terribly buggy and requires heavily patched kernels.

As far as studying the kernel.. it is a bit helpful to know a little about how the kernel works. There is no glibc availble in kernel space. The provided libraries in the kernel are much less extensive then that of userspace. I find it helpful to keep the Understand the Linux Kernel book around in case I need to look something up.
 
Old 08-22-2005, 12:37 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
"Use the Source, Luke!"

On a computer that you don't mind if you crash and have down for several days... on a computer with nothing else of interest thereupon ... dive-in and Just Do It. Take one of the examples from any of the books that you mentioned, and Just Build One. Actually hit that insmod command and watch the sparks fly!

It's like swimming: you can sit on the edge of the pool and read all of the books you want ... and drown. To learn how to swim, you have to get in the water.
 
Old 08-22-2005, 08:52 PM   #4
pr@vn_t
LQ Newbie
 
Registered: Aug 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by sundialsvcs
"Use the Source, Luke!"

On a computer that you don't mind if you crash and have down for several days... on a computer with nothing else of interest thereupon ... dive-in and Just Do It. Take one of the examples from any of the books that you mentioned, and Just Build One. Actually hit that insmod command and watch the sparks fly!

It's like swimming: you can sit on the edge of the pool and read all of the books you want ... and drown. To learn how to swim, you have to get in the water.
To remind you Linus Travolds said on August 1991 "When men were men and used to write their own device drivers."
The above reply is not an encouraging one...Though I'm a newbie to LQ but its not the case with my programming skills...
I don't know wat has been your experience with drivers but I hv tried my hands successfully in few of the drivers given in the above metioned books...I'm quite familiar with the dangers of system getting crashed and have faced a few times while testing drivers using [i]insmod[i/] but those were smaller modules that too in UNIX environment ...n only because of the problems I wanted the advice on writing Linux Drivers...
You can't swim just by throwing yourself in water you need someone to teach you...
So don't think that I have just gone through these books like Novels n m not trying anything....
Also i have written drivers on C platform but i have heard that they can be written in Perl too and its more easy there...that's why i had put up this question ....Is it true...plzz tell me
Bye
 
  


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
Where should I start if want to learn writing drivers under linux?? happy_maoron Programming 5 10-24-2005 03:39 PM
writing device drivers jessy jane Linux - Newbie 2 11-04-2004 12:25 AM
writing printer device driver in linux sidbash Programming 3 07-04-2004 11:16 PM
Quick and easy solution for writing a linux device driver? mr_segfault Programming 5 01-08-2004 10:45 PM
Writing NVIDIA drivers to CD on Windows, then running on Linux? tmadhavan Linux - Software 10 09-26-2002 01:36 PM

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

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