Re: tulip.c and pci-scan.c do not insmod after compile
Juhan Ernits <[email protected]> Wed, 29 May 2002 23:26:52 +0300 (EET DST)
| Newsgroups | gmane.linux.drivers.tulip.bugs |
|---|---|
| Message-ID | <[email protected]> |
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 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 Hope that helps a bit, Regards, Juhan Ernits _______________________________________________ tulip-bug mailing list, [email protected] To change to digest mode or unsubscribe visit http://www.scyld.com/mailman/listinfo/tulip-bug