Re: force insmod on 2.6

From: Rusty Russell
Date: Sat Feb 10 2007 - 05:19:40 EST


On Fri, 2007-02-09 at 12:27 -0500, Leisner, Martin wrote:
> I had modules which were compiled with another kernel version string
> (same kernel though).
>
> In 2.4, you could do a force in the modules.conf files or in the insmod
> command line.
>
> The current insmod doesn't have a force option.
>
> Modprobe CAN force, but the modules has to be in the modules tree (i.e.
> not arbitrary places on the
> file system)
>
> Is there a way to force load a module at an arbitrary location?
>
> This is very handy for development (not production).

Sure, you simply remove the information from the module, then the kernel
will load it. To strip modversions, remove the __versions section. To
strip the version magic, it's easiest to remove the entire .modinfo
section. You can use objcopy for this...

Hope that helps!
Rusty.

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