mbp-fedora-kernel icon indicating copy to clipboard operation
mbp-fedora-kernel copied to clipboard

mbp-fedora-kernel

Fedora kernel with Apple T2 patches built-in (Macbooks produced >= 2018).

Fedora ISO (with mbp-fedora-kernel builtin): https://github.com/mikeeq/mbp-fedora

Kernel patches: https://github.com/AdityaGarg8/linux-t2-patches

Tested on: Macbook Pro 15,2 13" 2019 i5 TouchBar Z0WQ000AR MV972ZE/A/R1 && Macbook Pro 16,2 13" 2020 i5

Boot ROM Version:	220.270.99.0.0 (iBridge: 16.16.6571.0.0,0)
macOS Mojave: 10.14.6 (18G103)

How to update kernel-mbp

### First run or if you want to update your copy of update_kernel_mbp script
sudo -i
curl -L https://raw.githubusercontent.com/mikeeq/mbp-fedora-kernel/v5.18-f36/update_kernel_mbp.sh -o /usr/bin/update_kernel_mbp
chmod +x /usr/bin/update_kernel_mbp
update_kernel_mbp

### Next runs
sudo -i
update_kernel_mbp

### Update to specific version of kernel
sudo -i
KERNEL_VERSION="5.18.6-f36" update_kernel_mbp

### Update to specific version of kernel using specific version of update script
#### Usually not needed, because scripts are shared between branches, but you can use it to update your update_kernel_mbp script
##### If the script fails, try to rerun it - it's due to self-upgrading feature of this script
sudo -i
KERNEL_VERSION="5.18.6-f36" UPDATE_SCRIPT_BRANCH="v5.18-f36" update_kernel_mbp

CI status

GitHub Actions kernel build status: Build Status

Github Actions kernel publish status - http://fedora-mbp-repo.herokuapp.com/ : Publish Status

TODO

  • add kernel-headers RPM generation
  • remove a need for update_kernel_mbp script
    • revert GRUB_ENABLE_BLSCFG=false change
  • add RPM packages signing

Known issues

  • TouchID - (@MCMrARM is working on it - https://github.com/Dunedan/mbp-2016-linux/issues/71#issuecomment-528545490)
  • Audio
    • Dynamic audio input/output change (on connecting/disconnecting headphones jack)
    • Microphone (it's recognized with new apple t2 sound driver, but there is a low mic volume amp)

Working with upstream stable kernel 5.18

  • Display/Screen
  • USB-C
  • Battery/AC
  • Ethernet/Video USB-C adapters
  • Bluetooth
  • NVMe
  • Camera

Working with mbp-fedora-kernel

  • with builtin BCE driver
    • Audio
    • Keyboard
    • Touchpad (scroll, right click)
  • with builtin iBridge driver
    • MacBook Pro Touch Bar
      • If there's an issue with Touch Bar startup on Linux I recommend to install Win10 and boot it once a while to initialize Touch Bar using BootCamp driver, it seems to fix the issue
  • WiFi

Not tested

  • eGPU
  • Thunderbolt

How to build mbp-fedora-kernel

  1. Make sure that Docker is installed and running correctly on your machine
  2. Clone repo
  3. Run ./build_in_docker.sh

Docs

Fedora

Github

Credits

  • @MCMrARM - thanks for all RE work
  • @ozbenh - thanks for submitting NVME patch
  • @roadrunner2 - thanks for SPI (touchbar) driver
  • @aunali1 - thanks for ArchLinux Kernel CI
  • @ppaulweber - thanks for keyboard and Macbook Air patches
  • @AdityaGarg8 - thanks for support and upkeeping kernel patches