Originally Posted by
superyounan1
I'm using a live session with persistence (casper), so I popped it into a dell laptop (goes online fine, btw) and tried to compile, got this:
Code:
ubuntu@ubuntu:~/Downloads/Server/Linux/Driver/tg3-3.124c$ make
make -C /lib/modules/3.5.0-17-generic/build SUBDIRS=/home/ubuntu/Downloads/Server/Linux/Driver/tg3-3.124c modules
make[1]: Entering directory `/usr/src/linux-headers-3.5.0-17-generic'
CC [M] /home/ubuntu/Downloads/Server/Linux/Driver/tg3-3.124c/tg3.o
/home/ubuntu/Downloads/Server/Linux/Driver/tg3-3.124c/tg3.c:96:24: fatal error: asm/system.h: No such file or directory
compilation terminated.
make[2]: *** [/home/ubuntu/Downloads/Server/Linux/Driver/tg3-3.124c/tg3.o] Error 1
make[1]: *** [_module_/home/ubuntu/Downloads/Server/Linux/Driver/tg3-3.124c] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-17-generic'
make: *** [default] Error 2
I do have linux headers installed, but somehow system.h is missing? I did some googling and found a very similar issue affecting nvidia drivers, though I don't think they're related.
Note that you're compiling against a different version of the kernel than the example above. I'm guessing you are using quantal, whereas the other example was using precise. It seems that asm/system.h was removed somewhat recently, at least on x86.
Anyway I have small intel atom / ion htpc running 12.04, tried compiling there and got this:
Code:
[...]
make[1]: *** [_module_/home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-32-generic'
make: *** [default] Error 2
Here you're back to 3.2.0, which I imagine is on precise.
I have not tried building the tg3 driver on precise, but I did manage to get it working on quantal on my macmini6,1. I made the following changes to the driver sources:
1. At line 96 of tg3.c, simply comment out the inclusion of asm/system.h:
Code:
/* #include <asm/system.h> */
2. At line 14534 of tg3.c, I surrounded the following two lines of code ...
Code:
.get_sg = ethtool_op_get_sg,
.set_sg = ethtool_op_set_sg,
... with a preprocessor directive reflecting the fact that get_sg and set_sg were deprecated in (I believe) Linux 3.0 and removed sometime after that. Here's what that looks like:
Code:
#if (LINUX_VERSION_CODE < 0x30000)
.get_sg = ethtool_op_get_sg,
.set_sg = ethtool_op_set_sg,
#endif
3. Finally, since the API the driver tries to use to do TCP Segment Offloading went through the same deprecation and removal as get_sg and set_sg, and since I have no idea how to modify the driver to use the new API, I attempted to remove the TSO support entirely by changing line 3 of tg3_firmware.h from ...
... to ...
Code:
#ifdef XXXXNETIF_F_TSO
That resulted in a driver that's working for me. Clearly it's just a quick hack, but it got the network up on my new Mac mini, so it's good enough for me for now. Hopefully someone who knows more about Ethernet drivers can provide a proper patch, or perhaps Broadcom will update their driver sometime soon.
Bookmarks