AdityaGarg8 / T2-Mojave-Ubuntu-Kernel

Ubuntu/Debian kernel for T2 Macs with WiFi support for macOS Mojave WiFi Firmware. For Kernels with support for macOS Big Sur WiFi Firmware, go to https://github.com/AdityaGarg8/T2-Big-Sur-Ubuntu-Kernel.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

T2 Mojave Ubuntu Kernel

Ubuntu/Mint/Debian kernel with Apple T2 patches built-in. This repo will try to keep up with kernel new releases.

Build Kernel Package

This project is closely inspired by mikeeq/mbp-fedora-kernel and marcosfad/mbp-ubuntu-kernel. Thank you @mikeeq and @marcosfad for the scripts and setup.

Special thanks to @Redecorating who edited the scripts for Mojave firmware and also provided the CI.

If this repo helped you in any way, consider inviting a coffee to the people in the credits.

Pre installation steps

In case you have used an iso with kernel version 5.8.x or lower, then follow the DKMS Guide to uninstall old drivers and get new drivers for the kernels. It is required only once and must be done before installing a kernel from here.

INSTALLATION

The easy way

Download the .deb packages of linux-headers and linux-image of the kernel you wish to install from the releases section.

Install linux-headers first and then linux-image using apt and restart your Mac. In case you do not know how to do so, follow the instructions given below. Else you are good to go.

On terminal, type sudo apt install and then drag and drop the linux-headers file to the terminal and press enter/return key.

Do the similar process for linux-images package.

Restart your Mac.

Building yourself

Clone the repo using

git clone https://github.com/AdityaGarg8/T2-Mojave-Ubuntu-Kernel

Open this repo in your browser.

Check out the kernel version it is offering right now.

Now edit build.sh file in T2-Mojave-Ubuntu-Kernel folder of your home directory. Replace the kernel version given in KERNEL_VERSION by the one on the above repo.

Now edit patch_driver.sh file in the same folder. Replace the commit hash in APPLE_SMC_DRIVER_COMMIT_HASH with the latest one in the above repo. It can be found by click on the shortened hash or time elapsed since last update on the right of "AdityaGarg8".

Now open a terminal window and run

cd T2-Mojave-Ubuntu-Kernel
sudo ./build.sh

The kernel shall take around an hour to compile. After that you shall find three .deb packages in /root/work.

Install the linux-headers package first using apt. In case you do not know how to do so, follow the instructions described in the above The easy way section. Similarly install the linux-image package too.

Restart your Mac.

You may then delete the /root/work directory using sudo rm -r /root/work to free up space.

Docs

Ubuntu

Credits

  • @Redecorating - thanks for editing the scripts and CI for Ubuntu
  • @marcosfad - thanks for the original script for Ubuntu
  • @MCMrARM - thanks for all RE work
  • @ozbenh - thanks for submitting NVME patch
  • @roadrunner2 - thanks for SPI (touchbar) driver
  • @aunali1 - thanks for ArchLinux Kernel CI and active support
  • @jamlam - thanks for providing the Correlium wifi patch
  • @ppaulweber - thanks for keyboard and Macbook Air patches
  • @mikeeq - thanks for the fedora kernel project and compilation scripts

About

Ubuntu/Debian kernel for T2 Macs with WiFi support for macOS Mojave WiFi Firmware. For Kernels with support for macOS Big Sur WiFi Firmware, go to https://github.com/AdityaGarg8/T2-Big-Sur-Ubuntu-Kernel.


Languages

Language:Shell 75.0%Language:Dockerfile 25.0%