Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora Resources > Guides & Solutions (No Questions)
FedoraForum Search

Forgot Password? Join Us!

Guides & Solutions (No Questions) Post your guides here (No links to Blogs accepted). You can also append your comments/questions to a guide, but don't start a new thread to ask a question. Use another forum for that.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 14th December 2005, 11:04 PM
raoul Offline
Registered User
 
Join Date: Sep 2005
Location: Hellas
Posts: 126
Post Howto compile modules which need kernel headers that are not included in kernel-devel

A while ago I had requested help in this forum about the problems in compiling the LIRC lirc_gpio module which could not be compiled using a stock kernel, due to the missing bttv.h and bttvp.h headers from the kernel-devel package. There were no helpful replies and I hadn't managed to find any other relative info, so i had quit. Today i got my hands on this problem once again and here is a general workaround for all such situations.

The kernel SRC RPM contains the full fedora kernel sources. In order to use the kernel headers from this package (these are complete - no missing files) you have to do some preparation so that they match your currently running kernel.

1 - Download the kernel SRPM. Be sure that it's the same version as your running kernel

2 - follow the instructions of the fedora 4 release notes paragraph 7.2.2.3.

3 - change to the directory /usr/src/linux (the directory names are from the release notes instructions)

4- Copy the Module.symvers file from the default kernel headers. (assumes that the kernel config hasn't been edited): [UPDATE]
Code:
# cp /usr/src/kernels/$(uname -r)-$(arch)/Module.symvers .
Step 4 is needed so that the third party modules we compile have proper dependency information.

5 - Run the following command inside this directory: [UPDATE]
Code:
# make prepare scripts
The last command is more general and complete than making each file individually (as I had written previously).

What you gain with this is that
1- you have the complete kernel headers in this directory which can be used to build modules for the currently running kernel
2- you do not have to compile the whole kernel in order to use the headers

What this small howto assumes is that you do not modify the kernel configuration. In such a case a full compilation of the kernel sources is needed.

Now, for example, when you need to build lirc_gpio, just use these complete headers, instead of those of the kernel-devel.

These instructions can also be found with more detail in this small article i have written: http://www.raoul.shacknet.nu/2005/12...ernel-headers/

My technical knowledge cannot provide any guarantee that this will work for you.
Enjoy!

Last edited by raoul; 16th December 2005 at 08:12 PM. Reason: IMPORTANT UPDATES TO SOME STEPS
Reply With Quote
  #2  
Old 16th December 2005, 08:10 PM
raoul Offline
Registered User
 
Join Date: Sep 2005
Location: Hellas
Posts: 126
The updated info in the above post is the following:

1 - The steps:
# make include/linux/version.h
# make include/asm
# make scripts
Have been substituted with the more general and complete:
# make prepare scripts

2 - The copy of the Module.symvers file from the directory, where the kernel-devel package is installed, to the root of our kernel sources’ directory has been added.
Reply With Quote
  #3  
Old 31st March 2006, 11:44 PM
pejcaofrito Offline
Registered User
 
Join Date: Mar 2006
Posts: 10
kernel 2.6.15/16?

have u being able to build lirc_gpio module under kernels 2.6.15/16 ?

I've tried several patches out there even lirc CVS (30/march/06) but w/o any success.

Nice & simple howto, I must add that docs related to kernels r better in FC4 than FC5.

4give 'bout my english

Pejcao.
Reply With Quote
Reply

Tags
compile, headers, howto, included, kernel, kerneldevel, modules

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
yum install kernel-headers and kernel-devel without internet access faichiu Using Fedora 4 29th April 2009 03:16 AM
kernel headers/devel mike123 Installation and Live Media 5 8th February 2009 04:46 PM
kernel-headers and kernel-devel? Gualicho Using Fedora 3 7th March 2007 01:08 AM
kernel, devel and headers JoeFrezza Using Fedora 3 20th February 2007 11:01 AM


Current GMT-time: 18:42 (Wednesday, 22-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat