-   Linux - Kernel (
-   -   kernel version 2.4 loadable kernel module (

mhuman1 05-07-2006 12:52 PM

kernel version 2.4 loadable kernel module
I am trying to write a simple loadable kernel module for a 2.4 kernel. It is my understanding that for a 2.4 kernel, the compiler needs only the header files for the respective kernel. The compiled kernel version and the header file's version must match.

Unlike the situation for a 2.6 kernel which requires the entire source tree on your computer, 2.4 only requires the headers.

My new Debian install includes the required headers under /usr/linux/include and /user/linux/asm. Like I said the entire source isn't there only the headers.

I suspect that normally with a new debian install the version of the headers under linux/ will agree with the compiled kernel in the computer.

I am working with a small computer board that has a version of the 2.4 kernel compiled in it. The header files under /linux have another version of 2.4 headers.

How do I replace just the header files on the board so that the compiled kernel version and the header file version agree??

I do not have room for the entire source tree on the little board, but since the header files are already on the little board, I could write over them.

Thanks for any help,
Keith Stallings

mhuman1 05-07-2006 01:18 PM

kernel header files
I am using a Debian distribution. I found that the Debian site has pre-packaged header files to handle my problem. In other words, it has the header files for 2.4.16 for example.

My real question is a little more complex. My small board has a special version of which is a slightly modified version of the 2.4 kernel. The company doesn't provide a sevice like Debian does to provide the header files.

I can get the entire source tree from the company, but it won't fit on my little board. I guess the only way to fix my problem is to put the entire souce tree on a regular pc, then extract the header files from the source and write over the ones on my little board?

I am extremly new at this. Am I thinking my problem through correctly??

Keith Stallings

mhuman1 05-11-2006 01:08 PM

I finally got the kernel header files from the maker of my board. I used ftp to transfer the files over. I can now compile using the gcc compiler on my little board. I will probably wind up using a cross compiler on a linux desktop and transfer the modules over to the little board..

Keith Stallings

All times are GMT -5. The time now is 03:40 AM.