ankush grover
2007-Jun-15 12:20 UTC
[CentOS] Unable to Compile a LAN Card Driver on Centos4.4
Hi Friends,
I recently purchased a LAN Card and the LAN Card CD contains drivers
for Linux. But when I am trying to compile the driver on Centos4.4 I
am getting below errors.
[root at ankush1 sc92031]# make
*****************************
sc92031.o built for 2.6.9-42.EL
SMP Disabled
*****************************
In file included from /lib/modules/2.6.9-42.EL/build/include/asm/processor.h:18,
from
/lib/modules/2.6.9-42.EL/build/include/asm/thread_info.h:16,
from
/lib/modules/2.6.9-42.EL/build/include/linux/thread_info.h:21,
from
/lib/modules/2.6.9-42.EL/build/include/linux/spinlock.h:12,
from
/lib/modules/2.6.9-42.EL/build/include/linux/capability.h:45,
from /lib/modules/2.6.9-42.EL/build/include/linux/sched.h:7,
from /lib/modules/2.6.9-42.EL/build/include/linux/module.h:10,
from sc92031.c:19:
/lib/modules/2.6.9-42.EL/build/include/asm/system.h: In function
`__set_64bit_var':
/lib/modules/2.6.9-42.EL/build/include/asm/system.h:193: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/lib/modules/2.6.9-42.EL/build/include/asm/system.h:193: warning:
dereferencing type-punned pointer will break strict-aliasing rules
In file included from /lib/modules/2.6.9-42.EL/build/include/asm/smp.h:18,
from /lib/modules/2.6.9-42.EL/build/include/linux/smp.h:96,
from /lib/modules/2.6.9-42.EL/build/include/linux/sched.h:23,
from /lib/modules/2.6.9-42.EL/build/include/linux/module.h:10,
from sc92031.c:19:
/lib/modules/2.6.9-42.EL/build/include/asm/mpspec.h:6:25:
mach_mpspec.h: No such file or directory
In file included from /lib/modules/2.6.9-42.EL/build/include/asm/smp.h:18,
from /lib/modules/2.6.9-42.EL/build/include/linux/smp.h:96,
from /lib/modules/2.6.9-42.EL/build/include/linux/sched.h:23,
from /lib/modules/2.6.9-42.EL/build/include/linux/module.h:10,
from sc92031.c:19:
/lib/modules/2.6.9-42.EL/build/include/asm/mpspec.h: At top level:
/lib/modules/2.6.9-42.EL/build/include/asm/mpspec.h:8: error:
`MAX_MP_BUSSES' undeclared here (not in a function)
/lib/modules/2.6.9-42.EL/build/include/asm/mpspec.h:23: error:
`MAX_IRQ_SOURCES' undeclared here (not in a function)
In file included from /lib/modules/2.6.9-42.EL/build/include/linux/irq.h:20,
from /lib/modules/2.6.9-42.EL/build/include/asm/hardirq.h:6,
from /lib/modules/2.6.9-42.EL/build/include/linux/hardirq.h:6,
from
/lib/modules/2.6.9-42.EL/build/include/linux/interrupt.h:11,
from /lib/modules/2.6.9-42.EL/build/include/asm/highmem.h:24,
from /lib/modules/2.6.9-42.EL/build/include/linux/highmem.h:14,
from /lib/modules/2.6.9-42.EL/build/include/linux/skbuff.h:27,
from
/lib/modules/2.6.9-42.EL/build/include/linux/if_ether.h:107,
from
/lib/modules/2.6.9-42.EL/build/include/linux/netdevice.h:29,
from sc92031.c:26:
/lib/modules/2.6.9-42.EL/build/include/asm/irq.h:16:25: irq_vectors.h:
No such file or directory
In file included from /lib/modules/2.6.9-42.EL/build/include/asm/hardirq.h:6,
from /lib/modules/2.6.9-42.EL/build/include/linux/hardirq.h:6,
from
/lib/modules/2.6.9-42.EL/build/include/linux/interrupt.h:11,
from /lib/modules/2.6.9-42.EL/build/include/asm/highmem.h:24,
from /lib/modules/2.6.9-42.EL/build/include/linux/highmem.h:14,
from /lib/modules/2.6.9-42.EL/build/include/linux/skbuff.h:27,
from
/lib/modules/2.6.9-42.EL/build/include/linux/if_ether.h:107,
from
/lib/modules/2.6.9-42.EL/build/include/linux/netdevice.h:29,
from sc92031.c:26:
/lib/modules/2.6.9-42.EL/build/include/linux/irq.h:70: error:
`NR_IRQS' undeclared here (not ina function)
In file included from /lib/modules/2.6.9-42.EL/build/include/linux/irq.h:72,
from /lib/modules/2.6.9-42.EL/build/include/asm/hardirq.h:6,
from /lib/modules/2.6.9-42.EL/build/include/linux/hardirq.h:6,
from
/lib/modules/2.6.9-42.EL/build/include/linux/interrupt.h:11,
from /lib/modules/2.6.9-42.EL/build/include/asm/highmem.h:24,
from /lib/modules/2.6.9-42.EL/build/include/linux/highmem.h:14,
from /lib/modules/2.6.9-42.EL/build/include/linux/skbuff.h:27,
from
/lib/modules/2.6.9-42.EL/build/include/linux/if_ether.h:107,
from
/lib/modules/2.6.9-42.EL/build/include/linux/netdevice.h:29,
from sc92031.c:26:
/lib/modules/2.6.9-42.EL/build/include/asm/hw_irq.h:28: error:
`NR_IRQ_VECTORS' undeclared here(not in a function)
sc92031.c:106:40: missing binary operator before token "("
sc92031.c:356: warning: `MODULE_PARM_' is deprecated (declared at
/lib/modules/2.6.9-42.EL/build/include/linux/module.h:552)
sc92031.c:357: warning: `MODULE_PARM_' is deprecated (declared at
/lib/modules/2.6.9-42.EL/build/include/linux/module.h:552)
sc92031.c: In function `silan_open':
sc92031.c:945: warning: passing arg 2 of `request_irq' from
incompatible pointer type
sc92031.c: In function `netdev_ethtool_ioctl':
sc92031.c:1848: error: `np' undeclared (first use in this function)
sc92031.c:1848: error: (Each undeclared identifier is reported only once
sc92031.c:1848: error: for each function it appears in.)
sc92031.c:1900:40: missing binary operator before token "("
make: *** [sc92031.o] Error 1
How do I compile this driver on Centos4.4?
I have attached the readme, makefile and sc92031.c files with this
email. Please let me know if you need any other input.
Thanks & Regards
Ankush
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 4020 bytes
Desc: not available
URL:
<http://lists.centos.org/pipermail/centos/attachments/20070615/1d4ca686/attachment-0002.obj>
-------------- next part --------------
*************************************************
** Silan SC92031 PCI Fast Ethernet Adapter **
** **
** LINUX driver **
*************************************************
Introduction:
============
The instructions are for linux driver installation. You must
compile the source code to generate sc92031.o and use insmod command to
insert sc92031.o as module.
Contents of the Subdirectory:
============================
readme.txt This file.
sc92031.c The linux core driver source code file
Makefile Makefile for generating driver object file
Kernel Supported
=============== This driver support linux kernel version 2.4.x/2.5.x now.
Installation
=========== 1) Create a temporary directory:
# mkdir /temp
2) Change to the temporary directory:
#cd /temp
3) Copy driver (sl_linux.tgz) from CD-ROM to the temporary directory, and
follow the commands:
# mount -t iso9660 /dev/cdrom /mnt
# cp /mnt/sl_linux.tgz /temp
4) untar the archive file:
# tar xzvf sl_linux.tgz
# cd sc92031
5) Compile the driver source files and it will generate sc92031.o, and
copy it to correct driver installation path (The installation directory
is different in different kernel versions. In 2.4.x kernel, the path is
/lib/modules/KERNEL_VERSION/kernel/drivers/net/, and in 2.2.x kernel,
the path is /lib/modules/KERNEL_VERSION/net/)
# make install
6) Check configuration file (/etc/modules.conf or /etc/conf.modules,it
depend on your Linux distribution) for loading kernel modules. Make sure
there is the following content in the configuration file, where # is
interface number :
alias eth# sc92031
7) Reboot now:
shutdown -r now
8) Install your driver module (If the driver module is in the wrong place,
an error message will appear, and say that can't find the driver
module):
insmod sc92031.o
8) Use ifconfig command to assign the IP address, where # is network
interface number:
ifconfig eth# <IP>
9) Check the interface works:
ping <remote_host_IP>
Uninstallation
============= Please enter the following commands to uninstall your driver:
# make uninstall
Module Parameter:
================The following parameters can be set when we install the driver
module. You can add this parameters when
you execute 'insmod' command to install the driver
# insmod sc92031.o work_node =0x00
work_mode
work_mode is used for setting the speed and duplex mode of NIC.Value is as
followed:
Autoselect 0x00
M10-half 0x01
M10-full 0x02
M100-half 0x04
M100-full 0x08
If you want to use other modes,it can be changed by the following steps:
# ifdown eth0
# rmmod sc92031
# insmod sc92031.o work_mode= ****
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sc92031.c
Type: application/octet-stream
Size: 62482 bytes
Desc: not available
URL:
<http://lists.centos.org/pipermail/centos/attachments/20070615/1d4ca686/attachment-0003.obj>
Radu-Cristian FOTESCU
2007-Jun-15 12:40 UTC
[CentOS] Unable to Compile a LAN Card Driver on Centos4.4
> mach_mpspec.h: No such file or directoryShouldn't the Makefile have added something like this? CFLAGS += -I$(KSRC)/include/asm-i386/mach-generic But as long as it's 8139-based, shouldn't it be supported out of the box? R-C Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail at http://mrd.mail.yahoo.com/try_beta?.intl=ca
James Pearson
2007-Jun-15 13:07 UTC
[CentOS] Unable to Compile a LAN Card Driver on Centos4.4
ankush grover wrote:> Hi Friends, > > I recently purchased a LAN Card and the LAN Card CD contains drivers > for Linux. But when I am trying to compile the driver on Centos4.4 I > am getting below errors. > > [root at ankush1 sc92031]# make > > ***************************** > sc92031.o built for 2.6.9-42.EL > SMP Disabled > *****************************An updated driver for that card went into the 2.6.21 kernel - see the thread at: <http://marc.info/?l=linux-kernel&m=116560940703099&w=2> I doubt very much that the 2.6.21 driver will work 'as is' with the 2.6.9-xx.EL kernels ... James Pearson