LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 10-22-2008, 10:31 PM   #1
NirvanaII
Member
 
Registered: Jun 2005
Posts: 139

Rep: Reputation: 18
Confusion over kernel source


I just want something clarified:

A Mandriva 2008.0 distro would have to come with a kernel, otherwise it wouldn't work, right? So where I have read of people installing a kernel source, should I assume they are writting a different version to the one they have? i.e. it's not possible to have Linux running without a kernel source installed?

If I am wrong, then what is the difference between the 'running kernel', that makes Mandriva work, and a source that somebody might install?


NirvanaII
 
Old 10-22-2008, 10:41 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,340

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
You do not need the kernel source to run Linux. The source code is compiled into binary code. The kernel binary code is what you boot and run.

You need the kernel source to compile a new kernel binary or to compile something like a device driver to add to your existing kernel binary.

If you are adding something like a device driver from source to your existing kernel then you need either the entire kernel source or the kernel headers which correspond to the kernel you are running (i.e. they are the same version). Kernel headers are just a subset of the entire kernel source.

If you are compiling a complete kernel then you need the entire kernel source for the version that you want to compile. This is not necessarily the same as the kernel version you are currently running.

-------------------
Steve Stites
 
Old 10-23-2008, 12:11 AM   #3
NirvanaII
Member
 
Registered: Jun 2005
Posts: 139

Original Poster
Rep: Reputation: 18
Okay, so even if the same version, you need the source or header to just write a new device in effect?

Umm... do you somehow need to 'wrap' a device inside a source or header before writing a change to the existing kernel then?

I'm trying to compile the source "ungrab-winmodem", which I have read of another LQ user's account, MAKEs successfully when the kernel source is installed. Am I right to think that in the process of MAKEing ungrab-winmodem, there is a re-working of the kernel source which accomodates the ungrab-winmodem.ko driver it creates?

Should I take 'installing' source kernel to mean the placing of a resident source ready for the rewritting of the existing binary kernel? Is my understanding correct? It seems, if you were to use the same src. as binary verion of the kernel, then installing new binaries would be pointless unless it should somehow be worked.

NirvanaII
 
Old 10-23-2008, 06:57 AM   #4
Total-MAdMaN
Member
 
Registered: May 2008
Distribution: Gentoo
Posts: 306

Rep: Reputation: 34
A .ko file is a module (think: device driver). The reason you needed the source code to compile it is that it needed to know what methods were available for it to communicate with the kernel. Once the source is compiled into a module (the .ko file) it can be loaded using the modprobe command. No recompiling of the kernel is necessary.
 
  


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
LXer: Law In Business: Open source of confusion LXer Syndicated Linux News 0 12-14-2006 12:03 PM
Kernel Confusion rookiepaul Linux - General 4 03-30-2006 04:46 PM
compiling from source confusion ben1337 Linux - Newbie 8 03-24-2005 09:51 AM
Swaret/Pkgtool confusion and a source compile query dos1 Slackware 3 10-21-2003 06:51 AM
kernel confusion -- which source for 2.4.18-bf2.4 graybeard Linux - Distributions 1 02-17-2003 06:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

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