Is Kernel module is the same as a device driver?


 
Thread Tools Search this Thread
Operating Systems Linux Fedora Is Kernel module is the same as a device driver?
# 22  
Old 05-17-2011
Yes, you can. It often ends up as just a package like everything else, capable of being upgraded and replaced. You can even update it outside the package manager, just putting the right files in the right places -- though the package manager may never forgive you... I lost a Mandrake/Mandriva system that way, the package manager just locked up and never did anything else ever again, at all, ever, when I upgraded my own kernel. That's one reason I use gentoo, it installs kernel source, not kernel binaries, so you can do what you please with them and it won't throw a fit when I upgrade it when I want, or boot it with 3 different kernels should I want to.
This User Gave Thanks to Corona688 For This Post:
# 23  
Old 05-18-2011
Wow I didn't know that! So updating kernel outside distro' package manager renders it useless. I assume that if gentoo keeps updates in source form it requires recompilation of a kernel.
I've been researching it online and I guess it is logical to ask at this point:
1. Why don't they release Kernel updates in packaging format (would't it be easy for everybody), or is it possible "format" in into a package, so the package manager would be happy with it? After all when we get it from distro it is pre-formatted for package manger (or I'm wrong)?
2. In a case of Gentoo, how difficult it is to compile new kernel from updated sources? Is it something that mere mortal can do?

Last edited by newlinuxuser1; 05-21-2011 at 08:00 AM..
# 24  
Old 05-21-2011
No one?
# 25  
Old 05-24-2011
You agreed not to bump posts when you registered. And if you didn't know then you really should know now as it looks like you've been deleted for it once already. We're not "on call". And I've been away due to an injury. If you don't get answered immediately, wait! Smilie

Quote:
Wow I didn't know that! So updating kernel outside distro' package manager renders it useless. I assume that if gentoo keeps updates in source form it requires recompilation of a kernel.
Gentoo installs kernel source and lets you compile your own kernel. (It also has a 'genkernel' system to build it for you, but it doesn't work that well. Fortunately there's no pressure to use it.) It can install many different kernel sources side-by-side, and doesn't stop you from installing your own.

Quote:
1. Why don't they release Kernel updates in packaging format (would't it be easy for everybody), or is it possible "format" in into a package, so the package manager would be happy with it?
If I invented a new distro out of nowhere that doesn't oblige the kernel maintainers to start doing my work for me, packaging binary kernels in its special format. It's the distribution's job to manage that. It's pretty fundamental to the distro after all, doing it wrong could mess a lot of things up (as I've seen!)

In fact I don't think the kernel maintainers distribute binaries at all, just source.

I needed to upgrade my kernel by hand because my distribution wasn't updating it fast enough to keep up with drivers I needed.
Quote:
2. In a case of Gentoo, how difficult it is to compile new kernel from updated sources? Is it something that mere mortal can do?
What it means is running 'make menuconfig' in the source dir, checking that you have the drivers enabled that you need, quitting the config program and running 'make' and 'make install', copying the bzimage into your boot partition, editing a config file so your bootloader knows it's there, and rebooting into your new kernel.

Just building a default kernel without changing any options (running make menuconfig and immediately quitting, then continuing on) should build a kernel that works on most machines, but will have tons of drivers you don't need too and take longer to build. Not really a big deal though, it won't run slower.

How to edit your bootloader depends on what your bootloader is and how its config files are set up. I don't like the new grub 4, it's way more complicated than the old one for mostly no good reason. On gentoo I just install grub-static and get the old grub that way.

The #gentoo channel on freenode can be very helpful if you run into trouble
This User Gave Thanks to Corona688 For This Post:
# 26  
Old 05-26-2011
Corona688,

Thanks! It is VERY nice and useful post! It clears a lot of sky for me!
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Get pointer for existing device class (struct class) in Linux kernel module

Hi all! I am trying to register a device in an existing device class, but I am having trouble getting the pointer to an existing class. I can create a class in a module, get the pointer to it and then use it to register the device with: *cl = class_create(THIS_MODULE, className);... (0 Replies)
Discussion started by: hdaniel@ualg.pt
0 Replies

2. Linux

Linux Device Driver: avoid mem copy from/to user/kernel space

I recently started working with Linux and wrote my first device driver for a hardware chip controlled by a host CPU running Linux 2.6.x kernel. 1. The user space process makes an IOCTL call with pointer to a user memory buffer. 2. The kernel device driver in the big switch-case of IOCTL,... (1 Reply)
Discussion started by: agaurav
1 Replies

3. Solaris

SUNWglmr -- rasctrl environment monitoring driver for i2c or SCSI device driver ?

I've been researching minimizeing Solaris 8 and found that on the web page http://www.sun.com/bigadmin/content/packagelist/s8u7PkgList/p2.html the package SUNWglmr is listed as "rasctrl environment monitoring driver for i2c, (Root) (32-bit)" while in the document "Solaris 8 minimize-updt1.pdf"... (1 Reply)
Discussion started by: roygoodwin
1 Replies

4. UNIX for Advanced & Expert Users

Kernel and Device Driver Programming

I am looking for a guide on how to program for either the Linux or FreeBSD (includes 4.4BSD, NetBSD or OpenBSD) kernel. I would prefer to learn how to write device drivers, but anything would help. If you know, please email me at *removed* or leave a post here Regards, Farhan (0 Replies)
Discussion started by: Farhan
0 Replies
Login or Register to Ask a Question