HP has at least two laptop models that use the RealTek 8101E Fast Ethernet for their ports. One is the "g4 1117dx," and another is the "2000 219dx."
On a Dell mini 9 running Ubuntu 11.04 (2.6.38-10-generic), the r8169 module works out-of-the-box when an ethernet cable is plugged in. This is not the case with either HP laptop, even though r8169.c mentions the 8101 model.
It has been discussed elsewhere that ethernet devices using the r8169 module may be disabled in Windows after a reboot. Enabling "Wake on LAN," removing the battery and power supply, and waiting for some time allows the hardware to work in Linux. While I did not try the suggested solution with the former HP model, it did not work with the latter.
As for wireless, it would have likely been easier to set up. While neither HP laptop works out-of-the-box with wireless in Ubuntu 11.04, using an external adapter and running software update enables the internal wireless on both machines.
With the LFS LiveCD, it's a toss-up: wireless or wired? I wanted to save the adapter for another day, so ethernet it is.
I used a HOWTO on the Debian forums leading me to this driver, and copied the tarball to an external flash drive. Mount the drive from LFS LiveCD and copy it to a convenient location like $LFS/opt.
Make sure you have partition(s) on the hard drive set up before mounting the external. You'll be producing files during extraction and compilation, so you'll need a place to put them. The CD-R has already been written with the LiveCD OS; it can't be written to twice.
Here's the order of commands I used:
$ mkdir -v /mnt/usb
$ mount -v -t ext3 /dev/sdb1 /mnt/usb
$ cp -v /mnt/usb/r8101-driver.tar.gz $LFS/usr/src && cd $LFS/opt
$ tar xjf r8101-driver.tar.gz
$ cd r8101-driver.tar.gz/
The LFS LiveCD uses kernel 2.6.22.5, while the current kernel version is something like 3.0. Between 2.6.22.5 and 2.6.38, the symbol DMA_32BIT_MASK changed to DMA_BIT_MASK. You'll need to change all references to DMA_BIT_MASK(xx) to DMA_32BIT_MASK in ./src/r8101_n.c, about seven in all. Otherwise, while compilation succeeds, modprobe results in a "Undefined symbol" error.
Now you're ready to run the included shell script:
$ ./autorun.sh
The script will remove the r8169 module that was detected earlier, rename it as a backup file, and load r8101. If you're successful, the ethernet port will glow white. :) Use lsmod to confirm that r8101 is loaded, and lsmod | grep r8169 to make sure the old one is not.
Ping still won't detect a host, so
$ ifconfig eth0 up
$ dhcpcd
No comments:
Post a Comment