Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/5.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosfad committed Oct 4, 2020
2 parents ec35606 + 3b37609 commit 3ec7c3e
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 923 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
# mbp-ubuntu-kernel

Ubuntu/Mint/Debian kernel 5.6+ with Apple T2 patches built-in. This repo try to keep up with kernel new releases. We release 2 alternative kernels: mbp for macbook pro 2018+ (16,1) and mbp-alt for older ones.
Ubuntu/Mint/Debian kernel 5.6+ with Apple T2 patches built-in. This repo try to keep up with kernel new releases.

Drivers:
We release 2 alternative kernels: **"mbp"** which includes all patches from [https://github.com/aunali1/linux-mbp-arch](Aunali1's linux mbp arch) which should work in mostly everywhere and an alternative release (**"mbp-alt"**) which do not include the patch 2001 (drm amd display force link-rate).

**!! Warning:**

Starting from the kernel 5.8 the release naming were switch with respect to kernel 5.7: Before the "mbp" release did not include all the patches. **Now the "mbp" includes all patches** and the "mbp-alt" don't.

**Drivers included:**

- Apple T2 (audio, keyboard, touchpad) - <https://github.com/MCMrARM/mbp2018-bridge-drv>
- Apple SMC - <https://github.com/MCMrARM/mbp2018-etc>
- Touchbar - <https://github.com/roadrunner2/macbook12-spi-driver/tree/mbp15>

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

IF YOU ENJOY THIS CODE, PLEASE CONSIDER CONTRIBUTING TO THE AUTHORS @MCMrARM @roadrunner2 @aunali1 @ppaulweber @mikeeq, they did all the hard work.
**If this repo helped you in any way, consider inviting a coffee to the people in the [credits](https://github.com/marcosfad/mbp-ubuntu-kernel#credits) or [me](https://paypal.me/marcosfad)**

## CI status

Expand All @@ -24,7 +30,7 @@ Travis kernel publish status - <http://mbp-ubuntu-kernel.herokuapp.com/> :

### The easy way

Use the [mbp-ubuntu](https://github.com/marcosfad/mbp-ubuntu/releases) live cd to install ubuntu on your Mac
Use the [mbp-ubuntu](https://github.com/marcosfad/mbp-ubuntu/releases) live cd to install ubuntu on your Mac.

### Manually

Expand Down
11 changes: 7 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eu -o pipefail

## Update docker image tag, because kernel build is using `uname -r` when defining package version variable
# KERNEL_VERSION=$(curl -s https://www.kernel.org | grep '<strong>' | head -3 | tail -1 | cut -d'>' -f3 | cut -d'<' -f1)
KERNEL_VERSION=5.7.19
KERNEL_VERSION=5.8.6
#KERNEL_REPOSITORY=git://kernel.ubuntu.com/virgin/linux-stable.git
KERNEL_REPOSITORY=https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
REPO_PATH=$(pwd)
Expand Down Expand Up @@ -63,6 +63,8 @@ echo >&2 "===]> Info: Applying patches... "
echo 'Patches directory not found!'
exit 1
}


while IFS= read -r file; do
echo "==> Adding $file"
patch -p1 <"$file"
Expand All @@ -83,7 +85,7 @@ make olddefconfig
echo "" >"${KERNEL_PATH}"/.scmversion

# Build Deb packages
make -j "$(getconf _NPROCESSORS_ONLN)" deb-pkg LOCALVERSION=-mbp KDEB_PKGVERSION="$(make kernelversion)-$(get_next_version mbp)"
make -j "$(getconf _NPROCESSORS_ONLN)" deb-pkg LOCALVERSION=-mbp KDEB_PKGVERSION="$(make kernelversion)-$(get_next_version mbp-alt)"

# Create alternative Kernel
echo >&2 "===]> Info: Create alternative kernel ... "
Expand All @@ -98,11 +100,12 @@ make olddefconfig
echo "" >"${KERNEL_PATH}"/.scmversion

# Build Deb packages
make -j "$(getconf _NPROCESSORS_ONLN)" deb-pkg LOCALVERSION=-mbp-alt KDEB_PKGVERSION="$(make kernelversion)-$(get_next_version mbp-alt)"
make -j "$(getconf _NPROCESSORS_ONLN)" deb-pkg LOCALVERSION=-mbp-alt KDEB_PKGVERSION="$(make kernelversion)-$(get_next_version mbp)"

#### Copy artifacts to shared volume
echo >&2 "===]> Info: Copying debs and calculating SHA256 ... "
#cp -rfv ../*.deb "${REPO_PATH}/"
#cp -rfv "${KERNEL_PATH}/.config" "${REPO_PATH}/kernel_config"
#cp -rfv "${KERNEL_PATH}/.config" "${REPO_PATH}/kernel_config_${KERNEL_VERSION}"
cp -rfv "${KERNEL_PATH}/.config" "/tmp/artifacts/kernel_config_${KERNEL_VERSION}"
cp -rfv ../*.deb /tmp/artifacts/
sha256sum ../*.deb >/tmp/artifacts/sha256
6 changes: 3 additions & 3 deletions patch_driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ BUILD_PATH=/tmp/build-kernel
### Apple T2 drivers commit hashes
# Patches
APPLE_SMC_DRIVER_GIT_URL=https://github.com/marcosfad/linux-mbp-arch.git
APPLE_SMC_DRIVER_BRANCH_NAME=master
APPLE_SMC_DRIVER_COMMIT_HASH=d36d088d767ac884066c99e92eae3504b6e06a4b
APPLE_SMC_DRIVER_BRANCH_NAME=feature/kernel-5.8
APPLE_SMC_DRIVER_COMMIT_HASH=13a0aff189d5c70a9b570e69cbf8b13b2887ba19
## BCE
#APPLE_BCE_DRIVER_GIT_URL=https://github.com/aunali1/mbp2018-bridge-drv.git
#APPLE_BCE_DRIVER_BRANCH_NAME=aur
Expand All @@ -31,7 +31,7 @@ git checkout ${APPLE_SMC_DRIVER_COMMIT_HASH}
while IFS= read -r file; do
echo "==> Adding ${file}"
cp -rfv "${file}" "${WORKING_PATH}"/patches/"${file##*/}"
done < <(find "${BUILD_PATH}/linux-mbp-arch" -type f -name "*.patch" | grep -E '[235]00[0-9]' | sort)
done < <(find "${BUILD_PATH}/linux-mbp-arch" -type f -name "*.patch" | grep -vE '000[0-9]' | sort)

#### Add custom drivers to kernel
#echo -e "From: \"Kernel Builder (sita)\" <[email protected]>\nSubject: patch custom drivers\n" >"${WORKING_PATH}/patches/custom-drivers.patch"
Expand Down
297 changes: 0 additions & 297 deletions patches/0005-configs-based-on-Ubuntu-5.7.0-6.7.patch

This file was deleted.

Loading

0 comments on commit 3ec7c3e

Please sign in to comment.