LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-06-2014, 08:03 PM   #16
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484

Original Poster
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176

Quote:
Originally Posted by Emerson View Post
You can build modules against kernel sources (no headers needed).
You can use symlinks pointing to your kernel image, since GRUB can read the filesystem (unlike LiLo) it will happily follow the symlink and load the kernel. So no, if using symlinks you do not need to update GRUB.
What reason would I need to build a module against the kernel?
For funtionality reasons for hardware maybe?
 
Old 03-06-2014, 08:04 PM   #17
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,
Quote:
Originally Posted by Emerson View Post
You can build modules against kernel sources (no headers needed).
The headers are absolutely needed, but they are contained in the source tree.

Evo2.
 
1 members found this post helpful.
Old 03-06-2014, 08:13 PM   #18
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484

Original Poster
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by evo2 View Post
Hi,

The headers are absolutely needed, but they are contained in the source tree.

Evo2.
I looked it up and found out that the kernel source code is organized into a tree.
Each branch represents a seperate functional area.

I understand now, thank you.
 
Old 03-06-2014, 08:23 PM   #19
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Quote:
Originally Posted by evo2 View Post
Hi,

The headers are absolutely needed, but they are contained in the source tree.

Evo2.
Correct. Meaning you do not need a separate headers package to build modules.
 
Old 03-06-2014, 08:27 PM   #20
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Quote:
Originally Posted by Ztcoracat View Post
What reason would I need to build a module against the kernel?
For funtionality reasons for hardware maybe?
Well, if we are talking about kernel modules then building them against very kernel sources the module will be used with makes sense, doesn't it?
 
Old 03-06-2014, 08:36 PM   #21
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,
Quote:
Originally Posted by Emerson View Post
Well, if we are talking about kernel modules then building them against very kernel sources the module will be used with makes sense, doesn't it?
I think the emphasis of the question was "why would I need to compile a module", more than "against the kernel".

In which case, yes, for new hardware is one possible answer.

Evo2.
 
1 members found this post helpful.
Old 03-06-2014, 08:37 PM   #22
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484

Original Poster
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by Emerson View Post
Well, if we are talking about kernel modules then building them against very kernel sources the module will be used with makes sense, doesn't it?
Yes, makes sense. I'll look online for an example where someone had to build a module against the kernel.
I've never done it-
The actual practice and seeing it done always helps me to understand.
 
Old 03-06-2014, 08:39 PM   #23
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484

Original Poster
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by evo2 View Post
Hi,


I think the emphasis of the question was "why would I need to compile a module", more than "against the kernel".

In which case, yes, for new hardware is one possible answer.

Evo2.
Thank you!-
I'll look online where someone did that for new hardware.
I found a article with an example to help me understand how to compile a module.
I don't entirely understand it completly I'll continue to study this.
http://www.cyberciti.biz/tips/compil...el-module.html

Last edited by Ztcoracat; 03-06-2014 at 09:29 PM.
 
Old 03-06-2014, 09:11 PM   #24
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
I'm kind of distanced from 'regular' Linux distros after I switched to Gentoo in 2003. In Gentoo all modules are built against kernel sources. Say, there is a driver which is not available in kernel. Examples from my household: r8168 NIC driver, VBox modules, nVidia kernel module. The only package in Gentoo that is built against headers (which is a separate package) is glibc.
 
1 members found this post helpful.
Old 03-06-2014, 09:20 PM   #25
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484

Original Poster
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by Emerson View Post
I'm kind of distanced from 'regular' Linux distros after I switched to Gentoo in 2003. In Gentoo all modules are built against kernel sources. Say, there is a driver which is not available in kernel. Examples from my household: r8168 NIC driver, VBox modules, nVidia kernel module. The only package in Gentoo that is built against headers (which is a separate package) is glibc.
It's nice to learn; thanks-
 
Old 03-06-2014, 09:35 PM   #26
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484

Original Poster
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
I don't see installing another version of the kernel on this "Voyager" distribution to be a good practice.
It would most likely be a waste of time.

I'd rather spend the time & effort reading more about the kernel and how to compile a module if I have to and continue
my reading the documentation on Slackware.

Thank you all very much.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Install older kernel module into newer kernel - no symbol version for module bayoulinux Linux - Kernel 4 10-26-2011 04:32 AM
install flex version 2.5.33 or newer amikd Linux - Newbie 1 03-06-2011 11:07 AM
building older version of kernel on newer version machine chakradhar.nannuri Linux - Newbie 4 01-25-2011 09:46 PM
install newer version of kvm? tonyh1986 Linux - Kernel 4 02-08-2009 11:46 PM
Xfree prob radeon.o kernel module version is 1.1.1 but version 1.5.0 or newer needed. jimdaworm Slackware 0 10-01-2003 06:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:28 AM.

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