LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-22-2009, 03:03 AM   #1
saurabh nigam
Member
 
Registered: Feb 2009
Location: @ /home & @ my blog at http://saurabh-nigam.blogspot.com/
Distribution: Slackware , Fedora , Ubuntu
Posts: 35

Rep: Reputation: 15
Kernel headers


friends i am creating kernel drivers so i need header files including
linux/modules.h
&others
can anyone guide me in getting these header files
 
Old 02-22-2009, 03:05 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
install
build-essential linux-headers-`uname -r`
 
Old 02-22-2009, 10:21 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
0) No package 'build-essential' in Mandriva.

1) # urpmi kernel-headers-`uname -r`
There is no file 'modules.h' in /usr/include/linux
from the Mandriva 'kernel-headers' package.

2) # urpmi kernel-source-`uname -r`

The 'modules.h' file can be found in
/usr/src/linux-´uname -r`/include/config/

.... and it is just an empty text file.

Try with an empty file :
# 'touch /usr/include/linux/modules.h'
or where ever you need it.
( If it doesn't work, it will do no harm either ! )
.....

Last edited by knudfl; 02-23-2009 at 07:16 AM.
 
Old 02-22-2009, 10:43 AM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
You need the kernel sources against which you are building your driver. The vendor of the Linux distribution you are using should be able to provide these. Conventionally, these would be installed in /usr/src/linux.... You might chack whether they are already installed there.
--- rod.
 
  


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
Automatic removal of kernel headers package when kernel packages are removed bgoodr Debian 3 12-30-2008 08:14 PM
do kernel headers come with kernel-source package? janos Linux - Kernel 1 05-30-2006 09:38 AM
Errors Compiling Kernel 2.6 on Slackware 10.2 - Old kernel headers required? Dave S. Slackware 8 03-04-2006 12:15 AM
trying to find/install kernel-source or kernel-headers timsch75 Slackware 3 10-22-2005 09:17 AM
send packets with kernel routing and without kernel messing with headers bassdemon Programming 5 02-08-2005 06:29 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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