Dear All,
We were developed a block device driver on linux-2.6.x kernel. We want
to distribute our driver as a RPM Binary. We are using the SuSE 9.1 with
2.6.5-7.71 kernel.
We build the RPM file using the fm.ko file on SuSE 9.1 with 2.6.5-7.71
kernel where fm.ko indicates our Block Driver module. When I try to run
the RPM file on a different kernel version it has given the following
error message.
FATAL: Error inserting fm
(/lib/modules/2.6.4-52-default/kernel/drivers/block/fm.ko): Invalid
module format
As I know the error message indicates that I compiled the driver under
2.6.5-7.71 kernel where as I am trying to insert the module in
2.6.4-52-default kernel.
My question is: Is it possible to compile and build a .ko file with out
including the version information? (i.e. I want to build a RPM file
using fm.ko file which was compiled using 2.6.5-7.71 and to run the RPM
file on a different kernel versions.)
We are not very sure of how to achieve this.
Please help us address this issue.
Thanks in advance and regards,
Srinivas G
On Fri, 2005-01-21 at 19:38 +0530, Srinivas G. wrote:
> Dear All,
>
> We were developed a block device driver on linux-2.6.x kernel. We want
> to distribute our driver as a RPM Binary. We are using the SuSE 9.1 with
> 2.6.5-7.71 kernel.
you forgot the URL to the sourcecode so that people can see what is up.
Srinivas G. wrote:
> Dear All,
>
> We were developed a block device driver on linux-2.6.x kernel. We want
> to distribute our driver as a RPM Binary. We are using the SuSE 9.1 with
> 2.6.5-7.71 kernel.
>
> We build the RPM file using the fm.ko file on SuSE 9.1 with 2.6.5-7.71
> kernel where fm.ko indicates our Block Driver module. When I try to run
> the RPM file on a different kernel version it has given the following
> error message.
>
> FATAL: Error inserting fm
> (/lib/modules/2.6.4-52-default/kernel/drivers/block/fm.ko): Invalid
> module format
>
> As I know the error message indicates that I compiled the driver under
> 2.6.5-7.71 kernel where as I am trying to insert the module in
> 2.6.4-52-default kernel.
>
> My question is: Is it possible to compile and build a .ko file with out
> including the version information? (i.e. I want to build a RPM file
> using fm.ko file which was compiled using 2.6.5-7.71 and to run the RPM
> file on a different kernel versions.)
>
> We are not very sure of how to achieve this.
> Please help us address this issue.
So you want to get around a mechanism that is preventing your driver
from causing an Oops because of different data structures, different
kernel APIs, etc., between those version? or any versions?
This is just asking for trouble. IOW, forget it.
--
~Randy
On Jan 21, 2005, at 09:08, Srinivas G. wrote:
> FATAL: Error inserting fm
> (/lib/modules/2.6.4-52-default/kernel/drivers/block/fm.ko): Invalid
> module format
>
> As I know the error message indicates that I compiled the driver under
> 2.6.5-7.71 kernel where as I am trying to insert the module in
> 2.6.4-52-default kernel.
>
> My question is: Is it possible to compile and build a .ko file with out
> including the version information? (i.e. I want to build a RPM file
> using fm.ko file which was compiled using 2.6.5-7.71 and to run the RPM
> file on a different kernel versions.)
This message means that if you load your module it is guaranteed to
cause
a crash because it is the wrong version. It would be best if you could
license your source code under the GPL and publish a set of small
discreet
patches to the stock kernel to this list. That way it would be included
and maintained across API revisions for you by the community.
Cheers,
Kyle Moffett
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/IT/U d- s++: a18 C++++>$ UB/L/X/*++++(+)>$ P+++(++++)>$
L++++(+++) E W++(+) N+++(++) o? K? w--- O? M++ V? PS+() PE+(-) Y+
PGP+++ t+(+++) 5 X R? tv-(--) b++++(++) DI+ D+ G e->++++$ h!*()>++$ r
!y?(-)
------END GEEK CODE BLOCK------