lkml.org 
[lkml]   [2003]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: compiling modules after 2.4.* --> 2.6.0 upgrade
On Tue, 23 Dec 2003 02:20:06 -0600 (CST) Ben Srour <srour@cs.wisc.edu> wrote:

| Hello,
|
| I'm attempting to port a module I wrote for the 2.4 series to 2.6 but I
| get the following error when I try and insmod:
|
| root@dimension# /usr/sbin/insmod gpstest.o
| insmod: error inserting 'gpstest.o': -1 Invalid module format
| root@dimension#

In 2.6.x, modules are named *.ko, and you 'insmod|modprobe *.ko'.

To have *.ko built correctly, read and use
./Documentation/kbuild/{modules.txt,makefiles.txt}.

Here is a working trivial makefile for out-of-tree simple modules:

# makefile for oops_test/dump*.c
# Randy Dunlap, 2003-03-12
# usage:
# cd /path/to/kernel/source && make SUBDIRS=/path/to/source/oops_test/ modules

obj-m := dump_test.o

# end;


| (/sbin/insmod returns:
| insmod: QM_MODULES: Function not implemented
| but isnt that a remnant of the 2.4 series module-init-tools?)

Yes.

| /usr/sbin/insmod -v
| module-init-tools version 3.0-pre1
|
| /sbin/insmod -V
| insmod version 2.4.18
| ....
|
|
| I'm guessing this is happening because the module it seems to be compiling
| for is 2.4:
| root@dimension# strings gpstest.o
| kernel_version=2.4.9-31
| ....
| root@dimension#
|
| I'm using module-init-tools-3.0-pre1, gcc3.0.4, kernel2.6.0

Make sure that the module-init-tools binaries are in $PATH
for user=root (and before the older ones if both are there).

--
~Randy
MOTD: Always include version info.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.462 / U:2.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site