Lan Driver Compile on UBUNTU
ขั้นตอนมีดังนี้ ->ต้องตรวจสอบก่อนว่าการ์ดแลนใช้ chip อะไร โดยดูจากคู่มือของ Mainboard จะขอยกตัวอย่าง AR8131  ->ไปดาวน์โหลด driver สำหรับการ compile บน ubuntu ที่ http://partner.atheros.com/Drivers.aspx ->จะได้ driver ชื่อ AR81Family-linux-v1.0.1.14.tar.gz นำเข้าไปใน ubuntu ใน folder ที่คุณกำหนดเอง เช่น/usr/local/src/arl1e
->เปิดไฟล์ readme เพื่ออ่านรายละเอียดการ compile และติดตั้ง driver lan ดังตัวอย่างด้านล่างนี้ 1. Move the base driver tar file to the directory of your choice. For example,

use /home/username/arl1e or /usr/local/src/arl1e.

2. Untar/unzip archive:

tar zxf AR81Family-linux-v1.0.1.14.tar.gz

3. Change to the driver src directory:

cd AR81Family-linux-v1.0.1.14/src/

4. Compile the driver module:

make install

The binary will be installed as:

/lib/modules//kernel/drivers/net/arl1e.[k]o

The install locations listed above are the default locations. They might

not be correct for certain Linux distributions. For more information,

see the ldistrib.txt file included in the driver tar.

5. Install the module:

insmod arl1e

6. Assign an IP address to the interface by entering the following, where

x is the interface number:

ifconfig ethx

     การ์ดแลน RTL8111       

 

This is guidance for those with integrated Realtek RTL8111 series gigabit Ethernet, built in to motherboards such as the ASRock G41M-LE.

 

Ubuntu 8.10 (and may other versions) have been reporting problems with connectivity. Here is the solution in a walk-through format. You must be root (sudo su -).

 

1) Check to see if the r8169 module is loaded
-> lsmod | grep r816
r8168 41104 0
-> lspci -v
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
Subsystem: ASRock Incorporation Device 8168
Kernel driver in use: r8169
Kernel modules: r8169

 

2) Download the official Realtek driver
Realtek RTL8111/RTL8168

 

3) Remove the r8169 module
-> rmmod r8169
-> mv /lib/modules/`uname -r`/kernel/drivers/net/r8169.ko ~/r8169.ko.backup
( the ` is a backtick, it is not an apostrophe or single quote )

 

4) Build the new r8168 module for the kernel
-> bzip2 -d r8168-8.009.00.tar.bz2
-> tar -xf r8168-8.009.00.tar
-> cd r8168-8.009.00
-> make clean modules
-> make install

 

5) Rebuild the kernel module dependencies
-> depmod -a
-> insmod ./src/r8168.ko

 

6) Remove the r8169 module from initrd
-> mv /initrd.img ~/initrd.img.backup
-> mkinitramfs -o /boot/initrd.img-`uname -r` `uname -r`

 

7) Add r8168 module to /etc/modules
-> echo "r8168" >> /etc/modules

 

8) Reboot, You are done!

 

9) Examine that ONLY the r8168 module is loaded for the interface
-> lspci -v
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
Subsystem: ASRock Incorporation Device 8168
Kernel driver in use: r8168
Kernel modules: r8168

 

If you need to, configure your /etc/network/interfaces for dhcp or static address then `sudo ifup eth0`
Last edited by nausicaavow; December 31st, 2008 at 03:08 PM.