Results 1 to 10 of 20

Thread: Macmini6,2 network driver not working

Hybrid View

  1. #1
    Join Date
    Oct 2012
    Beans
    5

    Macmini6,2 network driver not working

    Howdy All,

    I've been pulling my hair out trying to get the network working with my new mac mini. Any one else having issues installing Ubuntu 12.04 server on a macmini6,2 (Late 2012)?

    Running lspci I see that the ethernet card is a Broadcom BCM57765.

    I tried loading the tg3 driver, but it doesn't seem to do anything.

    Code:
    modeprobe tg3
    Code:
    dmesg | grep eth
    reports nothing.

    Any thoughts on where to go from here?

    Thanks in advance.

  2. #2
    Join Date
    Oct 2012
    Beans
    5

    Re: Macmini6,2 network driver not working

    I was able to get it to work with newer drivers from Broadcom.

    http://www.broadcom.com/support/ethe...me_desktop.php

    Compiled against kernel 3.2.0-32-generic works just fine.

  3. #3
    Join Date
    Feb 2007
    Beans
    291

    Re: Macmini6,2 network driver not working

    I have this same problem, I have the base model 2012 mac mini, neither wired or wireless works.

    Would you kindly post instructions for how you got the module loaded?

  4. #4
    Join Date
    Oct 2012
    Beans
    5

    Re: Macmini6,2 network driver not working

    Quote Originally Posted by superyounan1 View Post
    Would you kindly post instructions for how you got the module loaded?
    Sure.

    I actually used a 2nd Ubuntu 12.04 install to do the follow steps, but you should be able to do it all on the mac mini if that is all you have access to. You will for sure need another computer though to download the driver.

    First, make sure you have a build environment setup. You can do this on the mac mini during the install process. It will ask what packages to install, you need to select the last option to choose additional packages.

    Find the build-essentials package and hit +, then g to install it. You will also need the unzip package.

    You will also need the linux-source package. I'm not sure if that's on the install iso or not. If it is not, then you'll need to download it from another machine and copy it over and then install it.

    At this point the machine should be installed and you should have a sane build environment with the linux kernel sources.

    Download the Broadcom drivers from here:
    http://www.broadcom.com/support/lice...nux-3.124c.zip

    Unzip the downloaded file.

    Under the Server/Linux/Driver directory untar this file: tg3-3.124c.tar.gz

    Then, inside that directory run
    Code:
    make
    If that all works then you should have a tg3.ko file in that directory.

    Copy that file to /lib/modules/`uname -r`/kernel/drivers/net/ethernet/broadcom/tg3.ko

    Then run
    Code:
    modprobe tg3
    You should be able to see that it worked by checking
    Code:
    dmesg | grep eth0
    If you see some text after that command you're good to go.

    Let me know if you have any questions.

  5. #5
    Join Date
    Feb 2007
    Beans
    291

    Re: Macmini6,2 network driver not working

    Sigh, I never once compiled something from source in linux without running into a dozen errors or coming up against an endless list of missing dependencies.

    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.

    Anyway I have small intel atom / ion htpc running 12.04, tried compiling there and got this:

    Code:
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c: In function ‘tg3_phy_autoneg_cfg’:
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:4338:2: error: implicit declaration of function ‘ethtool_adv_to_mii_adv_t’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:4346:3: error: implicit declaration of function ‘ethtool_adv_to_mii_ctrl1000_t’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c: In function ‘tg3_phy_pull_config’:
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:4614:3: error: implicit declaration of function ‘mii_adv_to_ethtool_adv_t’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:4631:4: error: implicit declaration of function ‘mii_ctrl1000_to_ethtool_adv_t’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:4642:4: error: implicit declaration of function ‘mii_adv_to_ethtool_adv_x’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c: In function ‘tg3_phy_copper_fetch_rmtadv’:
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:4787:3: error: implicit declaration of function ‘mii_stat1000_to_ethtool_lpa_t’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:4793:2: error: implicit declaration of function ‘mii_lpa_to_ethtool_lpa_t’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c: In function ‘tg3_setup_fiber_mii_phy’:
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:5913:3: error: implicit declaration of function ‘ethtool_adv_to_mii_adv_x’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c: In function ‘tg3_tx’:
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:6684:2: error: implicit declaration of function ‘netdev_tx_completed_queue’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c: In function ‘tg3_start_xmit’:
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:8263:2: error: implicit declaration of function ‘netdev_tx_sent_queue’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c: In function ‘tg3_free_rings’:
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:8705:3: error: implicit declaration of function ‘netdev_tx_reset_queue’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c: In function ‘tg3_rss_init_dflt_indir_tbl’:
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:9903:3: error: implicit declaration of function ‘ethtool_rxfh_indir_default’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c: At top level:
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:14512:2: error: unknown field ‘get_rxfh_indir_size’ specified in initializer
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:14512:2: warning: initialization from incompatible pointer type [enabled by default]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:14512:2: warning: (near initialization for ‘tg3_ethtool_ops.set_rxnfc’) [enabled by default]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:14514:2: warning: initialization from incompatible pointer type [enabled by default]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:14514:2: warning: (near initialization for ‘tg3_ethtool_ops.get_rxfh_indir’) [enabled by default]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:14515:2: warning: initialization from incompatible pointer type [enabled by default]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:14515:2: warning: (near initialization for ‘tg3_ethtool_ops.set_rxfh_indir’) [enabled by default]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c: In function ‘tg3_init_one’:
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:17926:2: error: unknown type name ‘netdev_features_t’
    cc1: some warnings being treated as errors
    make[2]: *** [/home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.o] Error 1
    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
    I'll do some searching tomorrow for more options.

  6. #6
    Join Date
    Jun 2009
    Beans
    9

    Re: Macmini6,2 network driver not working

    Quote Originally Posted by superyounan1 View Post
    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 ...
    Code:
    #ifdef NETIF_F_TSO
    ... 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.

  7. #7
    Join Date
    Oct 2012
    Beans
    5

    Re: Macmini6,2 network driver not working

    Quote Originally Posted by superyounan1 View Post
    Sigh, I never once compiled something from source in linux without running into a dozen errors or coming up against an endless list of missing dependencies.
    I hear ya. I redid what I did before and wrote down everything this time, maybe this will help:

    Starting with a fresh install of Ubuntu 12.04 Server on a x86_64 VM

    Code:
    apt-get install build-essential linux-source linux-server unzip
    
    wget !snip!
    
    unzip linux-3.124c.zip?dl=1
    
    cd Server/Linux/Driver/
    tar zxf tg3-3.124c.tar.gz
    
    cd tg3-3.124c
    
    make
    At that point the build was successful and I had a tg3.ko file ready to go. The only other problem was that this was compiled against kernel version 3.2.0-32-generic. This is not the standard kernel installed with the 12.04 install CD, so you have to upgrade the kernel before you can use the .ko file.

    I installed the kernel on the mac mini and copied the tg3.ko file to /lib/modules/3.2.0-32-generic/kernel/drivers/net/ethernet/broadcom/tg3.ko

    Here is a zip file that contains the compiled tg3.ko module as well as the deb packages to upgrade the mac mini to the right kernel.

    !snip!

    Good luck!
    Last edited by ianneub; November 1st, 2012 at 03:59 PM. Reason: removed links to dropbox files that are no longer present

  8. #8
    Join Date
    Mar 2007
    Beans
    Hidden!

    Re: Macmini6,2 network driver not working

    Thank you so much for the info. Now I have a mac mini with ubuntu 12.04.2 up an running.

  9. #9
    Join Date
    Mar 2013
    Beans
    1

    Re: Macmini6,2 network driver not working

    Quote Originally Posted by cricketnut View Post
    Thank you so much for the info. Now I have a mac mini with ubuntu 12.04.2 up an running.
    Hi --

    You'll forgive me if I'm confused how you got from the stack trace to the above quote. Did you apply a patch? If so, would you provide a link or any further information?

    I'm running on a Mac Mini 6,1 / Ubuntu 12.10 / 3.5.x kernel, getting the following errors upon `sudo dkms build -m tg3 -v 3.124c`. (All packages installed, `dkms add` ran perfectly.)

    Terminal
    ----------
    cd src/ && make BUILD_KERNEL=3.5.0-17-generic KVER=3.5.0-17-generic....(bad exit status: 2)
    ERROR (dkms apport): binary package for tg3: 3.124c not found
    Error! Bad return status for module build on kernel: 3.5.0-17-generic (i686)
    Consult /var/lib/dkms/tg3/3.124c/build/make.log for more information.

    make.log
    ----------
    DKMS make.log for tg3-3.124c for kernel 3.5.0-17-generic (i686)
    Sat Mar 23 16:29:08 EDT 2013
    sh makeflags.sh /lib/modules/3.5.0-17-generic/build > tg3_flags.h
    make -C /lib/modules/3.5.0-17-generic/build SUBDIRS=/var/lib/dkms/tg3/3.124c/build/src modules
    make[1]: Entering directory `/usr/src/linux-headers-3.5.0-17-generic'
    CC [M] /var/lib/dkms/tg3/3.124c/build/src/tg3.o
    /var/lib/dkms/tg3/3.124c/build/src/tg3.c:96:24: fatal error: asm/system.h: No such file or directory
    compilation terminated.
    make[2]: *** [/var/lib/dkms/tg3/3.124c/build/src/tg3.o] Error 1
    make[1]: *** [_module_/var/lib/dkms/tg3/3.124c/build/src] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-17-generic'
    make: *** [default] Error 2
    Last edited by TheBeechnut; March 23rd, 2013 at 05:41 PM. Reason: included errors

  10. #10
    Join Date
    Apr 2007
    Beans
    5

    Re: Macmini6,2 network driver not working

    First of all you want to be at 3.8.5 because of the sound support and lots of usb3 fixes!


    cd /tmp
    wget http://dl.dropbox.com/u/47950494/upu...m/kernel-3.8.5 -O kernel-3.8.5
    chmod +x kernel-3.8.5
    sudo sh kernel-3.8.5
    sudo reboot




    1. Download your kernel source

    https://www.kernel.org/pub/linux/ker...x-3.8.5.tar.xz

    2. Put the kernel source on a usb stick (cause you don't have internet on the mac mini..)

    3. mount the usb stick:

    sudo mkdir /media/USB
    sudo mount /dev/sdb /media/USB (sda is your internal drive so sdb would be your first usb disk)

    4. untar the file:

    tar xz linux-3.8.5.tar.xz

    5. edit the broadcom file:

    cd /media/USB/linux-3.8.5/Drivers/net/ethernet/broadcom/
    sudo nano tg3.c

    6. add the macmini pci info:

    look for: {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57762)}, and underneath cp this:

    {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57766)},
    {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57782)},
    {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57786)},

    7. save the file (ctrl+x YES)

    8. copy your current Module.symvers

    sudo cp /usr/src/linux-headers-3.8.5-030805-generic/Module.symvers /media/USB/linux-3.8.5/

    9. make stuff:
    cd /media/USB/linux-3.8.5/
    make clean
    make oldconfig
    make scripts
    make prepare
    cd drivers/net/ethernet/broadcom/
    make -C /media/USB/linux-3.8.5 SUBDIRS=$PWD modules

    10. install new driver and activate:

    sudo cp /media/USB/drivers/net/ethernet/broadcom/tg3.ko /lib/modules/${kernelversion}/kernel/drivers/net/ethernet/broadcom/
    sudo modprobe tg3


    NICE INTERNET!

    [21321.011542] tg3.c:v3.128 (December 03, 2012)
    [21321.121927] tg3 0000:01:00.0 eth0: Tigon3 [partno(BCM957766a) rev 57766001] (PCI Express) MAC address a8:20:66:50:dd:a2
    Last edited by JoeBlack2k; April 1st, 2013 at 06:31 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •