Installing openSUSE 12.2 on a MacMini 6.2

In December 2012 I bought a new MacMini which identifies itself during startup like this

0.000000] DMI: Apple Inc. Macmini6,1/Mac-0xxxxxxxxxxxxxxxxx, BIOS MM61.88Z.0106.B03.1211161202 11/16/2012

Since I had openSUSE installed on my six year old MacBookPro, I was eager to get openSUSE 12.2 installed on that machine. Especially since the new machine is ought to replace the old one.
I will use this thread to describe what I did to get the installation running, what is working so far and what isn’t

1.) I resized the hard drive using OS-X’s disk utility. Later I installed a second hard drive (SSD) using the special cable from OWC.
2.) I’m using reFind as a primary boot manager (replacing refit which seems to not actively beeing developed any longer)
3.) I put openSUSE 12.2 64bit on a usb stick following some instructions on the openSUSE web space. The installation went more or less smooth
4.) I didn’t get GRUB (grub, grub2, grub2-efi) successfully installed in a way, it would boot afterwards. I tried an awful lot of combinations. Selecting the boot entry would only lead to GRUB with a blinking curser
So I ended up with this solution:
Installing grub2 to the partition where / is located (e.G. - /dev/sdb3)
Installing Ubuntu 12.10 which installs a grub64.efi to /dev/sda1 (the EFI-Partition) /ubutnu
(the newest update to grub in opensuse now installs a grub.efi to /dev/sda1/opensuse but selecting this boot entry leads me to a grub prompt only :frowning: )
Having started Ubuntu I used Boot Repair and https://answers.launchpad.net/grub-customizer/+faq/1397 to include the openSUSE entries into Ubuntu’s Grub-Menu. However, I didn’t managed to make the openSUSE menu item the default
5.) Using a Kernel 3.7.2 from the Kernel-standard repository from openSUSE
6.) To get networking at all, I started to use a usb-Ethernet dongle
Wireless: The chip included is a Broadcom B4331. (b43 - Linux Wireless) lspci -vnn -d 14e4: -
Installing b43-fwcutter
Running “/usr/sbin/install_bcm43xx_firmware” didn’t help since the script isn’t downloading the needed firmware:
b43-phy0 ERROR: Firmware file “b43/ucode29_mimo.fw” not found
This module is not to be found in /lib/firmware/b43
Patching the aforementioned script in line 10 and 11 helps:


File: /usr/sbin/install_bcm43xx_firmware

URL1=http://www.lwfinger.com/b43-firmware
- FILE1=broadcom-wl-5.10.144.3.tar.bz2
- FIRMWARE1=broadcom-wl-5.10.144.3/linux/wl_apsta.o
+ FILE1=broadcom-wl-5.100.138.tar.bz2
+ FIRMWARE1=broadcom-wl-5.100.138/linux/wl_apsta.o

 Ethernet
 So far I've found out that the chip is 

01:00.0 Ethernet controller [0200]: Broadcom Corporation NetXtreme BCM57766 Gigabit Ethernet PCIe [14e4:1686] (rev 01)
        Subsystem: Broadcom Corporation NetXtreme BCM57766 Gigabit Ethernet PCIe [14e4:1686]
 
I also found the device's ID in the module's source code:

/usr/src/linux-3.7.2-1/drivers/net/ethernet/broadcom/tg3.h

#define  TG3PCI_DEVICE_TIGON3_57766      0x1686

lsmod tells me that tg3 is loaded. However. The port is not recognized at all. First I was mislead by this thread ([SOLVED] Macmini6,2 network driver not working - Ubuntu Forums](http://ubuntuforums.org/showthread.php?t=2078320)) since the module seems to build at the 3.7 kernel. Any input on this issue is highly appreaciated

VIDEO
    
lspci -nnv | grep VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])

2D seems to work using the i915 driver
3D not sure yet; KDE 4.9 doesn’t let me enable some desktop effects
Attaching a monitor to the HDMI port using the hdmi-dvi dongle supplied is working.
Attaching a display port (DP) monitor using a miniDP (thunderbolt) to DP cable freezes the video completely after a short time

SOUND
working out of the box

SDCARD-READER
working (probably)
wasn’t previously.


01:00.1 SD Host controller [0805]: Broadcom Corporation NetXtreme BCM57765 Memory Card Reader [14e4:16bc] (rev 01) (prog-if 01)
        Subsystem: Broadcom Corporation Device [14e4:0000]
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at a0420000 (64-bit, prefetchable) [size=64]
        Capabilities: [48] Power Management version 3
        Capabilities: [58] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [ac] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [150] Power Budgeting <?>
        Capabilities: [160] Virtual Channel
        Kernel driver in use: sdhci-pci

Booting from this slot isn’t working either.

I will improve this howtow over the time and would be happy to receive some hints especially on the ethernet and the grub2-efi issue.
I wanted to share my experiences made within the last weeks and do hope this is of some help for a few linux users.

Cheers
m.r.[/size]

I didn’t know, that I can’t edit my previous post.

Bluetooth
Is working

Ethernet
Managed to get the wired connection working on Ubuntu but here on openLinux a modprobe tg3 doesn’t seem to care the presence of the build in ethernet port

My findings at Ubuntu:


snippet from dmesg

    2.862742] tg3 0000:01:00.0: >enabling device (0000 -> 0002)
    2.891785] pcieport 0000:00:1c.0: eth0: Tigon3 [partno(BCM957766a) rev 57766001] (PCI Express) MAC address a8:20:66:46:68:73
    2.891786] pcieport 0000:00:1c.0: eth0: attached PHY is 57765 (10/100/1000Base-T Ethernet) (WireSpeed[1], EEE[1])
    2.891786] pcieport 0000:00:1c.0: eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] TSOcap[1]
    2.891787] pcieport 0000:00:1c.0: eth0: dma_rwctrl[00000001] dma_mask[64-bit]


lspci

01:00.0 0200: 14e4:1686 (rev 01)
        Subsystem: 14e4:1686
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 256 bytes
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at a0400000 (64-bit, prefetchable) [size=64]
        Region 2: Memory at a0410000 (64-bit, prefetchable) [size=64]
        Capabilities: [48] Power Management version 3
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=1 PME-
        Capabilities: [50] Vital Product Data
                Product Name: Broadcom NetXtreme Gigabit Ethernet Controller
                Read-only fields:
                        [PN] Part number: BCM957766a
                        [EC] Engineering changes: 106679-15
                        [SN] Serial number: 0123456789
                        [MN] Manufacture ID: 31 34 65 34
                        [RV] Reserved: checksum good, 26 byte(s) reserved
                Read/write fields:
                        [YA] Asset tag: XYZ01234567
                        [RW] Read-write area: 107 byte(s) free
                End
        Capabilities: [58] MSI: Enable- Count=1/8 Maskable- 64bit+
                Address: 0000000000000000  Data: 0000
        Capabilities: [a0] MSI-X: Enable+ Count=6 Masked-
                Vector table: BAR=2 offset=00000000
                PBA: BAR=2 offset=00000120
        Capabilities: [ac] Express (v2) Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <4us, L1 <64us
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr+ NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 4096 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <2us, L1 <64us
                        ClockPM+ Surprise- LLActRep- BwNot-
                LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
                       ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Range ABCD, TimeoutDis+
               DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
        Capabilities: [100 v1] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [13c v1] Device Serial Number 00-00-a8-20-66-46-68-73
        Capabilities: [150 v1] Power Budgeting <?>
        Capabilities: [160 v1] Virtual Channel
                Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
                Arb:    Fixed- WRR32- WRR64- WRR128-
                Ctrl:   ArbSelect=Fixed
                Status: InProgress-
                VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                        Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
                        Status: NegoPending- InProgress-
        Capabilities: [1b0 v1] Latency Tolerance Reporting
                Max snoop latency: 0ns
                Max no snoop latency: 0ns
        Kernel driver in use: tg3


uname -a
Linux miniature 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux


I’ sure that must be to be solved on openSUSE as well.[/size][/size]

Finally I might have solved the internal Ethernet problem as well:
Finding this helped:
Standalone Linux on Mac Mini 2012 - Mark Draheim

Indeed, the device is mentioned within tg3.h

#define  TG3PCI_DEVICE_TIGON3_57766      0x1686

Comparing the tg3.c coming with openSUSE’s 3.7 kernel with the one mentioned in the ubuntu thread, I patched this source /usr/src/linux/drivers/net/ethernet/broadcom/tg3.c


------------------------------------ tg3.c ------------------------------------
index a8800ac..2c35324 100644
@@ -301,6 +301,9 @@ static DEFINE_PCI_DEVICE_TABLE(tg3_pci_tbl) = {
     {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5719)},
     {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5720)},
     {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57762)},
+    {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)},
     {PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX)},
     {PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX)},
     {PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1000)},

Not having compiled a kernel nor kernel modules myselfs for years, I’m struggeling with the problem dmesg is reporting

tg3: no symbol version for module_layout

at the moment.
A

modprobe -f tg3

lets me load the module and I can successfully establish a connection.

I’m doing a make -j 3 rpm at the kernel tree at the moment in the hope to get the propper module versions included.

Any hint how to rebuild the tg3.ko as a single module only would be highly appreciated!

Update: Internal ethernet port - compiling a single module
This script is working for me

#!/bin/sh

kernelversion=`uname -r`
# # cd to dir of patched version 
# cp /usr/src/${kernelversion}/drivers/net/ethernet/broadcom/tg35.c
# # make sure the source doesn't differ in other parts then the one modified
# diff tg3.c tg35.c 
# # copy patched version to source 
#  cp tg3.c /usr/src/${kernelversion}/drivers/net/ethernet/broadcom/tg3.c
cd /usr/src/linux
make clean
make oldconfig
# copying Module.symvers from the 64bit desktop kernel
# use different file if you are using a different kernel
cp /usr/src/linux-obj/x86_64/desktop/Module.symvers /usr/src/linux/
make scripts
make prepare
cd drivers/net/ethernet/broadcom/
make -C /usr/src/linux SUBDIRS=$PWD modules
cd -
ls -l drivers/net/ethernet/broadcom/tg3.ko
cp drivers/net/ethernet/broadcom/tg3.ko /lib/modules/${kernelversion}/kernel/drivers/net/ethernet/broadcom/
rmmod tg3 ; modprobe tg3

The only thing left at the moment is the problem with a proper working grub2 configuration to get rid of the workaround (using the ubuntu grub2-efi).

I really don’t have enough time at the moment to look closer at the details (and I don’t have a Mac Mini). But I want to thank you for these posts. I intend to install openSUSE in native EFI mode on a MacBook Pro (with or without work around) sooner or later (rather later). It wasn’t even possible on my old iMac - which is not able to boot 64bit EFI (thus I had to perform a legacy Linux installation, and use rEFIt, etc.)

I am trying to install opensuse 12.3 rc2 on new imac. With the b43 the connection is very slow (unusable). If I do “modprobe tg3”, the module is loaded, but the interface does not go up. Is it your wi-fi connection is good? Do you used the Apple usb ethernet adapter?
Thanks for your post.