O.k. after five hours of work (Argh!!) I got the Attensic L2 network chip on my ASUS board to work on my new out of the box CENTOS 5.2 installation with kernel 2.6.18-92.el5.
Here is a summary of what I found out, perhaps it helps people to save some time:
1) When you search google you get two helping threads about this hardware issue, namely this one at linuxquestions.org and the one at the Ubuntu forums:
http://ubuntuforums.org/showthread.php?t=429845
There is also a blog entry at:
http://ihatecubicle.blogspot.com/200...2-network.html
2) There are two driver versions available. As far as I found out, there is one that works for kernels prior to 2.6.23 and one for newer kernels. I used the "old" one which I got at
http://ubuntuforums.org/attachment.p...0&d=1179781554
The new one can be downloaded at several sources, e.g.:
http://launchpadlibrarian.net/738241...driver_new.rar
or
ftp://ftp.hogchain.net/pub/linux/att....0.40.4.tar.gz
I never managed to compile the new driver without errors. There was always this "error: redefinition of typedef 'irq_handler_t'" issue mentioned above in this thread.
3) For use with CENTOS 5.2 you can stay with the "old" driver for the moment, which compiles without problems. There is also a compiled version of this driver to download in the above mentioned thread at Ubuntu forums but it does not work for CENTOS 5.2.
When you get the error:
insmod: error inserting 'lib..../atl2.ko': -1 Invalid module format
you likely wanted to use the already compiled version and it fails
3) Compiling itself is easy:
Anyway, for Linux beginners it is sometimes tricky because they do not have the packages installed to do compiling (namely the compiler gcc and of course, in this case kernel-devel as we want to compile a kernel module). Typical errors you get if you do not have the right packages installed are:
Makefile:62: *** Linux kernel source not found. Stop.
(This happens when you are missing kernel-devel)
or
make: command not found
(This happens when you are missing gcc compiler)
So be sure to have all these packages installed:
kernel-headers, kernel-devel, gcc, glibc, glibc-headers, libgomp, glibc-devel, cpp;
These packages you find on your distros CDs or you can download them from a CENTOS mirror (pick the right version!) and transfer them to the box with an usb stick (as you probably have no network access on the machine). Then install them by typing
rpm -ivh filename_of_package.rpm
4) Ok, back to compiling:
Unzip the drivers zip-file and enter the directory. Enter the sub directory src and type
make install
When successfully performed, the compiler should have placed the module in the directory /lib/modules/<KERNEL VERSION>/kernel/drivers/net
The file is named atl2.ko or atl.ko. If it is only named atl.ko rename it to atl2.ko (I did this and it worked - I do not know if it is necessary.) I also did a chmod 744 to give the file the same permissions as the other files in the directory but I am also not sure if it is necessary.
5) Add the module to the loaded kernel
Remap all modules by typing
modprobe -a
If you get a command not found error then type:
/sbin/modprobe -a
To load the module type:
/sbin/modprobe atl2
If you do not get an error message, this was successful.
6) Now you have to make sure that it is loaded each time you boot.
Change directory:
cd /etc/sysconfig/modules
Add a file named atl2.modules with the following content:
/sbin/modprobe atl2
Change Permissions:
chmod 0755 atl2.modules
7) You have to manually configure the network card. Do not expect that kudzu / anaconda will help you.
Change directory:
cd /etc/sysconfig/network-scripts
Add the configuration file of the network interface. Filename: ifcfg-eth0 (if you want it to be eth0, otherwise use eth1, eth2 etc).
The file should look like this:
DEVICE=eth0
BOOTPROTO=static
HWADDR=xx:xx:xx:xx:xx:xx
IPADDR=xx.xx.xx.xx
NETMASK=xxx.xxx.xxx.xxx
GATEWAY=xxx.xxx.xxx.xxx
ONBOOT=YES
TYPE=Ethernet
Change the settings as you want, e.g. DHCP instead of static ip address, etc. Important is the hardware address of the L2 adapter. I found it after reboot of my computer in the GNOME hardware browser.
After saving the file, type:
/etc/rc.d/init.d/network restart
Now the ethx interface should come up.
Finally, if you did not have a network installation until then (because Anaconda skipped it due to non-availability of network interface) you should also enter some nameservers:
Change file:
/etc/resolv.conf
Add entries like:
nameserver xx.xx.xx.xx
Finally your internet connection should work. As you can see, I have only described the compile part in detail. Of course there are many settings you can change with the network preferences but this depends on your network topology (most important DHCP <-> static IP address).
Hope this helps.
Benedikt.