I am learning to write Linux drivers, how should I start
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233
Rep:
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.
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.