-   Linux - Hardware (
-   -   Where is modversion.h in 2.6? Trying to cross compile a module. (

jackcomputero 12-01-2004 01:51 PM

Where is modversion.h in 2.6? Trying to cross compile a module.
I am attempting to produce a module which can be used on multiple versions of the 2.6 kernel. The limiting factors seem to be the vermagic...(I can hexedit that and get it past that..I know it is wrong, I could also just force) and some symbols not defined in the version of os I am running.

I compiled the module on Mandrake 10 with 2.6.3-4mdkenterprise version kernel. There are symbols defined __read_lock_failed and __write_lock_failed. These apparently come from the SMP part of the kernel. When I try to run this on a non SMP kernel, it fails telling me that those are non-extant. If I define them, as empty functions it fails to align the symbols correctly.

Is there a better way to cross compile a module for multiple versions of the OS?

I have read about CONFIG_MODULES but have not had any sucess using it. Reading many posts online about it failed to educate me. So, I look in the code and what I can see is that the kernel checksums it's symbols if it is on. Then compares the checksummed symbol to the one in the module. If they match then it allows "untainted' loading of the kernel. But wtf mate? How do I use that to my advantage. Particularly when I have a symbol that is not even defined in the kernel, but expected by the module!

Jackalo Computero


All times are GMT -5. The time now is 06:42 AM.