mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rddunlap@osdl.org>
To: Ben Srour <srour@cs.wisc.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: compiling modules after 2.4.* --> 2.6.0 upgrade
Date: Tue, 23 Dec 2003 08:39:29 -0800	[thread overview]
Message-ID: <20031223083929.49dc6f89.rddunlap@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0312230211500.28609-100000@data.upl.cs.wisc.edu>

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.

  parent reply	other threads:[~2003-12-23 16:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-23  5:11 2.6.0-mm1 Andrew Morton
2003-12-23  5:27 ` 2.6.0-mm1 Valdis.Kletnieks
2003-12-23  5:28 ` 2.6.0-mm1 Marcos D. Marado Torres
2003-12-23  5:28 ` 2.6.0-mm1 Andrew Morton
2003-12-23  5:40   ` 2.6.0-mm1 Stan Bubrouski
2003-12-23  7:57     ` 2.6.0-mm1 Andrew Walrond
2003-12-23  8:20       ` compiling modules after 2.4.* --> 2.6.0 upgrade Ben Srour
2003-12-23 16:25         ` Erik Mouw
2003-12-23 16:27         ` Jonathan Corbet
2003-12-23 16:39         ` Randy.Dunlap [this message]
2003-12-23  7:30 ` 2.6.0-mm1 Martin J. Bligh
2003-12-23 17:29 ` 2.6.0-mm1 Tom Rini
2003-12-23 17:31   ` 2.6.0-mm1 Tom Rini
2003-12-23 21:08 ` 2.6.0-mm1 viro
2003-12-24 13:09 ` 2.6.0-mm1 William Lee Irwin III
2003-12-24 14:26   ` 2.6.0-mm1 William Lee Irwin III
2003-12-24 15:39 ` 2.6.0-mm1 Gene Heskett
2003-12-28  3:43 ` [PATCH] 2.6.0-mm1 Ramón Rey Vicente
2003-12-28 10:58 ` 2.6.0-mm1 Christoph Hellwig
2003-12-28 19:49   ` 2.6.0-mm1 Andrew Morton
2003-12-28 19:52     ` 2.6.0-mm1 Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031223083929.49dc6f89.rddunlap@osdl.org \
    --to=rddunlap@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srour@cs.wisc.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®