diff --git a/README.md b/README.md index 31238c3..49b7213 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/build.sh b/build.sh index 07ce9c1..4892a49 100755 --- a/build.sh +++ b/build.sh @@ -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 diff --git a/patch_driver.sh b/patch_driver.sh index c4d2698..e2f9868 100755 --- a/patch_driver.sh +++ b/patch_driver.sh @@ -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) @@ -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}" diff --git a/update_kernel_mbp.sh b/update_kernel_mbp.sh index 87bcdeb..3a60fe9 100755 --- a/update_kernel_mbp.sh +++ b/update_kernel_mbp.sh @@ -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 @@ -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