Modules in 2.6 have be massaged just right.  :-)

Take a look at http://www.tldp.org/LDP/lkmpg/2.6/html/lkmpg.html#AEN181.  It
has an example makefile that is near required.

Leland


On 6/11/06 12:04 AM, "Rick Troth" <[EMAIL PROTECTED]> wrote:

> I'm having trouble building a new CPINT on SLES9 (SP3)
> and I wonder if someone else has seen these symptoms.
> Maybe someone can tell me what I'm doing wrong.
> It builds cleanly,  but refuses to load.  (64-bit)
>
> DETAILS
>
> We needed to upgrade CPINT (that story is for another note)
> so I got the latest and greatest source from Dr. Ferguson.
> It built just fine,  but when I tried to  'insmod',  I got
>
> insmod: error inserting './cpint_mod.ko': -1 Invalid module format
>
> I thought maybe I needed to play EXPLICITLY by the rules,
> so I dropped it into  /lib/modules,  ran  'depmod'  and then
> 'modprobe',  and got
>
> FATAL: Error inserting cpint
> (/lib/modules/2.6.5-7.191-s390x/extra/cpint.ko):
> Invalid module format
>
> I called Neale,  he considered what we were going through
> and suggested making sure that the support level might be mis-matched
> (between the kernel and 'insmod' and friends).  Sure enough,  we had
> the SP2 modutils,  but this is an SP3 kernel.   So I upgraded modutils
> ... but got the same problem.
>
> Finally,  running  'strace'  against an explicity  'insmod'  shows
>
> # strace insmod ./cpint_mod.ko
> init_module("^?ELF^B^B^A", 0x8edb7) = -1
> ENOEXEC (Exec format error)
>
> The ELF magic looks ugly,  but I don't really know
> if it is out of whack or if that is how it's supposed to look.
>
> I did have to wrangle the kernel source into a state where I could
> build kernel modules.  But that's not surprising.  And I have now
> re-done  'make config'  and  'make modules'  numerous times.
> (But it occurs to me as I send this note that I am NOT running a
> home-built kernel.)
>
> -- R;
>
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390
>

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to