LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Unresolved Symbols for NIC Driver bcm4400.o (https://www.linuxquestions.org/questions/linux-networking-3/unresolved-symbols-for-nic-driver-bcm4400-o-79958/)

Cruxus 08-07-2003 05:16 PM

Unresolved Symbols for NIC Driver bcm4400.o
 
First, let me say that I am a Linux newbie, and I've installed Debian 3.0r1 woody bf-2.4 flavor on my Dell Inspiron 8500 laptop (yes, not the best choice for a newbie). The first compatibility issue I want to resolve is with my NIC card, a Broadcom 440x 10/100 Mb/s integrated network adapter.

I downloaded the bcm4400 source code (in3www ... epfl.ch ... /~pimetrai/inspiron/bcm4400.tar.gz) and unpacked it; it seems to have been designed more for Red Hat though. Anyway, after commenting out an #include for modversions.h in a b44mm.h header, I was able to make without errors. When I tried insmod bcm440.o, I got a kernel incompatibility error (module designed for 2.4.18; I was using 2.4.18-bf2.4). So when I did insmod -f bcm4400.o I got a couple of unresolved symbols: kernel_flag and synchronize_irq.

After reading tldp.org's Module How-To, it seemed to say that I might need another module if I get unresolved symbols, but these symbols sound like something that the kernel should already expose. If I need to download a package to do this, that won't be so bad because I can just mount my NTFS partition.

I appreciate any suggestions or tips so that I can tackle the next incompatibility (I most likely will just need to get XFree86 4.3.0, but I will need Internet access in Linux for that first).

fancypiper 08-07-2003 06:54 PM

I assume you couldn't install it with apt-get install <name>.

Is the driver available in source code?

Perhaps these will help.

# Guides to software and installation and uninstallation
LNAG - How do I install a program I downloaded from the Internet?
Rute Guide's software explanation
You might want to check out CheckInstall to manage source code installations/uninstallation

Your proceedure for installing should be similar to this:
# Compiling/installing kernel modules
You will need to have installed:
1. The developmental packages (compiler)
2. The kernel source code that matches your running kernel
3. The module source or install code

Check out your system and look under the hood and see if you installed the stuff you need to do the job. Open an x terminal and type in this sequence of commands to see what kernel we are running and see if you have the kernel source installed:
Code:

[fancy@tinwhistle fancy]$ su -
Password:
[root@tinwhistle root]# uname -r
2.4.18-3

I am running kernel version 2.4.18-3. Do I have the proper source code?
Code:

[root@tinwhistle root]# cd /usr/src
[root@tinwhistle src]# ls -alc
total 3
drwxr-xr-x    4 root    root          136 Jun 12 14:53 .
drwxr-xr-x  16 root    root          424 Jun  4 12:04 ..
lrwxrwxrwx    1 root    root          14 Jun  4 12:11 linux-2.4 -> linux-2.4.18-3
drwxr-xr-x  16 root    root          584 Jun  4 12:11 linux-2.4.18-3
drwxr-xr-x    7 root    root          168 Jun  4 12:08 redhat
[root@tinwhistle src]#

I do have the same kernel version source code installed in the directory /usr/src/linux-2.4.18-3 and there is a symbolic link named linux-2.4 pointing to it.

If you don't see something similiar to this (but in color), you will need to install the kernel source.

NOTE: I noticed that Red Hat didn't make the symbolic link /usr/src/linux that all of the INSTALL files that I have read mentioned that I need, so I may as well make one now to save editing the files in the source code to install.So, I'll make it just now:
Code:

[root@tinwhistle src]# ln -s linux-2.4.18-3 linux       
[root@tinwhistle src]# ls -alc
total 3
drwxr-xr-x    4 root    root          160 Jun 12 15:46 .
drwxr-xr-x  16 root    root          424 Jun  4 12:04 ..
lrwxrwxrwx    1 root    root          14 Jun 12 15:46 linux -> linux-2.4.18-3
lrwxrwxrwx    1 root    root          14 Jun  4 12:11 linux-2.4 -> linux-2.4.18-3
drwxr-xr-x  16 root    root          584 Jun  4 12:11 linux-2.4.18-3
drwxr-xr-x    7 root    root          168 Jun  4 12:08 redhat
[root@tinwhistle src]#

Ah, there it is, so that's done.

Next, did I install the compiler?
Code:

[root@tinwhistle src]# gcc -v         
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113)
[root@tinwhistle src]#

Yes, I have a compiler installed.

If you don't have those two things installed, you have to install them first off your install CD.

If they are installed, download the source and happy comiling. :tisk: Make sure you carefully read the README and INSTALL files after extracting and before compiling/installing. :study:

Cruxus 08-07-2003 09:05 PM

Yes, this driver is provided in source-code form, as I said in my original post; and, yes, Debian 3.0r1 automatically installs gcc 2.95.x (default) and 3.0. I downloaded a new version (2.0.5) of the driver from Broadcom's website, and I unpacked the .tar.gz file and make'd. Again, I had to modify the Makefile so that it would look in the directories Debian puts the kernel headers in. It still didn't work.

Next, I tried installing the complete kernel-source-2.4.18 Debian package. It seems the headers-only package would have done just as well.

Third, after seeing the 2.4.18-bf2.4 kernel described as primarily for installation and being recommended to install another 2.4.18-5 kernel by Debian's dselect, I decided to install Debian packages kernel-image-2.4.18-686 (2.4.18-5) and kernel-headers-2.4.18-686. After running lilo and rebooting into Linux, I got even more errors after correcting the Makefile to point to the new headers and re-make'ing the driver module. Now many more external symbols are unresolved when I do "insmod -f bcm4400.o".

Am I going to have to get a new version of the Linux kernel (several websites claim this driver will work with Debian 3.0r1's 2.4.18 kernels; they did not mention any specific problems with the drivers). The installation instructions claim the driver has been tested for up to 2.4.20.

Cruxus 08-07-2003 10:36 PM

I would also like to add that if I do this without modifying the Makefile or any of the source files or headers:
Code:

$cd /usr/src
$ln -s /usr/src/kernel-headers-2.4.18-686/include/linux linux
$cd /bcm4400-driver/src
$make

The compiler gives me a file not found error for "/linux/modversions.h" in b44mm.h (b44mm.c). If I modify b44mm.h so that it #include's "/usr/src/kernel-headers-2.4.18-686/include/linux/modversions.h" instead of </linux/modversions.h> I get /linux/modules/*.ver and such error messages instead. For some strange reason, gcc doesn't suddenly go blind with other header files like /linux/config.h. Yes, /linux/modversions.h does exist!


All times are GMT -5. The time now is 05:08 AM.