Can't build modules for Etch Help!
Tony Baechler
tony at baechler.net
Thu Aug 14 06:04:27 EDT 2008
Hi,
I'm leaving the entire quoted text below for context. I did finally get
this issue resolved. I'm posting here for anyone else who runs into
this. The problem is that I got a new E1000 NIC. They are good cards
but the driver supplied with the kernel is old. I'll spare you the
details of downloading and compiling drivers, but basically I was left
with four installed kernels, none of which worked exactly right. The
first was 2.4.17 which I didn't use for obvious reasons. The server is
designed for 2.6 kernels and I don't think a 2.4 kernel would run
anymore. It goes back to the Woody install floppy I think. The second
is 2.6.18-6-686 which is part of the standard set of Etch kernel
packages. The problem there was that Speakup wouldn't build without
recompiling and I didn't have hours to recompile because I was on a
deadline. It did build the newer E1000 driver though. The third kernel
was 2.6.24-speakup which is my custom built kernel that I announced
here. The problem with it wasn't Speakup since the Speakup core was
built into the kernel and the synths were compiled as modules. The
problem with that kernel is that since it was a custom kernel package,
it didn't have the kbuild and tree packages. Finally, we get to the new
etchnhalf kernel, also 2.6.24. That would, and did compile the driver
but again no Speakup without recompiling the kernel from source.
Therefore, I was left with a choice. Did I want speech and no NIC
driver or a NIC driver with no speech? Software speech was also out of
the question because of the time issue.
Obviously, I could do nothing without speech, so speech won. I
installed my custom 2.6.24-speakup kernel and all was fine with
Speakup. I still had to compile the new E1000 driver as a module. I
knew I was taking a chance, but I figured that since both the etchnhalf
and custom kernels were 2.6.24, perhaps I could compile for one and it
would work on the other. Remember, I couldn't compile for my custom
kernel because the kbuild and linux-tree packages didn't exist for that
kernel because it wasn't officially from Debian. So, after installing
the necessary source and build packages for the etchnhalf kernel and
moving symlinks around, I almost got it to work. I still got errors
when running make from the src directory. As it turned out, the
Makefile was setting the kernel version with "uname -r" which of course
would never work. I removed that and hardcoded 2.6.24-etchnhalf.1-686
or whatever it was, I'm not remembering now. I again ran make and it
made the modules for the etchnhalf kernel. Of course it installed the
modules for that kernel and not my custom one which was actually
running, so I manually copied the new e1000.ko module to the
2.6.24-speakup/drivers/net/e1000 directory. It finally worked, even
though the reported versions were different from the kernel it compiled
for and the one actually running. I did another symlink swap to make
the custom kernel boot first (I had it set as /vmlinuz.old before) and
rebooted. It still didn't work, but that was my fault. I forgot to
update the initrd image. Always remember that if you're playing with
modules and moving things around to run update-initramfs before
rebooting or you're out of luck. I booted from the Gentoo live CD,
2003.4 I think, (it's old but it works), fixed the problem, remembered
to run update-initramfs and ran out of space on the /boot partition. I
moved files around (the .bmp files installed with Debian take a lot of
space, by the way), ran it again and voila, all was well and it rebooted
fine into the Speakup kernel with the correct E1000 driver.
I still had a problem. Even after all of my effort, it still refused to
see eth0. If I ran ifconfig, it would show the loopback interface but
couldn't get information for eth0. Even manually setting ifconfig eth0
to an IP address only got an error. I kept trying things like loading
and unloading the module, but nothing helped. It was especially
frustrating because the Gentoo CD had no problem with the card and I
verified that pinging a llocal machine worked. I'm not sure what
finally gave me the idea, but I finally thought of looking in
/etc/udev. I personally don't like udev but that's how Etch and new
Debian releases do things. I did a grep for eth0 and found nothing, but
under /etc/udev/rules.d, I found z25_persistent_net_rules. That held
the key. Apparently, it assigned the E1000 to eth3 and wouldn't change
it, even though the E1000 was the only NIC in the machine. I moved the
file out of the directory in hopes it would generate a new one, but the
new one still identified it as eth3. I changed the 3 to a 0, rebooted
again and voila, it worked and showed up as eth0 like it was supposed
to. I should still sort out the mess of four different kernels
installed, but at least the new card works and I have Speakup if I need it.
As I said, I hope this is of help to someone in the future who has a
similar problem. Always check everything, even if it isn't obvious. As
it turned out, probably all I needed to do in the first place is change
the eth3 to eth0 and it would've worked, but the manufacturer driver was
a lot newer than the 2.6.18 kernel included and seemed newer than that
with 2.6.24 so I consider rebuilding the driver to be justified. I also
now realize the problem with custom kernel packages and I probably won't
make them in the future. However, if you don't need to build modules
and don't require the kernel sources, my 2.6.24-speakup kernel works
great, both in Etch and Lenny. I've personally tested it on two systems
with two different synthesizers. The packages are still available:
http://baechler.net.nyud.net/debian/
http://baechler.net/debian/ if the above doesn't work
If something is unclear or you have feedback, write here or off-list.
I'm sure there are things I could've done differently, but I had no way
to go online while I was working on the NIC driver because it couldn't
find the card, so I think I did the best I could under the
circumstances. I'll just close by saying that I ran out of space on
/boot so make sure the /boot partition is big enough, especially if
you're going to have multiple kernels installed.
Samuel Thibault wrote:
> Tony Baechler, le Wed 13 Aug 2008 01:38:03 -0700, a écrit :
>
>> Does this mean that I can't build Speakup without recompiling the
>> kernel, even if I only want modules?
>>
>
> Yes. Only recent kernels, or that have been patched, can let speakup
> work as modules.
>
>
>> Should I try installing a new kernel from Lenny instead?
>>
>
> The kernel from Lenny should be fine yes.
>
> Samuel
>
More information about the Speakup
mailing list