2010年6月5日 星期六

Manul build Atheros AR8151 for ArchLinux

Well... This also take me couple hours. It shouldn't' be. So I need to note it for myself.

First, there is not build-in support for atheros AR8151 ethernet chip in archlinux. You need to build it by yourself.

2.extract tar ball to somewhere.
3.make sure you have related package like gcc, make, kernel header.
4.The driver from atheros default take /lib/modules/$(BUILD_KERNEL)/build for kernel header and I change to /usr/src/linux-$(BUILD_KERNEL) by change the order of KSP variable in src/Makefile
5.Refer to readme file in tar ball, I found I don't have version.h in header path and do "make include/linux/version.h" in linux source tree.
6.I use kernel 2.6.33 and it seems have a change which not use utsrelease.h file. But the driver makefile need it. I manually add a utsrelease.h in /usr/src/$(KERNEL_VERSION)/include/linux with content "#define UTS_RELEASE 2.6.33-ARCH"
7.build driver with "make" and "make install" to install it (don't forget install as root)
8.You should get a driver as kernel module in /lib/modules//kernel/drivers/net/atl1e/atl1e.ko. The readme file of tar ball show it as arl1e.ko but I get alt1e.ko. I don't know why but it don't matter. It's the driver for AS8151.
9.load the driver by "modprobe atl1e" and check it with "lsmod | grep atl1e"
10.Finish to build driver. You can test it by "ifconfig ethx

Then the AR5181 ethernet chip works. And don't forget to add it to MODULE of /etc/rc.conf or config modprobe for next boot.

沒有留言: