LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Module compilation needs kernel header files or kernel sources? (https://www.linuxquestions.org/questions/linux-newbie-8/module-compilation-needs-kernel-header-files-or-kernel-sources-895601/)

baxzius 08-04-2011 03:51 PM

Module compilation needs kernel header files or kernel sources?
 
i linked my build folder to /usr/src/linux-2.6.35-headerfiles instead of kernel source file.

Code:

total 4100
lrwxrwxrwx  1 root root    41 2011-08-05 01:47 build -> /usr/src/linux-headers-2.6.35-30-generic/
drwxr-xr-x  2 root root  4096 2011-07-12 07:30 initrd
drwxr-xr-x 10 root root  4096 2011-08-04 03:52 kernel
-rw-r--r--  1 root root 647923 2011-08-04 04:00 modules.alias
-rw-r--r--  1 root root 628128 2011-08-04 04:00 modules.alias.bin
-rw-r--r--  1 root root  5527 2011-07-12 07:28 modules.builtin
-rw-r--r--  1 root root  6753 2011-08-04 04:00 modules.builtin.bin
-rw-r--r--  1 root root    69 2011-08-04 04:00 modules.ccwmap
-rw-r--r--  1 root root 299843 2011-08-04 04:00 modules.dep
-rw-r--r--  1 root root 439522 2011-08-04 04:00 modules.dep.bin
-rw-r--r--  1 root root    135 2011-08-04 04:00 modules.devname
-rw-r--r--  1 root root  1405 2011-08-04 04:00 modules.ieee1394map
-rw-r--r--  1 root root    218 2011-08-04 04:00 modules.inputmap
-rw-r--r--  1 root root  21047 2011-08-04 04:00 modules.isapnpmap
-rw-r--r--  1 root root    74 2011-08-04 04:00 modules.ofmap
-rw-r--r--  1 root root 116717 2011-07-12 07:28 modules.order
-rw-r--r--  1 root root 425524 2011-08-04 04:00 modules.pcimap
-rw-r--r--  1 root root  1681 2011-08-04 04:00 modules.seriomap
-rw-r--r--  1 root root    131 2011-08-04 04:00 modules.softdep
-rw-r--r--  1 root root 239781 2011-08-04 04:00 modules.symbols
-rw-r--r--  1 root root 308359 2011-08-04 04:00 modules.symbols.bin
-rw-r--r--  1 root root 956050 2011-08-04 04:00 modules.usbmap
lrwxrwxrwx  1 root root    26 2011-08-05 00:26 source -> /home/saad/Downloads/linux
saad@saad-laptop:/lib/modules/2.6.35-30-generic$

still i able compile the modules...
Although i have question that,
should i link to kernel header folder? or kernel source directory?

kilgoretrout 08-04-2011 04:07 PM

In general, header files are sufficient for compiling kernel modules. The entire kernel source is needed if you want to compile a custom kernel.

baxzius 08-04-2011 04:12 PM

Quote:

Originally Posted by kilgoretrout (Post 4433952)
In general, header files are sufficient for compiling kernel modules. The entire kernel source is needed if you want to compile a custom kernel.

thank you so much brother.i love you.because its indeed important knowledge for me.
by the way...
did you see the source folder in the listing of files? i linked to the actual source folder.
will it be useful in future or any application would access it?


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