Skip to content

Commit

Permalink
Fedora Linux v5.13.5 - mbp16 (#28)
Browse files Browse the repository at this point in the history
* Add provision script

* Squashed commit of the following:

commit f40b3ea
Author: mikeeq <miotk.mikolaj@gmail.com>
Date:   Tue Jun 22 18:16:35 2021 +0200

    Add shim packages to yum repo - x86_64

commit e7dae36
Author: mikeeq <miotk.mikolaj@gmail.com>
Date:   Tue Jun 22 18:15:35 2021 +0200

    Add shim packages to yum repo

commit 02a37aa
Author: mikeeq <miotk.mikolaj@gmail.com>
Date:   Tue Jun 22 12:49:17 2021 +0200

    Add grub2 packages to yum repo v2

commit 68c9746
Author: mikeeq <miotk.mikolaj@gmail.com>
Date:   Tue Jun 22 12:47:10 2021 +0200

    Add grub2 packages to yum repo

commit d6f1024
Author: Mikołaj Miotk <miotk.mikolaj@gmail.com>
Date:   Mon Jun 21 15:46:24 2021 +0200

    Merge to master (#24)

    * Fedora Linux v5.4.14

    * Add @aunali1 wifi patches for dynamic rambase address changing

    * Fedora Linux v5.4.17

    * Fedora Linux v5.4.19

    * MBP16 devices Addition - merging @jamlam fork (#5)

    * Add MBP16 devices

    * Update touchpad.patch

    * Formatting

    * Add mbp16 devices

    * Add mbp16 devices

    Co-authored-by: jamlam <jamesl@mbert.onmicrosoft.com>

    * Add lint job + fixes to @jamlam patches

    * CI Pipeline fixes

    * Added script for updating kernel on already installed mbp-fedora

    * Refresh discord invite and add wifi firmware link to README

    * Add installation of module compilation dependency to update_kernel_mbp.sh

    * Fedora Linux v5.5.5 (#6)

    * Fedora Linux v5.5.5

    * @aunali1 applesmc patches

    * Removing duplicated ci runs whenever pr is created

    * Add @aunali1 BT (ACPI) fix

    * Fedora Linux v5.5.6

    * New BT patch from @aunali1

    * Fedora Linux v5.5.7

    * [fix] update_kernel_mbp.sh - proper skipping macos boot option creation in grub

    * Add more information about WiFi issues

    * Feature/5.6.5 (#9)

    * Fedora Linux v5.6

    * Change branch to master

    * Commenting bt patch for other patches testing

    * Removing rambase patch for other patches testing

    * Bump to v5.6-rc7

    * Wifi.patch fix

    * Wifi.patch fix v2

    * Wifi.patch fix v3

    * Wifi.patch fix v4

    * Update script - RC download function

    * Update script - RC download function v2

    * Fedora Linux v5.6.4

    * Fedora Linux v5.6.5

    * Update readme

    * Change default branch for update script

    * Fedora Linux v5.6.6

    * Fix devm_led_classdev_register call (#10)

    You need to include leds.h as you call one of its methods.
    [hid-apple-mod.patch]

    * Revert "Fix devm_led_classdev_register call (#10)" (#11)

    This reverts commit 9782b82.

    * Fedora Linux v5.6.7

    * Fedora Linux v5.6.8

    * Fedora Linux v5.6.8 f32

    * Fedora Linux v5.6.11

    * Fedora Linux v5.6.13 + @aunali1 DP patch

    * Fedora Linux v5.6.15

    * [drone-CI] Fix linting job

    * Fedora Linux v5.6.19

    * Fedora Linux v5.6.19 v2

    * update_kernel_mbp.sh - dracut warning fix

    * update_kernel_mbp.sh - dracut warning fix v2

    * Fedora Linux v5.7 init (#15)

    * Fedora Linux v5.7 init

    * Test build without wifi.patch

    * Port wifi.patch

    * Port wifi.patch v2

    * Switch default branch for update_kernel_mbp sh

    * update_kernel_mbp.sh linting fix

    * Fedora Linux v5.7.7

    * Fedora Linux v5.7.8

    * Fedora Linux v5.7.12

    * README: Replace wifi instructions with link to t2linux wiki (#20)

    * Feature/v5.12 f34 (#23)

    * Initial commit v5.11-F34

    * update fedora images

    * update script

    * update script v2

    * 5.11.16

    * 5.11.16 libbpf

    * 5.11.16 libbpf v2

    * 5.11.16 libbpf v3

    * 5.11.16 test f34

    * 5.11.16 test f33

    * Update to 5.11.20

    * Update to 5.11.20 v2

    * Update to 5.11.20 v3

    * Test mbp15 wifi patch

    * revert mbp16 patch

    * Bump fedora kernel v2

    * Fedora kernel 5.12.8

    * Update kernel script

    * Add kernel patching fix

    * Add kernel patching fix v2

    * Test building on f34

    * Test building on f34 v2

    * Add kernel patching fix v3

    * Test build without wifi patch

    * Test build without wifi patch v2

    * Test build without wifi patch v3

    * Test building on f34 v3

    * Test building on f34 5.11.6

    * Bring f33 back

    * Test building on f34 5.12.7

    * Test building on f34 5.12.8

    * Test building on f34 5.12.11

    * test build with wifi patch 5.12.11

    * test build with wifi patch 5.12.8

    * test build with wifi patch 5.12.6

    * test build with wifi patch 5.12.5

    * test build with wifi patch 5.11.21

    * applesmc to 5.11

    * remove i915 patches

    * check 5.12.11 build with patch command F2

    * 5.12.11-mbp15

    * Fix linting

    * Fix linting v2

    Co-authored-by: jamlam <jamesl@mbert.onmicrosoft.com>
    Co-authored-by: marcosfad <60006035+marcosfad@users.noreply.github.com>
    Co-authored-by: Jakob-Niklas See <github@nwex.de>

* Remove grub2 packages

* Add some dependencies

* Add some outputs

* Remove commented code

* Remove commented code v2

* Remove commented code v3

* Fedora Linux v5.13.5 - init

* Update readme

* Update readme v2

* Update readme v3

* Skip aunalis x86 patches

* Change patch fuzz lines to 4

* Check jamlam patches

* Check jamlam patches v2

* Check jamlam patches v3

* Fix branches

* Add some info to readme
  • Loading branch information
mikeeq committed Jul 29, 2021
1 parent ac8b7da commit 3390174
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 14 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,26 @@ Drivers:

## How to update kernel-mbp

```
```bash
### First run
sudo -i
curl -L https://raw.githubusercontent.com/mikeeq/mbp-fedora-kernel/v5.12-f34/update_kernel_mbp.sh -o /usr/bin/update_kernel_mbp
curl -L https://raw.githubusercontent.com/mikeeq/mbp-fedora-kernel/v5.13-f34-mbp16/update_kernel_mbp.sh -o /usr/bin/update_kernel_mbp
chmod +x /usr/bin/update_kernel_mbp
update_kernel_mbp

### Next ones
sudo -i
update_kernel_mbp

### Update to specific version
#mbp 15,1/15,2
sudo -i
KERNEL_VERSION="5.11.20-f34-mbp15" update_kernel_mbp

### Update to specific version using specific version of update script (usually don't needed, because scripts are shared between branches)
#mbp 16,1/16,2 (differs in wifi patch)
sudo -i
KERNEL_VERSION="5.11.20-f34-mbp16" UPDATE_SCRIPT_BRANCH="v5.13-f34-mbp16" update_kernel_mbp
```

## CI status
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eu -o pipefail

## Update fedora docker image tag, because kernel build is using `uname -r` when defining package version variable
RPMBUILD_PATH=/root/rpmbuild
FEDORA_KERNEL_VERSION=5.12.11-300.fc34 # https://bodhi.fedoraproject.org/updates/?search=&packages=kernel&releases=F34
FEDORA_KERNEL_VERSION=5.13.5-200.fc34 # https://bodhi.fedoraproject.org/updates/?search=&packages=kernel&releases=F34
REPO_PWD=$(pwd)

### Debug commands
Expand Down
17 changes: 7 additions & 10 deletions patch_driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ set -eu -o pipefail
# set -x

### Apple T2 drivers commit hashes
APPLE_SMC_DRIVER_GIT_URL=https://github.com/aunali1/linux-mbp-arch
APPLE_SMC_DRIVER_BRANCH_NAME=master
APPLE_SMC_DRIVER_COMMIT_HASH=199a1512d80e228587852d5789e083cec281f223
APPLE_WIFI_BIGSUR_PATCH_GIT_COMMIT_HASH=dd219cf1626bf61a91ce61377a27052562ba930e # https://github.com/jamlam/mbp-16.1-linux-wifi
APPLE_WIFI_BIGSUR_PATCH_GIT_URL=https://raw.githubusercontent.com/jamlam/mbp-16.1-linux-wifi/${APPLE_WIFI_BIGSUR_PATCH_GIT_COMMIT_HASH}/wifi-bigsur.patch
APPLE_SMC_DRIVER_GIT_URL=https://github.com/jamlam/mbp-16.1-linux-wifi
APPLE_SMC_REPO_NAME=mbp-16.1-linux-wifi
APPLE_SMC_DRIVER_BRANCH_NAME=main
APPLE_SMC_DRIVER_COMMIT_HASH=46e4665e286862d76d29701a334515a77734c58f

# TMP_DIR=~/temp_dir
TMP_DIR=/tmp/temp_dir
REPO_PWD=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
Expand All @@ -22,15 +22,12 @@ mkdir -p "${PATCHES_DIR}"

### AppleSMC and BT aunali fixes
git clone --single-branch --branch ${APPLE_SMC_DRIVER_BRANCH_NAME} ${APPLE_SMC_DRIVER_GIT_URL}
cd linux-mbp-arch || exit
cd "${APPLE_SMC_REPO_NAME}" || exit
git checkout ${APPLE_SMC_DRIVER_COMMIT_HASH}
cd ..
while IFS= read -r file; do
echo "adding ${file}"
cp -rfv "${file}" "${PATCHES_DIR}"/"${file##*/}"
done < <(find linux-mbp-arch -type f -name "*patch" | grep -v iwlwifi | grep -v brcmfmac | grep -v i915 | grep -v ZEN | sort)

### WiFi 16.2 Patch
curl -sL "${APPLE_WIFI_BIGSUR_PATCH_GIT_URL}" -o "${PATCHES_DIR}"/wifi-bigsur.patch
done < <(find "${APPLE_SMC_REPO_NAME}" -type f -name "*patch" | grep -v ZEN | sort)

rm -rf "${TMP_DIR}"
7 changes: 6 additions & 1 deletion update_kernel_mbp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -eu -o pipefail
### Apple T2 drivers commit hashes
KERNEL_PATCH_PATH=/tmp/kernel_patch

UPDATE_SCRIPT_BRANCH=${UPDATE_SCRIPT_BRANCH:-v5.12-f34}
UPDATE_SCRIPT_BRANCH=${UPDATE_SCRIPT_BRANCH:-v5.13-f34-mbp16}
MBP_FEDORA_BRANCH=f34
BCE_DRIVER_GIT_URL=https://github.com/t2linux/apple-bce-drv
BCE_DRIVER_BRANCH_NAME=aur
Expand Down Expand Up @@ -111,6 +111,11 @@ echo >&2 "===]> Info: Rebuilding initramfs with custom drivers... ";
depmod -a "${KERNEL_FULL_VERSION}"
dracut -f /boot/initramfs-"${KERNEL_FULL_VERSION}".img "${KERNEL_FULL_VERSION}"

### Suspend fix
echo >&2 "===]> Info: Adding suspend fix... ";
curl -L https://raw.githubusercontent.com/mikeeq/mbp-fedora/${MBP_FEDORA_BRANCH}/files/suspend/rmmod_tb.sh -o /lib/systemd/system-sleep/rmmod_tb.sh
chmod +x /lib/systemd/system-sleep/rmmod_tb.sh

### Grub
echo >&2 "===]> Info: Rebuilding GRUB config... ";
curl -L https://raw.githubusercontent.com/mikeeq/mbp-fedora/${MBP_FEDORA_BRANCH}/files/grub/30_os-prober -o /etc/grub.d/30_os-prober
Expand Down

0 comments on commit 3390174

Please sign in to comment.