When I migrated from Linux 2.4 to 2.6, I had some trouble with modules loading. In particular, when I booted the machine, my bcm5700.ko module didn't get control of my Ethernet interface; instead, a module called "eth1394" did instead. And then another module, tg3, took a whack at the interface as well; tg3 is the default ethernet driver, but Broadcom recommends their own bcm5700 module instead.
When my Ethernet insterface didn't work at all after booting into 2.6.8, I used "lsmod" to determine what modules were installed, and after loading and unloading modules, starting and stopping networking, and reading /var/log/messages to see how the boot went, discovered that bcm5700 wasn't loading but did work if loaded. This was very puzzling, because /etc/modules.conf was very explicit in trying to load bcm5700 for the eth0 interface.
I went to the /etc/modutils directly and tried to get the eth1394 (which is listed as "ip1394" in the log for unknown reasons) to stop loading. I used:
alias eth1393 off
alias tg3 off
to get these two modules to never load. (The commands went into a file called "networking-A7V8X" that I use to control kernel modules related to networking.) I rebuilt /etc/modules.conf using update-modules, rebooted the machine — and the modules loaded anyway.
In other words, /etc/modules.conf was being ignored by modprobe during boot time.
Eventually I stumbled across the answer by reading the man page for modprobe instead of just skimming it. Modprobe has changed between 2.4 and 2.6. The old information my /etc/modutils and /etc/modules.conf is not read under 2.6, and the Debian upgrade process won't automatically migrate my custom configurations from 2.4 to 2.6.
2.6 uses a /etc/modprobe.d directory, and it does not need a "/etc/modprobe.conf" file; it reads all the appropriate *.conf files and compiles the information at boot time. Very handy, actually.
To solve the problem of the eth1394 and tg3 grabbing the Ethernet interface, I used the "alias x off" commands I list above, placed them in a file in /etc/modprobe.d, and rebooted. This time the system functioned as expected and the Ethernet system used the proper bcm5700.ko driver.
I realize that there are other ways to force a particular driver/module to associate with a particular physical interface (use the "mapping" keyword in /etc/network/interfaces), but this one works for me as I don't need eth1394 for anything at the moment.
Here's a technical note on how to migrate from a Broadcomm bcm5700 Ethernet driver under Linux 2.4.x (bcm5700.o) to a 2.6.x driver (bcm5700.ko). I did this migration on a Debian system based on an Asus A7V8X, and I've found that the documentation on how to do this is a little scanty.
To start, get the source of the Broadcom driver:
apt-get install bcm5700-source
This will install itself in /usr/src as a gzip file. As root, go to the /usr/src directory and unpack the file:
tar zxf bcm5700-source.tar.gz
This creates a directory modules, under which will be a directory bcm5700 which contains the source code.
The next step is to compile the bcm5700 source code. You don't need to be running 2.6.x to do this. You do need the current headers of your target kernel image. E.g., if you want bcm5700 to work for 2.6.8-1-k7, you will need the kernel headers for 2.6.8-1-k7. You don't need the source for the entire kernel.
To get the kernel headers, use
apt-get kernel-headers-2.6.8-1-k7
or whatever is appropriate for your target kernel. The headers will appear in your /usr/src directory as well.
You need to make /usr/src/linux point to these kernel headers. On my system, /usr/src/linux is simply a symlink to a real directory. I removed the old symlink (rm linux) and used
ln -s kernel-headers-2.6.8-1-k7 linux
to create the symlink. To compile the bcm5700.ko module, go to the /usr/src/linux directory and type
make-kpkg modules
This will make a Debian package in the /usr/src directory. You can then use
dpkg -i bcm5700-module-2.6.8_7.3.5-3+10.00.Custom_i386.deb
(or whatever the Debian is called on your sytsem) to install the driver. However, I could not figure out how to persuade make-kpkg to give the proper version to the Debian package; as you can see above it thinks it made a driver for 2.6.8, not 2.6.8-1-k7. This means that when I did the dpkg -i to install the Debian package, Debian failed partway through and put the bcm5700.ko file into /lib/modules/2.6.8, instead of it's proper place in /lib/modules/2.6.8-1-k7. No worries -- I copied the driver from there to /lib/modules/2.6.8-1-k7/kernel/drivers/net/bcm5700.ko, and I was ready to go.
That's it for creating the driver module. Fairly straightforward.
However, that doesn't mean that the driver actually loaded when I booted up the sytsem &mdash something else grabbed control of the Ethernet interface. See my next technical note, about migrating from Linux 2.4 and its system of /etc/modules.conf to Linux 2.6 and its system of /etc/modprobe.d, for details on how to resolve this little problem.