Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-20-2006, 03:57 PM   #1
LQ Newbie
Registered: Nov 2006
Posts: 4

Rep: Reputation: 0
Path to Linux Tree

Hello evreyone,

I am trying to compile a simple kernel module and its documentation says that :

* demo-module.c
* Compile with
* gcc -I/path-to-linux-tree /include -D__KERNEL__ -DMODULE -O2 \
* -Wall -Wstrict-prototypes -c -o demo-module.o demo-module.c

How can I determine the value of above mentioned "path-to-linux-tree" ??

Thanks in advance.
Old 11-20-2006, 04:02 PM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
it'll be where your kernel source / headers are installed, e.g. /usr/src/linux-2.6.18/include
Old 11-20-2006, 04:29 PM   #3
LQ Newbie
Registered: Nov 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Originally Posted by acid_kewpie
it'll be where your kernel source / headers are installed, e.g. /usr/src/linux-2.6.18/include

But in /usr/src directory I have only one folder called "Fedora"
and nothing interesting seems to be inside it...

and I have no idea where my kernel source / headers are installed..


Last edited by _cih_; 11-20-2006 at 04:31 PM.
Old 11-20-2006, 04:54 PM   #4
LQ Guru
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 62
In Redhat and Redhat clones like Fedora the kernel source is not normally installed during the install. To see if you have it do a ' rpm -qa | grep kernel '. Look for a kernel-devel****** that matches the current running kernel. If you don't have it then if it is the orginal kernel from the install the rpm will be on one of the CD. Or download it from the ftp site. If newer then goto where you got the new one and download the kernel-devel******.rpm that matches the current running kernel version.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Image Path reference in Linux (Absolute path) javabuddy Linux - General 7 06-05-2006 07:45 AM
the bible = the tree of the knowledge of good and evil () Jesus = the tree of life Michael111 General 2 04-14-2004 04:28 PM
Linux heirarchy tree arkamir Linux - Newbie 2 12-29-2003 04:54 PM
xmkmf path/to/your/xfree86/tree pkdk657 Slackware 17 03-14-2003 10:47 PM
need a P-Tree (Patricia Tree) library manaskb Programming 1 11-02-2002 06:15 PM

All times are GMT -5. The time now is 12:13 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration