|
| 1 | +# mbp-ubuntu-kernel |
| 2 | + |
| 3 | +Ubuntu/Mint/Debian kernel 5.6 with Apple T2 patches built-in (Macbooks produced >= 2018). |
| 4 | + |
| 5 | +Drivers: |
| 6 | + |
| 7 | +- Apple T2 (audio, keyboard, touchpad) - <https://github.com/MCMrARM/mbp2018-bridge-drv> |
| 8 | +- Apple SMC - <https://github.com/MCMrARM/mbp2018-etc> |
| 9 | +- Touchbar - <https://github.com/roadrunner2/macbook12-spi-driver/tree/mbp15> |
| 10 | + |
| 11 | +This project is closely inspired by mikeeq/mbp-fedora-kernel. Thank you @mikeeq for the scripts and setup. |
| 12 | + |
| 13 | +IF YOU ENJOY THIS CODE, CONSIDER CONTRIBUTING TO THE AUTHORS @MCMrARM @roadrunner2 @aunali1 @ppaulweber @mikeeq, they did all the hard work. |
| 14 | + |
| 15 | +## CI status |
| 16 | + |
| 17 | +Drone kernel build status: |
| 18 | +[](https://cloud.drone.io/marcosfad/mbp-ubuntu-kernel) |
| 19 | + |
| 20 | +Travis kernel publish status - <http://mbp-ubuntu-kernel.herokuapp.com/> : |
| 21 | +[](https://travis-ci.com/marcosfad/mbp-ubuntu-kernel) |
| 22 | + |
| 23 | +## TODO |
| 24 | + |
| 25 | +### Known issues |
| 26 | + |
| 27 | +- Dynamic audio input/output change (on connecting/disconnecting headphones jack) |
| 28 | +- TouchID - (@MCMrARM is working on it - https://github.com/Dunedan/mbp-2016-linux/issues/71#issuecomment-528545490) |
| 29 | +- Thunderbolt (is disabled, because driver was causing kernel panics (not tested with 5.5 kernel)) |
| 30 | +- Microphone (it's recognised with new apple t2 sound driver, but there is a low mic volume amp) |
| 31 | + |
| 32 | +#### Working with upstream stable kernel 5.1 |
| 33 | + |
| 34 | +- Display/Screen |
| 35 | +- USB-C |
| 36 | +- Battery/AC |
| 37 | +- Ethernet/Video USB-C adapters |
| 38 | +- Bluetooth |
| 39 | + |
| 40 | +#### Working with mbp-ubuntu-kernel |
| 41 | + |
| 42 | +- NVMe |
| 43 | +- Camera |
| 44 | +- keyboard |
| 45 | +- touchpad (scroll, right click) |
| 46 | +- wifi (not Macbook pro 16,1) |
| 47 | + - you need to manually extract firmware from macOS |
| 48 | + - <https://github.com/Dunedan/mbp-2016-linux/issues/71#issuecomment-517444300> |
| 49 | + - <https://github.com/Dunedan/mbp-2016-linux/issues/71#issuecomment-515401480> |
| 50 | + - or download it from <https://packages.aunali1.com/apple/wifi-fw/18G2022> |
| 51 | + |
| 52 | +> Firmware can be found by running `ioreg -l | grep C-4364` or `ioreg -l | grep RequestedFiles` under macOS |
| 53 | +
|
| 54 | +``` |
| 55 | +Put the firmware in the right place! |
| 56 | +The .trx file for your model goes to /lib/firmware/brcm/brcmfmac4364-pcie.bin, |
| 57 | +the .clmb goes to /lib/firmware/brcm/brcmfmac4364-pcie.clm_blob |
| 58 | +and the .txt to something like /lib/firmware/brcm/brcmfmac4364-pcie.Apple Inc.-MacBookPro15,2.txt |
| 59 | +``` |
| 60 | + |
| 61 | +``` |
| 62 | +# ls -l /lib/firmware/brcm | grep 4364 |
| 63 | +-rw-r--r--. 1 root root 12860 Mar 1 12:44 brcmfmac4364-pcie.Apple Inc.-MacBookPro15,2.txt |
| 64 | +-rw-r--r--. 1 root root 922647 Mar 1 12:44 brcmfmac4364-pcie.bin |
| 65 | +-rw-r--r--. 1 root root 33226 Mar 1 12:44 brcmfmac4364-pcie.clm_blob |
| 66 | +``` |
| 67 | + |
| 68 | +``` |
| 69 | +# dmesg |
| 70 | +brcmfmac 0000:01:00.0: enabling device (0000 -> 0002) |
| 71 | +brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4364-pcie for chip BCM4364/3 |
| 72 | +brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4364-pcie for chip BCM4364/3 |
| 73 | +brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4364/3 wl0: Mar 28 2019 19:17:52 version 9.137.9.0.32.6.34 FWID 01-36f56c94 |
| 74 | +brcmfmac 0000:01:00.0 wlp1s0: renamed from wlan0 |
| 75 | +``` |
| 76 | + |
| 77 | +#### Working with external drivers |
| 78 | + |
| 79 | +>> with @MCMrARM mbp2018-bridge-drv |
| 80 | +
|
| 81 | +- keyboard |
| 82 | +- touchpad |
| 83 | +- touchbar |
| 84 | +- audio |
| 85 | + |
| 86 | +#### Not tested |
| 87 | + |
| 88 | +- eGPU |
| 89 | +- Thunderbolt |
| 90 | + |
| 91 | +## Docs |
| 92 | + |
| 93 | +- Discord: <https://discord.gg/Uw56rqW> |
| 94 | +- WiFi firmware: <https://packages.aunali1.com/apple/wifi-fw/18G2022> |
| 95 | +- blog `Installing Fedora 31 on a 2018 Mac mini`: <https://linuxwit.ch/blog/2020/01/installing-fedora-on-mac-mini/> |
| 96 | +- iwd: |
| 97 | + - <https://iwd.wiki.kernel.org/networkconfigurationsettings> |
| 98 | + - <https://wiki.archlinux.org/index.php/Iwd> |
| 99 | + - <https://www.vocal.com/secure-communication/eap-types/> |
| 100 | + |
| 101 | +### Ubuntu |
| 102 | + |
| 103 | +- <https://wiki.ubuntu.com/KernelTeam/GitKernelBuild> |
| 104 | +- <https://help.ubuntu.com/community/Repositories/Personal> |
| 105 | +- <https://medium.com/sqooba/create-your-own-custom-and-authenticated-apt-repository-1e4a4cf0b864> |
| 106 | +- <https://help.ubuntu.com/community/Kernel/Compile> |
| 107 | +- <https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel> |
| 108 | +- <https://www.linux.com/training-tutorials/kernel-newbie-corner-building-and-running-new-kernel/> |
| 109 | +- <https://wiki.ubuntu.com/KernelTeam/KernelMaintenance> |
| 110 | + |
| 111 | +### Github |
| 112 | + |
| 113 | +- GitHub issue (RE history): <https://github.com/Dunedan/mbp-2016-linux/issues/71> |
| 114 | +- VHCI+Sound driver (Apple T2): <https://github.com/MCMrARM/mbp2018-bridge-drv/> |
| 115 | +- AppleSMC driver (fan control): <https://github.com/MCMrARM/mbp2018-etc/tree/master/applesmc> |
| 116 | +- hid-apple keyboard backlight patch: <https://github.com/MCMrARM/mbp2018-etc/tree/master/apple-hid> |
| 117 | +- TouchBar driver: <https://github.com/roadrunner2/macbook12-spi-driver/tree/mbp15> |
| 118 | +- Kernel patches (all are mentioned in github issue above): <https://github.com/aunali1/linux-mbp-arch> |
| 119 | +- ArchLinux kernel patches: <https://github.com/ppaulweber/linux-mba> |
| 120 | +- hid-apple-patched module for changing mappings of ctrl, fn, option keys: <https://github.com/free5lot/hid-apple-patched> |
| 121 | + |
| 122 | +## Credits |
| 123 | + |
| 124 | +- @MCMrARM - thanks for all RE work |
| 125 | +- @ozbenh - thanks for submitting NVME patch |
| 126 | +- @roadrunner2 - thanks for SPI (touchbar) driver |
| 127 | +- @aunali1 - thanks for ArchLinux Kernel CI |
| 128 | +- @ppaulweber - thanks for keyboard and Macbook Air patches |
| 129 | +- @mikeeq - thanks for the fedora kernel project and compilation scripts |
0 commit comments