LinuxQuestions.org
Review your favorite Linux distribution.
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 09-24-2011, 11:41 AM   #1
dspjm
Member
 
Registered: Dec 2010
Distribution: Scientific Linux Slackware
Posts: 91

Rep: Reputation: 2
Unhappy I am learning to write Linux drivers, how should I start


I wanted to learn the kernel, then I found it too difficult, then I started reading Linux Device Drivers 3rd edition.
I have finished the first 3 chapters, however, I found it still very difficult to understand the content, especially the example code of scull.
The fourth chapter, it asks me to install a new kernel. I think this will cost me many drivers on my scientific linux. I doubt that if I can still use my computer if I install my own kernel...
I am feeling exhausted...
Help me please...
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 09-24-2011, 05:28 PM   #2
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Hello,

why don't you just install a new kernel on your system? it can reside beside the old kernel and you'll use it only for development purposes. You'll have to configure the bootloader for both kernels, so you can select which kernel to boot when you start the computer.

In my opinion one requirement if you want to write drivers is a deep understanding of Linux. If you're even not able to install a kernel you should not yet write drivers but learn more about the system in general.

Markus
 
2 members found this post helpful.
Old 09-24-2011, 05:42 PM   #3
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
installing a new kernel shouldn't cost you drivers, especially if installed properly, the point though of installing a second kernel is to have a known working kernel to which you can revert if you blow up the one you are doing your development.
 
Old 09-27-2011, 01:14 PM   #4
goossen
Member
 
Registered: May 2006
Location: Bayern, Germany
Distribution: Many
Posts: 224

Rep: Reputation: 41
I agree with Markus, you will need an extensive knowledge of the system to write device drivers. I recommend you start with something more simple.
 
Old 09-27-2011, 01:43 PM   #5
SigTerm
Member
 
Registered: Dec 2009
Distribution: Slackware 12.2
Posts: 379

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by dspjm View Post
The fourth chapter, it asks me to install a new kernel. I think this will cost me many drivers on my scientific linux. I doubt that if I can still use my computer if I install my own kernel...
Well, if you want to learn how to write drivers, you'll have to learn how to install kernel. There is absolutely no way around this.

If you're afraid to lose current system, you could use virtual machine, or make extra linux installation in another partition.

By the way, one system can have multiple kernels (only one kernel will run at the time). See boot loader documentation. For lilo, AFAIK kernel is specified using "image" parameter in lilo.conf.

Quote:
Originally Posted by frieza View Post
installing a new kernel shouldn't cost you drivers, especially if installed properly,
Well... on machine with proprietary nvida drivers after kernel upgrade you may be unable to log into X until you run nvidia driver installer again. That's just one example.
 
1 members found this post helpful.
  


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 did U start learning linux? caleb star Slackware 55 10-21-2011 08:17 AM
Please show me the best way to start learning the linux Hema Jayapal Linux - Newbie 20 10-29-2010 02:30 AM
Learning to write drivers - recommendation mgoblue80 Linux - Newbie 1 08-22-2009 08:51 AM
How to start learning Embedded Linux ? indian Linux - Newbie 5 06-03-2008 04:35 AM
Learning Linux: how do I start? karlkropotkin Linux - Newbie 2 03-15-2006 10:11 PM

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

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