LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Path to Linux Tree (https://www.linuxquestions.org/questions/linux-newbie-8/path-to-linux-tree-503369/)

_cih_ 11-20-2006 03:57 PM

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.

acid_kewpie 11-20-2006 04:02 PM

it'll be where your kernel source / headers are installed, e.g. /usr/src/linux-2.6.18/include

_cih_ 11-20-2006 04:29 PM

Quote:

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..

thanks.

Brian1 11-20-2006 04:54 PM

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.

Brian


All times are GMT -5. The time now is 10:32 AM.