Gentoo on the MacBook Air

It’s been a very long time since I posted anything, so it’s my new year’s resolution to do more this year. This first post of the year will be a computer post. Over the holidays I picked up a MacBook Air, and I have to say I love the design. Some of the highlights include: back-lit keyboard, multi-touch trackpad, fans & speakers hidden in the joint between the display and the keyboard & aluminium case. Apple really does a great job with design. But of course, I hate the simplicity of MacOSX. Yes I know it’s built on top of Darwin, but I like to be able to tinker with “everything” and run all my favorite programs. So the first thing to do when I got it was to delete everything and put on Linux. I won’t go through every detail, but I will mention the things that did not work out of the box. Hope this helps someone else!

##################################
# MacOSX fixes – Do this before
# removing MacOSX
##################################

If you use only Linux, boot hangs for 30 seconds waiting for the Mac partition. To override this issue the following command (from MacOSX):
bless –device /dev/disk0s1 –setBoot –legacy –verbose

To stop the boot mac sound, issue the following command:
/usr/sbin/nvram SystemAudioVolume=%01

##################################
# Wireless Card
# note the two <M>, these MUST be
# built as modules for the wifi
# card to work
##################################

edit: in kernel 3.2+ you must turn off BCMA to get BRCM softmac enabled, which is now under drivers/network (not staging)

 

Install: sys-kernel/linux-firmware

[*] Networking support —>
-*- Wireless —>
<*> cfg80211 – wireless configuration API
[*] Wireless extensions sysfs files
<*> Common routines for IEEE802.11 drivers
<*> Generic IEEE 802.11 Networking Stack (mac80211)

Device Drivers —>
Broadcom specific AMBA —>
<M> BCMA support
[*] Support for BCMA on PCI-host bus
[*] Staging drivers —>
<M> Broadcom IEEE802.11n PCIe SoftMAC WLAN driver

##################################
# Intel Video Card
##################################

edit: the hack below is not needed in kernels newer than 3.2

I found this solution here: https://bugs.freedesktop.org/show_bug.cgi?id=39533#c25

first edit /usr/src/linux/drivers/gpu/drm/i915/intel_bios.c
and after the:
DRM_DEBUG_KMS(“Found panel mode in BIOS VBT tables:\n”);
drm_mode_debug_printmodeline(panel_fixed_mode);
lines add the following:
panel_fixed_mode->hdisplay = 1366;
panel_fixed_mode->hsync_start = 1398;
panel_fixed_mode->hsync_end = 1566;
panel_fixed_mode->htotal = 1734;
panel_fixed_mode->vdisplay = 768;
panel_fixed_mode->vsync_start = 772;
panel_fixed_mode->vsync_end = 776;
panel_fixed_mode->vtotal = 792;
panel_fixed_mode->clock = 72500;
panel_fixed_mode->type = 0×48;
panel_fixed_mode->flags = 0xa;
drm_mode_set_name(panel_fixed_mode);

Graphics support —>
<*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) —>
<*> Intel 8xx/9xx/G3x/G4x/HD Graphics
[*] Enable modesetting on intel by default

##################################
# Intel Audio Card
##################################

This worked automatically with pulseaudio, BUT I had to install gnome-alsamixer and turn up the “Surround” volume to get the speakers working

##################################
# Webcam
##################################

install the media-video/isight-firmware-tools
download: http://www.mediafire.com/?81xtkqyttjt

then ift-extract –apple-driver AppleUSBVideoSupport

##################################
# SSD enhancements
##################################

fstab should include (in this case sda1 is the ssd, the tmpfs is for gentoo to not compile on the ssd):
/dev/sda1 / ext4 discard,noatime,data=ordered 0 1
tmpfs /var/tmp/portage tmpfs nodev,nosuid,mode=1777 0 0

add the following to the /boot/grub/grub.conf kernel line:
elevator=noop

Welcome to the new eugenecormier.com!

We’ve got a slick new interface including: up to the minute events listings, the blog right on the front page, the video player now supports sequential playback of all files in the playlist. I’ll add to the video page and gallery when I get some time, so check back or subscribe to the rss feed.

Cheers
Eugene

Welcome!

Come one, come all and welcome to my blog. I will be blogging about some of my interests including:
-Classical guitar
-Linux
-Lilypond
and more….please check back or subscribe to the RSS feed!

/e