I've recently succeeded in installing FreeBSD 13.0 on an old MacBook Pro 5,5 from mid-2009. I got a lot of help from these forums, so I'm collecting everything I've learned here as a way of giving back.
Hardware is a MacBook Pro 5,5 (13", mid-2009) with 8GB RAM and the old physical hard disk replaced with an SSD. The battery is the original, and only gets 1.5h on a normal load, but other than that the hardware is in good working order. Software is a fresh install of FreeBSD 13.0 AMD64 RELEASE using a memstick installer, with Xorg and XFCE4 installed as packages.
Hardware is a MacBook Pro 5,5 (13", mid-2009) with 8GB RAM and the old physical hard disk replaced with an SSD. The battery is the original, and only gets 1.5h on a normal load, but other than that the hardware is in good working order. Software is a fresh install of FreeBSD 13.0 AMD64 RELEASE using a memstick installer, with Xorg and XFCE4 installed as packages.
- Internal storage. 250GB Samsung SSD works out of the box at /dev/ada0. The machine is currently dual-booting a fresh install of macOS El Capitan (disk is partitioned using a GUID partition scheme. EFI boot partition appears to FreeBSD at /dev/ada0p1; macOS main partition /dev/ada0p2; macOS rescue partition at /dev/ada0p3).
- Ethernet. NVIDIA nForce MCP79 adapter works out of the box at /dev/nfe0.
- Wireless. Broadcom 4320 at /dev/bwn0 requires effort to get working, and throws warnings about resets and PHY TX errors even when it works.
- Driver. Need to rebuild the bwn() driver with the option to include GPL-licensed PHY code. Full details are available elsewhere on these forums. In short: create a new kernel configuration file based on /usr/src/sys/amd64/conf/GENERIC, include the lines below, then build and install a new kernel as you normally would.
Code:
device bwn # Broadcom BCM43xx wireless NICs. options BWN_GPL_PHY options BWN_DEBUG
- Firmware. Make and install net/bwn-firmware-kmod from ports (not available as a package due to license issues).
- Driver. Need to rebuild the bwn() driver with the option to include GPL-licensed PHY code. Full details are available elsewhere on these forums. In short: create a new kernel configuration file based on /usr/src/sys/amd64/conf/GENERIC, include the lines below, then build and install a new kernel as you normally would.
- Screen. NVIDIA GeFORCE 9400M at vgapci0 is mostly supported in console, and requires minor configuration to work with Xorg.
- Console. VT-based console works well out of the box, including support for different fonts via
vidcontrol -f
. Kernel Mode Switching on NVIDIA seems lacking (I can't find a way to change default screen resolution (which is not necessary with font switching) or switch between console and X). - X.org requires nvidia-driver-340-340 and drm-fbsd13-kmod, both available as packages. If X boots to a blank screen after the NVidia splash, try installing the nvidia-xconfig package and running it once. This package installed a newer version of the NVIDIA driver, which I had to remove by hand so I could reinstall the proper one. Note also that all users who need access to the screen under X need to be added to the "video" group.
- Console. VT-based console works well out of the box, including support for different fonts via
- Keyboard. Apple internal keyboard at /dev/ukbd0 requires minor configuration. USB keyboards work as expected. Bluetooth keyboards not tested.
- Console works well with
keymap="us.macbook.kbd"
in /etc/rc.conf (can be set through the default installer). - X.org has no default keymap which correctly recognises the tilde/backtick key. To address this, include the following in ~/.Xmodmap for each user who needs to use X.
Code:
keycode 94 = grave asciitilde # enable backtick/tilde at top left of keyboard
- Console works well with
- Pointer. Internal trackpad at /dev/ugen0.3 is recognized as a one-button mouse out of the box. USB mice work as expected. Bluetooth mice not tested. To enable multitouch, load the wsp() kernel module (which is included in GENERIC kernel but not loaded by default), and set
kern.evdev.rcpt_mask=3
in /etc/sysctl.conf. Without this setting, Xorg will ignore input from this device entirely. - Optical DVD+RW drive works out of the box. Discs appear at /dev/cd0.
- USB works out of the box. Thumb drives appear at /dev/da1
- Bluetooth controller at ubt0 and /dev/ugen2.3 is recognized out of the box. bluetooth-config() recognizes the controller without error or warning; not further tested.
- Firewire controller at pci4 requires firewire() kernel module, which is included in GENERIC kernel but not loaded by default. Once loaded, fwcontrol () recognizes it without error or warning; not further tested.
- Audio. Cirrus Logic CS4206 at hdaa0 works out of the box. Internal speaker and microphone appear as /dev/dsp0; audio jack as /dev/dsp1; "back" speaker as /dev/dsp2.
- iSight camera at /dev/ugen1.2 requires multimedia/webcamd driver, which works without further configuration once loaded.
- Infrared receiver at /dev/ugen0.2 requires sysutils/aird driver. Installs and runs without error or warnings; not further tested.
- SD Card Reader works out of the box. Cards appear at /dev/da0
- Power management works out of the box. powerd() starts without warning or error, and acpiconf() reports life battery and executes suspends. Waking from sleep can be sluggish, but this may be due to the age of the battery in the test machine.
- System Management Controller requires patching and a recompile to work. The default asmc() device does not recognize the MacBook Pro 5,5.
- Apply the following patch to files in /usr/src/sys/dev/asmc, and recompile and install the kernel:
Code:
--- asmc.c-original 2021-05-15 06:14:54.369004000 +1000 +++ asmc.c 2021-05-15 06:30:50.862021000 +1000 @@ -227,6 +227,12 @@ }, { + "MacBookPro5,5", "Apple SMC MacBook Pro Core 2 Duo (Mid 2009)", + ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS, + ASMC_MBP5_5_TEMPS, ASMC_MBP5_5_TEMPNAMES, ASMC_MBP5_5_TEMPDESCS + }, + + { "MacBookPro8,1", "Apple SMC MacBook Pro (early 2011, 13-inch)", ASMC_SMS_FUNCS_DISABLED, ASMC_FAN_FUNCS2, ASMC_LIGHT_FUNCS, ASMC_MBP81_TEMPS, ASMC_MBP81_TEMPNAMES, ASMC_MBP81_TEMPDESCS --- asmcvar.h-original 2021-05-15 06:14:59.686004000 +1000 +++ asmcvar.h 2021-05-15 07:01:37.040379000 +1000 @@ -232,6 +232,31 @@ "Heatsink 2", "Memory Controller", \ "PCI Express Slot Pin", "PCI Express Slot (unk)" } +#define ASMC_MBP5_5_TEMPS { "TB0T", "TB1T", \ + "TB2T", "TB3T", \ + "TC0D", "TC0P", \ + "TN0D", "TN0P", \ + "TTF0", \ + "Th0H", "Th1H", "ThFH", \ + "Ts0P", "Ts0S", \ + NULL } + +#define ASMC_MBP5_5_TEMPNAMES { "enclosure_bottom_0", "enclosure_bottom_1", \ + "enclosure_bottom_2", "enclosure_bottom_3", \ + "cpu_diode", "cpu_pin", \ + "northbridge_diode", "northbridge_pin", \ + "unknown", \ + "heatsink_0", "heatsink_1", "heatsink_2", \ + "pci_express_slot_pin", "pci_express_slot_unk" } + +#define ASMC_MBP5_5_TEMPDESCS { "Enclosure Bottom 0", "Enclosure Bottom 1", \ + "Enclosure Bottom 2", "Enclosure Bottom 3", \ + "CPU Diode", "CPU Pin", \ + "Northbridge Diode", "Northbridge Pin", \ + "Unknown", \ + "Heatsink 0", "Heatsink 1", "Heatsink 2", \ + "PCI Express Slot Pin", "PCI Express Slot (unk)" } + #define ASMC_MBP81_TEMPS { "TB0T", "TB1T", "TB2T", "TC0C", "TC0D", \ "TC0E", "TC0F", "TC0P", "TC1C", "TC2C", \ "TCFC", "TCGC", "TCSA", "TM0S", "TMBS", \
- Apply the following patch to files in /usr/src/sys/dev/asmc, and recompile and install the kernel:
Last edited: