Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I had a NIC driver problem that has already being solved. It was a broadcom device in a HP brand new PC.
It was using the tg3 driver but had problems with the network connection. After some tests (with different kernels, knoppix) having the same problems, and after noticing that windows didn't have the problem at all (excluding hardware as a source of the problem), I decided to get the nic manufactor's driver.
I downloaded the driver (available through GPL ), compiled it and tested it. No problem with the network so far.
However, I had problems making my computer use that driver for eth0.
What I did was place the bcm5700.ko file in /lib/modules/<kernel name>/kernel/drivers/net/ (the kernel is a 2.6.x)
Commented the line in /etc/modules.config that set tg3 for eth0 and added a line with bcm5700:
Code:
alias eth0 bcm5700
However, having done that wasn't enough. It still loads tg3.
I can bring down eth0 and unload tg3 manually. If I try to load the modele at that point, it fails. Says it cant read bcm5700.
As a workaround, in /etc/rc.local I manually change the module... specifying the full driver's path:
For regular libraries, I would run 'ldconfig' to register it, however your make install step may have done it. You may need to remake your initrd file for the kernel. The old tg3 module may be loaded by the 'linuxrc' script in the initrd ramdrive. Also, check for a file such as /etc/modules.preload or something similar. It may have the tg3 driver listed.
I thought that you would add a kernel module using 'make modules_install'. Please check the README file in /etc/src/linux for information about installing kernel modules.
Oh... I know about make modules_install..... however, It's not a driver of a kernel I compiled... I'm "adding" it to my precompiled kernel.. so to speak.
The initrd file is read in after the kernel. It is a compressed ram drive that contains the /bin, /usr, /sbin, /lib, etc hierarchy. Kernel modules which need to be loaded in order for the computer to boot up are loaded from the ram first. Then after the regular file system is mounted, it is pivoted out and the memory is cleared. For a network device, if you aren't booting from the network, the module may not be included in the initrd file. But from the way the old module keeps loading, it may be present in the initrd file. You can copy this file and uncompress it, then mount it as a loop device somewhere with the ext2 filesystem. This will allow you to explore it and determine if indeed the old kernel module is present. There is a script file called 'linuxrc' that is executed, that you can read also for clues. If nothing else, you might learn more about how your system boots up.
I think that you can use the 'zcat' program to uncompress the 'initrd', but see what 'file '<initrdfile>' reports, in case I'm wrong.
You can use the mkinitrd command to produce the initrd file. It is a script in the /sbin directory that you run as root.
Also, I believe that with a 2.6 kernel the 'make modules_install' command will only compile the needed modules. If this is a new module, and not a replacement, you will need to enable kernel module support for the module. If there is an option for the bcm5700 device, module support needs to be selected and the kernel will need to be recompiled. This is if the option wasn't enabled as a module when the kernel was compiled. However it is possible that the option was enabled, so you will want to check your .config file.
There is a make option called 'make oldconfig' that will select your old options. Then you can use one of the others, like make xconfig, to set the one option that you want to change. If you have changed to a different kernel option, make oldconfig will prompt you on new options.
Before I forget, be sure to look in the source directory for the driver. there may be detailed installation instructions. There is also a Documentation directory at /usr/linux/Documentation. There may also be something there, plus you will want to read the README file in there also. It details how to compile a new kernel.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.