User Tools

Site Tools


linux:gentoo-mbp

Install Gentoo on MacBookPro(MD318)

Now I have installed the Gentoo on my MBP succesfully,I need to record some issues that I have solved.

lspci

localhost ~ # lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:01.1 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Universal Host Controller #5 (rev 05)
00:1a.7 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)
00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b5)
00:1c.2 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 3 (rev b5)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Universal Host Controller #1 (rev 05)
00:1d.7 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation HM65 Express Chipset Family LPC Controller (rev 05)
00:1f.2 IDE interface: Intel Corporation 6 Series/C200 Series Chipset Family 4 port SATA IDE Controller (rev 05)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)
01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Whistler [AMD Radeon HD 6600M Series]
01:00.1 Audio device: Advanced Micro Devices [AMD] nee ATI Turks HDMI Audio [Radeon HD 6000 Series]
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM57765 Gigabit Ethernet PCIe (rev 10)
02:00.1 SD Host controller: Broadcom Corporation NetXtreme BCM57765 Memory Card Reader (rev 10)
03:00.0 Network controller: Broadcom Corporation BCM4331 802.11a/b/g/n (rev 02)
04:00.0 FireWire (IEEE 1394): Agere Systems FW643 PCI Express 1394b Controller (PHY/Link) (rev 08)

Wireless card

03:00.0 Network controller: Broadcom Corporation BCM4331 802.11a/b/g/n (rev 02)

Thought I have followed the directions of the kernel document,but it still can't find the wireless card,after the google search ,it must enable the following options for the kernel

Device Drivers->Broadcom specific AMBA->
                   < *> BCMA Support
                    [*] Support for BCMA on PCI-host bus

And you can find the firmware in the

 ls /lib/firmware/b43/
 
 

ALSA Sound card

Add the hda-intel to /etc/make.conf

ALSA_CARDS="hda-intel"

And config the kernel options fo intel hda,after these I think it should work well,but wtf,it is no sound.I almost use alsa-mixer to set all the values to the largest,but useless.

Then one day,I use the System→Volume Control,I found some settings are set to mute,that is the problem,after correct,it works well,so strange.

ALSA Settings

Refer to http://www.gentoo.org/doc/en/alsa-guide.xml

emerge alsa-utils
rc-update add alsasound boot
gpasswd -a <username> audio 

aticonfig

When I upgrade the kernel to 3.3.8,it can't startx correctly,after google search,need do the aticonfig to generate the /etc/X11/xorg.conf:

aticonfig --initial

Reference

http://ck.kennt-wayne.de/2012/jun/gentoo-linux-on-the-macbook-pro-82-late-2011

Touchpad:The touchpad works flawlessly with xf86-input-mtrack.

http://dentifrice.poivron.org/laptops/macbookpro8,2/

emerge x11-drivers/xf86-input-mtrack

Append section to /etc/X11/xorg.conf

Section "InputClass"
	 MatchIsTouchpad "true"
	 Identifier      "Touchpads"
	 Driver          "mtrack"
 EndSection

.Xmodmap

[email protected] ~ $ cat .Xmodmap 
pointer = 1 2 3 5 4 7 6 8 9 10 11 12

Fix boot after reinstall Mac OS X

1.Of course,first should install rEFIt,and sync the MBR partition list.

2.Fix the grub command,it is really strange,after the new install of Mac OS X,the sda5 has been changed to sda4,so need update all related partition index by -1.

splashimage=(hd0,3)/boot/grub/splash.xpm.gz
#Now config
title Gentoo Linux root (hd0,3) root=/dev/sda4 /boot/kernel-3.3.8 
root (hd0,3)
kernel /boot/kernel-3.3.8 root=/dev/sda4

#The previous config
title Gentoo Linux root (hd0,4) root=/dev/sda5 /boot/kernel-3.3.8 
root (hd0,4)
kernel /boot/kernel-3.3.8 root=/dev/sda5

And the fstab also need update:

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda4              /           ext4            noatime         0 0
#/dev/sda4 /boot		ext2		noauto,noatime	1 2
/dev/sda3		/home		ext4		noatime		0 1
#/dev/SWAP		none		swap		sw		0 0
/dev/cdrom		/mnt/cdrom	auto		noauto,ro	0 0
/dev/fd0		/mnt/floppy	auto		noauto		0 0

Tips

fglrxinfo
fgl_glxgears

Gentoo Linux on the MacBook Pro 8,2 (late 2011):

http://ck.kennt-wayne.de/2012/jun/gentoo-linux-on-the-macbook-pro-82-late-2011

Kernel config

/var/www/dokuwiki/wiki/data/pages/linux/gentoo-mbp.txt · Last modified: 2016/05/05 13:07 (external edit)