[tulip-bug] tulip.c and pci-scan.c do not insmod after compile

Carsten Cimander cc@cimander-net.de
Thu May 30 11:36:00 2002


Hi,

thanks for your hints:
now I succeeded in compiling and "insmod" pci-scan.o :-)
but after a compile of tulip.c with your options (no complaints)
I cannot "insmod" tulip.c - the error resists:

# insmod pci-scan.o
# insmod tulip.o
	tulip.o was compiled for kernel version 2.4.7
	while this kernel is version 2.4.17
# lsmod
Module	Size	Used by
pci-scan	3360	0 (unused)

Could you help someone blind like me further more?

Thanks in advance again.

Regards,
Carsten

> From: Juhan Ernits, Sent: Mittwoch, 29. Mai 2002 22:27
> 
> On Wed, 29 May 2002, Carsten Cimander wrote:
> 
> > I compiled tulip.c using the command:
> > # gcc -DMODULE -Wall -Wstrict-prototypes -O6 -c tulip.c
> >  => no probs.
> > 
> > I compiled pci-scan.c using the command:
> > # gcc -DMODULE -D__KERNEL__ -DEXPORT_SYMTAB -Wall 
> -Wstrict-prototypes -O6 -c
> > tulip.c
> >  => no probs.
> > 
> > But insmod reported an unsuitable kernel???
> > # insmod pci-scan.o
> > 	pci-scan.o was compiled for kernel version 2.4.7
> > 	while this kernel is version 2.4.17
> 
> Ensure that you have the appropriate kernel source (2.4.17) unpacked
> and configured in /usr/src/linux. In my case I had all these loadable
> module parameters enabled:
> 
>  [*] Enable loadable module support
>  [*] Set version information on all symbols for modules
>  [*] Kernel module loader  

Had it done...

> 
> Then I built the modules with the following lines:
> 
> gcc -DMODULE -D__KERNEL__ \
>  -I/usr/include -I/usr/src/linux/include \
>  -DMODVERSIONS -include /usr/src/linux/include/linux/modversions.h  \
>  -DKBUILD_BASENAME=tulip -o tulip.o -O6 -c tulip.c
> gcc -DMODULE -D__KERNEL__ \
>  -DMODVERSIONS -include /usr/src/linux/include/linux/modversions.h  \
>  -I/usr/src/linux/include -DKBUILD_BASENAME=pci-scan -o 
> pci-scan.o -O6 -c
> pci-scan.c
>