apple/t2: update to kernel 6.7.7
This commit is contained in:
parent
504ebfbffb
commit
17ad09c30c
|
@ -74,15 +74,6 @@ in
|
||||||
# Make sure post-resume.service exists
|
# Make sure post-resume.service exists
|
||||||
powerManagement.enable = true;
|
powerManagement.enable = true;
|
||||||
|
|
||||||
systemd.services.fix-keyboard-backlight-and-touchbar = {
|
|
||||||
path = [ pkgs.kmod ];
|
|
||||||
serviceConfig.ExecStart = ''${pkgs.systemd}/bin/systemd-inhibit --what=sleep --why="fixing keyboard backlight and touchbar must finish before sleep" --mode=delay ${./fix-keyboard-backlight-and-touchbar.sh}'';
|
|
||||||
serviceConfig.Type = "oneshot";
|
|
||||||
description = "reload touchbar driver and restart upower";
|
|
||||||
wantedBy = [ "display-manager.service" "post-resume.target" ];
|
|
||||||
after = [ "post-resume.target" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Activation script to install apple-set-os-loader in order to unlock the iGPU
|
# Activation script to install apple-set-os-loader in order to unlock the iGPU
|
||||||
system.activationScripts.appleSetOsLoader = lib.optionalString t2Cfg.enableAppleSetOsLoader ''
|
system.activationScripts.appleSetOsLoader = lib.optionalString t2Cfg.enableAppleSetOsLoader ''
|
||||||
if [[ -e /boot/efi/efi/boot/bootx64_original.efi ]]; then
|
if [[ -e /boot/efi/efi/boot/bootx64_original.efi ]]; then
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -eux
|
|
||||||
|
|
||||||
unload () {
|
|
||||||
if modprobe -r "$1" 2>&1;
|
|
||||||
then echo ok
|
|
||||||
else echo fail
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
wait_unload() {
|
|
||||||
while sleep 1; do
|
|
||||||
output="$(unload "$1")"
|
|
||||||
case "$output" in
|
|
||||||
*is\ in\ use*) :;;
|
|
||||||
*ok*) return 0;;
|
|
||||||
*) echo "modprobe said: $output"; echo giving up; return 1;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
wait_unload apple_touchbar
|
|
||||||
modprobe apple_touchbar
|
|
||||||
|
|
||||||
# After suspend, the inode for the backlight device has changed. This service
|
|
||||||
# simply restarts upower to inform it of that change.
|
|
||||||
systemctl restart upower.service
|
|
|
@ -5,11 +5,11 @@ let
|
||||||
patchRepo = fetchFromGitHub {
|
patchRepo = fetchFromGitHub {
|
||||||
owner = "t2linux";
|
owner = "t2linux";
|
||||||
repo = "linux-t2-patches";
|
repo = "linux-t2-patches";
|
||||||
rev = "46dd873d1d9d12b26916790045008a91a95d0c11";
|
rev = "7cd298e227e95bac9a704ffc8f5ff5e89a1bf4d7";
|
||||||
hash = "sha256-YGUGuzsAJFtZYjIW9d2XU4eGKNvMKCaWXqgqJn5TdeY=";
|
hash = "sha256-Oi3CwQl0IwdVc9w+pbmJjBnyqwLFhbqFwxs5o0mqtbE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
version = "6.5";
|
version = "6.7.7";
|
||||||
majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0);
|
majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0);
|
||||||
in
|
in
|
||||||
buildLinux (args // {
|
buildLinux (args // {
|
||||||
|
@ -22,7 +22,7 @@ buildLinux (args // {
|
||||||
src = runCommand "patched-source" {} ''
|
src = runCommand "patched-source" {} ''
|
||||||
cp -r ${fetchzip {
|
cp -r ${fetchzip {
|
||||||
url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz";
|
url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz";
|
||||||
hash = "sha256-qJmVSju69WcvDIbgrbtMyCi+OXUNTzNX2G+/0zwsPR4=";
|
hash = "sha256-j+Ufl6C1Mqjthk18GPt2e7j+i7viauOgNnVy9dJSgaM=";
|
||||||
}} $out
|
}} $out
|
||||||
chmod -R u+w $out
|
chmod -R u+w $out
|
||||||
cd $out
|
cd $out
|
||||||
|
@ -40,10 +40,11 @@ buildLinux (args // {
|
||||||
BT_HCIBCM4377 = module;
|
BT_HCIBCM4377 = module;
|
||||||
BT_HCIUART_BCM = yes;
|
BT_HCIUART_BCM = yes;
|
||||||
BT_HCIUART = module;
|
BT_HCIUART = module;
|
||||||
HID_APPLE_IBRIDGE = module;
|
HID_APPLETB_BL = module;
|
||||||
|
HID_APPLETB_KBD = module;
|
||||||
HID_APPLE = module;
|
HID_APPLE = module;
|
||||||
|
DRM_APPLETBDRM = module;
|
||||||
HID_APPLE_MAGIC_BACKLIGHT = module;
|
HID_APPLE_MAGIC_BACKLIGHT = module;
|
||||||
HID_APPLE_TOUCHBAR = module;
|
|
||||||
HID_SENSOR_ALS = module;
|
HID_SENSOR_ALS = module;
|
||||||
SND_PCM = module;
|
SND_PCM = module;
|
||||||
STAGING = yes;
|
STAGING = yes;
|
||||||
|
|
Loading…
Reference in a new issue