On Fri, Dec 16, 2011 at 9:43 AM, Jon Meek <[email protected]> wrote: > On Fri, Dec 16, 2011 at 8:48 AM, Jonathan Polom <[email protected]> wrote: >> >> I just started using Voyage MPD last week and quite like it, except >> for one flaw I've found: building kernel modules for proprietary >> drivers. The only problem I'm having (and this is not a voyage issue, >> I had the same problem when I ran Debian stable) is that my wired NIC, >> which is a lovely Realtek 8111/8168 series controller, uses the >> problematic r8169 kernel module. The r8169 module is effectively broke >> for my NIC and causes it to up/down the link randomly and drop a lot >> of incoming packets. Obviously this is not acceptable and I need to >> fix it. The accepted fix at this time is to use the r8168 module >> provided by Realtek. Realtek provides the "source" for this driver on >> their web site to be compiled as a kernel module and there's also an >> r8168-dkms package in the Debian sid repos. >> >> So far I've had no success compiling the r8168 module from the Realtek >> tarball or from the DKMS package out of sid (all deps are satisfied >> for that package). I've installed the kernel source for the >> 3.0.0-voyage kernel, untarred it to /usr/src/linux-source-3.0.0-voyage >> and symlinked /usr/src/linux to it, but DKMS consistently claims that >> it doesn't think the source for the kernel is installed when I run >> `dpkg-reconfigure r8168-dkms`. I've tried compiling the module >> directly from the Realtek source via their autorun.sh script, but it >> looks in /lib/modules/3.0.0-voyage/build for something that isn't >> there (not too sure what *should* be there even, I've tried symlinking >> the kernel sources there but that doesn't work either). I've never had >> this much trouble trying to compile a kernel module before, especially >> in Debian. >> >> I searched my configured apt repos (squeeze, sid and voyage) for >> available kernel headers and couldn't find one for the voyage kernel >> (why isn't one available by default? that seems odd, especially so >> since you're offering a kernel source package) since you really don't >> need the full source tree available to compile a module in most cases. >> I did find what looks like a kernel headers package in the voyage >> experimental repository for the 3.0.0-voyage kernel. But I have to >> ask: why is the headers package for the default voyage kernel >> considered experimental? Will that package allow me to compile modules >> against the headers it contains or are there some known issues with >> it? >> >> So my main question here is: How is one supposed to compile a third >> party/out-of-tree kernel module on voyage for the voyage kernel? >> >> Any help is appreciated on this topic. >> >> Jon >> > > This is how I compiled the e1000e driver from Intel's tarball for > Voyage 0.7.5. Note that this was done to fix an auto-negotiation > problem that was actually due to a bad UTP cable. > > Since I did not want to significantly increase the size of my USB > image, I built the driver on my mpd server which is a PC Engines ALIX > board. > > On the ALIX board, where some development tools are already installed. > > sudo apt-get update > sudo apt-get upgrade > > sudo apt-get install linux-headers-`uname -r` > > sudo reboot > > Log back in and move to an appropriate directory: > > cd build > > tar zxf ../dist/e1000e-1.6.3.tar.gz > > sudo ln -s /usr/src/linux-headers-2.6.38-voyage /usr/src/linux > > make > > Then grab the compiled driver (mpd:~/build/e1000e-1.6.3/src/e1000e.ko) > and get it to the target system (running USB system). > > On the USB system, verify what driver we are using: > > dmesg | egrep e1000e > [ 0.971963] e1000e: Intel(R) PRO/1000 Network Driver - 1.2.20-k2 > > Backup the original driver: > > sudo cp -pi /lib/modules/2.6.38-voyage/kernel/drivers/net/e1000e/e1000e.ko > /lib/modules/2.6.38-voyage/kernel/drivers/net/e1000e/e1000e.ko.orig > > Copy new driver into the modules directory > > sudo cp -p ~/dist/e1000e.ko > /lib/modules/2.6.38-voyage/kernel/drivers/net/e1000e > > sudo /sbin/depmod -a > > sudo dpkg-reconfigure linux-image-2.6.38-voyage > > sudo reboot > > Log back in and verify that the new version is running: > > dmesg | egrep e1000e > [ 0.886074] e1000e: Intel(R) PRO/1000 Network Driver - 1.6.3-NAPI > > Success! > > Jon (a different one...) >
Did you have to configure additional apt repositories to find the linux-headers package? I did an apt-cache search headers and didn't find any header packages for the voyage kernel, only the debian kernels. I'm using voyage 0.8 if that matters which uses the 3.0.0-voyage kernel. The appropriate headers package would be linux-headers-3.0.0-voyage and that doesn't seem to exist. From memory, I have the squeeze repos, voyage repos and sid repos (for the r8168-dkms package) in sources.list. I will downgrade if necessary as I don't require bleeding edge anything for this device. _______________________________________________ Voyage-linux mailing list [email protected] http://list.voyage.hk/mailman/listinfo/voyage-linux
