Re: Insmod failed

From: Sam Ravnborg (sam@ravnborg.org)
Date: Tue Jan 07 2003 - 12:23:08 EST


On Tue, Jan 07, 2003 at 06:08:21PM +0100, Michal Sojka wrote:
> Hi,
>
> I'am porting driver for my USB 2.0 device to 2.5 and when I try insmod
> my module I get the following:
>
> Error inserting '/lib/modules/2.5.54/misc/usb-emise.o': -1 Invalid
> module format
>
>
> I compile my module separate of kernel tree with Makefile similar to
> that in Linux Device Drivers book (Rubini, Corbet). What is the right
> way to compile standalone modules?

Kai posted the following a few weeks ago:
-----
Well, you can do

cd my_module
echo "obj-m := my_module.o" > Makefile
vi my_module.c
make -C <path/to/kernel/src> SUBDIRS=$PWD modules
-----

Let me know if this solves the problem,

        Sam
-
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/



This archive was generated by hypermail 2b29 : Tue Jan 07 2003 - 22:00:36 EST