Bug 141376 - not a "how do I compile kernel" question (Invalid module format)
not a "how do I compile kernel" question (Invalid module format)
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Dave Jones
Depends On:
  Show dependency treegraph
Reported: 2004-11-30 14:24 EST by ezekiel das
Modified: 2015-01-04 17:13 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-10-02 21:01:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description ezekiel das 2004-11-30 14:24:47 EST
Description of problem:

Kernel sources are no longer shipped with FC, they may be d/l from 
the SRPMS section of a d/l mirror. However, if one unpacks and moves 
to the traditional /usr/src tree the kernel source of FC3 they get: 
linux-2.6.9 (I do: ln -s linux-2.6.9 linux for convenience and 

Before I compile and install some modules for LIRC (lirc.org) --in 
order to get the right header files, etc. I've had to do the 
following in /usr/src/linux:

# cp /boot/config-`uname -r` /usr/src/linux 
# cd /usr/src/linux 
# make oldconfig 
# make prepare

I then make and install the LIRC modules which go 
in /lib/modules/2.6.9-1.667/misc

But upon modprobe lirc_dev or modprobe lirc_i2c I get: Invalid module 
format --this is because the vermagic is incorrect. Using modprobe -f 
doesn't work either. 

I imagine I've missed some patches or something for this kernel tree 
that might be needed. My question then is this: The kernel-2.6.9-
1.667.src.rpm  installs in /usr/src/redhat/SOURCES. Is this where I 
should unpack and patch up? And do I need all of these patches? And 
will this get me to%2
Comment 1 Dave Jones 2004-11-30 14:30:27 EST
if you type dmesg, it'll tell you why it mismatched.
Comment 2 ezekiel das 2004-11-30 14:48:25 EST

Right, something like this:

lirc_dev: version magic '2.6.9 586 REGPARM gcc-3.4' should be '2.6.
9-1.681_FC3 586 REGPARM 4KSTACKS gcc-3.4'

But my question is how to resolve this? What is it that one must do 
with the kernel sources to allow module builds to get the right 

Comment 3 Dave Jones 2004-11-30 14:55:18 EST
building external modules doesn't actually require you to have the
kernel source installed. See the section in the release notes.

If the lirc documentation tells you otherwise, it's incorrect.
Comment 4 ezekiel das 2004-12-04 18:55:08 EST
The lirc docs aren't saying otherwise, but I'm finding this method 
noted in the release notes to be obtuse and difficult. That is, I'm 
confident with my ability to build C code, etc. but I'm not expert 
with autoconf or make. The section in the release notes you're 
referring to is this:



An exploded source tree is not required to build kernel modules 
against the currently in-use kernel.

For example, to build the foo.ko module, create the following file 
(named Makefile) in the directory containing the foo.c file:

obj-m    := foo.o

KDIR    := /lib/modules/$(shell uname -r)/build
PWD    := $(shell pwd)

    $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules


Do you have a working example of how to apply this? That is, how 
would one work this into the root directory "sh configure; make" of a 
source package? 

Any pointers to additional resources would be appreciated.


Comment 5 Dave Jones 2005-07-15 16:24:02 EDT
An update has been released for Fedora Core 3 (kernel-2.6.12-1.1372_FC3) which
may contain a fix for your problem.   Please update to this new kernel, and
report whether or not it fixes your problem.

If you have updated to Fedora Core 4 since this bug was opened, and the problem
still occurs with the latest updates for that release, please change the version
field of this bug to 'fc4'.

Thank you.
Comment 6 Dave Jones 2005-10-02 21:01:07 EDT
This bug has been automatically closed as part of a mass update.
It had been in NEEDINFO state since July 2005.
If this bug still exists in current errata kernels, please reopen this bug.

There are a large number of inactive bugs in the database, and this is the only
way to purge them.

Thank you.

Note You need to log in before you can comment on or make changes to this bug.