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