LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices



Reply
 
Search this Thread
Old 05-07-2006, 01:52 PM   #1
mhuman1
LQ Newbie
 
Registered: May 2006
Posts: 7

Rep: Reputation: 0
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
 
Old 05-07-2006, 02:18 PM   #2
mhuman1
LQ Newbie
 
Registered: May 2006
Posts: 7

Original Poster
Rep: Reputation: 0
kernel header files

Hi,
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??

Thanks,
Keith Stallings
 
Old 05-11-2006, 02:08 PM   #3
mhuman1
LQ Newbie
 
Registered: May 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Hi,
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..

Thanks,
Keith Stallings
 
  


Reply


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
Tool to identify memory leak in loadable kernel module appas Programming 3 06-05-2012 10:56 AM
how to add new loadable module to kernel? Mistreated Linux - Software 7 02-02-2005 11:22 AM
RedHat 9 (2.4.20-8) kernel rebuild without loadable module support RedHatDude Linux - Software 4 09-09-2003 10:32 PM
RedHat 9 (2.4.20-8) kernel rebuild without loadable module support RedHatDude Red Hat 1 09-09-2003 10:20 PM
loadable kernel module brajesh Linux - General 2 01-17-2003 01:54 AM


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

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration