Monday, March 30, 2009

Install NIC P5GC-MX/1333 in Centos 5.2

There is an error when installing NIC driver on linux Centos 5.2 (I use driver that come with mainboard ASUS P5GC-MX 1333 series.

So I copy and put in /tmp

[root@localhost src]# make install
make: Warning: File `Makefile' has modification time 3e+07 s in the future
make -C /lib/modules/2.6.18-92.el5/build SUBDIRS=/tmp/l2-linux-v1.0.40.4/src modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-92.el5-i686'
make[2]: Warning: File `/tmp/l2-linux-v1.0.40.4/src/Makefile' has modification time 3e+07 s in the future
CC [M] /tmp/l2-linux-v1.0.40.4/src/at_main.o
In file included from /tmp/l2-linux-v1.0.40.4/src/at.h:30,
from /tmp/l2-linux-v1.0.40.4/src/at_main.c:28:
/tmp/l2-linux-v1.0.40.4/src/kcompat.h:1084: error: redefinition of typedef ‘irq_handler_t’
include/linux/interrupt.h:67: error: previous declaration of ‘irq_handler_t’ was here
make[2]: *** [/tmp/l2-linux-v1.0.40.4/src/at_main.o] Error 1
make[1]: *** [_module_/tmp/l2-linux-v1.0.40.4/src] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.18-92.el5-i686'
make: *** [default] Error 2
[root@localhost src]#

There error is in file kcompat.h on line 1084. I read and edit file kcompat.h

#if (!(( RHEL_VERSION == 4 ) && ( RHEL_UPDATE >= 5 )))
/*typedef irqreturn_t (*irq_handler_t)(int, void*, struct pt_regs *); */
#endif

and command on line 1084. It's because in Centos =>5 can not recognize this.

And I compile again, and everything is going well. This will compile as a module.
Try to :
[root@localhost ~]# modprobe atl2
[root@localhost ~]# lsmod |grep atl2
atl2 37144 0
[root@localhost ~]#

Edit in /etc/modules.conf to make alias of device.

alias eth0 atl2

[root@localhost ~]# ifconfig eth0 192.168.0.21 netmask 255.255.255.0

[root@localhost ~]#

No comments:

Post a Comment