surface/kernel: 5.13.4 -> 5.16.11

This commit is contained in:
kiana-S 2022-01-24 22:41:12 -05:00 committed by Jörg Thalheim
parent c3c66f6db4
commit 3e4d52da0a
No known key found for this signature in database
5 changed files with 92 additions and 159 deletions

View file

@ -1,5 +1,5 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
boot.kernelPackages = pkgs.callPackage ./linux-5.13.4 { }; boot.kernelPackages = pkgs.callPackage ./linux-5.16.11.nix { };
} }

View file

@ -1,126 +0,0 @@
{ config, lib, pkgs, ... }:
let
repos = (pkgs.callPackage ../../repos.nix { });
patches = repos.linux-surface + "/patches";
surface_kernelPatches = [
{
name = "microsoft-surface-patches-linux-5.13.4";
patch = null;
structuredExtraConfig = with lib.kernel; {
#
# Surface Aggregator Module
#
SURFACE_AGGREGATOR = module;
SURFACE_AGGREGATOR_ERROR_INJECTION = no;
SURFACE_AGGREGATOR_BUS = yes;
SURFACE_AGGREGATOR_CDEV = module;
SURFACE_AGGREGATOR_REGISTRY = module;
SURFACE_ACPI_NOTIFY = module;
SURFACE_DTX = module;
SURFACE_PLATFORM_PROFILE = module;
SURFACE_HID = module;
SURFACE_KBD = module;
BATTERY_SURFACE = module;
CHARGER_SURFACE = module;
#
# Surface laptop 1 keyboard
#
SERIAL_DEV_BUS = yes;
SERIAL_DEV_CTRL_TTYPORT = yes;
#
# Surface Hotplug
#
SURFACE_HOTPLUG = module;
#
# IPTS touchscreen
#
# This only enables the user interface for IPTS data.
# For the touchscreen to work, you need to install iptsd.
#
MISC_IPTS = module;
#
# Cameras: IPU3
#
VIDEO_IPU3_IMGU = module;
VIDEO_IPU3_CIO2 = module;
CIO2_BRIDGE = yes;
INTEL_SKL_INT3472 = module;
#
# Cameras: Sensor drivers
#
VIDEO_OV5693 = module;
VIDEO_OV8865 = module;
#
# ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7
#
APDS9960 = module;
#
# Other Drivers
#
INPUT_SOC_BUTTON_ARRAY = module;
SURFACE_3_BUTTON = module;
SURFACE_3_POWER_OPREGION = module;
SURFACE_PRO3_BUTTON = module;
SURFACE_GPE = module;
SURFACE_BOOK1_DGPU_SWITCH = module;
};
}
{
name = "ms-surface/0001-surface3-oemb";
patch = patches + "/5.13/0001-surface3-oemb.patch";
}
{
name = "ms-surface/0002-mwifiex";
patch = patches + "/5.13/0002-mwifiex.patch";
}
{
name = "ms-surface/0003-ath10k";
patch = patches + "/5.13/0003-ath10k.patch";
}
{
name = "ms-surface/0004-ipts";
patch = patches + "/5.13/0004-ipts.patch";
}
{
name = "ms-surface/0005-surface-sam-over-hid";
patch = patches + "/5.13/0005-surface-sam-over-hid.patch";
}
{
name = "ms-surface/0006-surface-sam";
patch = patches + "/5.13/0006-surface-sam.patch";
}
{
name = "ms-surface/0007-surface-hotplug";
patch = patches + "/5.13/0007-surface-hotplug.patch";
}
{
name = "ms-surface/0008-surface-typecover";
patch = patches + "/5.13/0008-surface-typecover.patch";
}
{
name = "ms-surface/0009-cameras";
patch = patches + "/5.13/0009-cameras.patch";
}
{
name = "ms-surface/0010-amd-gpio";
patch = patches + "/5.13/0010-amd-gpio.patch";
}
{
name = "ms-surface/0011-amd-s0ix";
patch = patches + "/5.13/0011-amd-s0ix.patch";
}
];
in (with pkgs;
recurseIntoAttrs (linuxPackagesFor (callPackage ./linux-5.13.4.nix {
kernelPatches = surface_kernelPatches;
})))

View file

@ -1,22 +0,0 @@
{ lib, stdenv, buildPackages, fetchurl, perl, buildLinux
, modDirVersionArg ? null, ... }@args:
with lib;
buildLinux (args // rec {
version = "5.13.4";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then
concatStringsSep "." (take 3 (splitVersion "${version}.0"))
else
modDirVersionArg;
# branchVersion needs to be x.y
extraMeta.branch = versions.majorMinor version;
src = fetchurl {
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
sha256 = "7192cd2f654aa6083451dea01b80748fe1eebcf2476a589ef4146590030e7d6c";
};
} // (args.argsOverride or { }))

View file

@ -0,0 +1,87 @@
{ lib, callPackage, linuxPackagesFor, ... }:
# To test the kernel build:
# nix-build -E "with import <nixpkgs> {}; (pkgs.callPackage ./linux-5.16.11.nix {}).kernel"
let
repos = callPackage ../repos.nix {};
linuxPkg = { fetchurl, buildLinux, ... }@args:
buildLinux (args // rec {
version = "5.16.11";
modDirVersion = version;
extraMeta.branch = "5.16";
src = repos.linux-surface-kernel;
kernelPatches = [{
name = "microsoft-surface-patches-linux-5.16.2";
patch = null;
structuredExtraConfig = with lib.kernel; {
#
# Surface Aggregator Module
#
SURFACE_AGGREGATOR = module;
SURFACE_AGGREGATOR_ERROR_INJECTION = no;
SURFACE_AGGREGATOR_BUS = yes;
SURFACE_AGGREGATOR_CDEV = module;
SURFACE_AGGREGATOR_REGISTRY = module;
SURFACE_ACPI_NOTIFY = module;
SURFACE_DTX = module;
SURFACE_PLATFORM_PROFILE = module;
SURFACE_HID = module;
SURFACE_KBD = module;
BATTERY_SURFACE = module;
CHARGER_SURFACE = module;
#
# Surface laptop 1 keyboard
#
SERIAL_DEV_BUS = yes;
SERIAL_DEV_CTRL_TTYPORT = yes;
#
# Surface Hotplug
#
SURFACE_HOTPLUG = module;
#
# IPTS touchscreen
#
# This only enables the user interface for IPTS data.
# For the touchscreen to work, you need to install iptsd.
#
MISC_IPTS = module;
#
# Cameras: IPU3
#
VIDEO_IPU3_IMGU = module;
VIDEO_IPU3_CIO2 = module;
CIO2_BRIDGE = yes;
INTEL_SKL_INT3472 = module;
#
# Cameras: Sensor drivers
#
VIDEO_OV5693 = module;
VIDEO_OV8865 = module;
#
# ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7
#
APDS9960 = module;
#
# Other Drivers
#
INPUT_SOC_BUTTON_ARRAY = module;
SURFACE_3_BUTTON = module;
SURFACE_3_POWER_OPREGION = module;
SURFACE_PRO3_BUTTON = module;
SURFACE_GPE = module;
SURFACE_BOOK1_DGPU_SWITCH = module;
};
}];
} // (args.argsOverride or {}));
in lib.recurseIntoAttrs (linuxPackagesFor (callPackage linuxPkg {}))

View file

@ -1,9 +1,9 @@
{ lib, pkgs, fetchFromGitHub, fetchurl }: { { lib, pkgs, fetchFromGitHub, fetchurl }: {
linux-surface = fetchFromGitHub { linux-surface-kernel = fetchFromGitHub {
owner = "linux-surface"; owner = "linux-surface";
repo = "linux-surface"; repo = "kernel";
rev = "4130746c31606aebaccef58997b650beda9049f7"; rev = "db94c89f56d6ceae03ca3802e11197f48e6c539f";
sha256 = "0r74z0hj3rg8bn2arh2zj8p7awk7fi14gpyrs5h44lwxw4351xky"; sha256 = "0c58ri0i9gdb4w7l361pnkvq6ap17kmgnxngh0bcdmgn4dc88wx2";
}; };
ath10k-firmware = fetchFromGitHub { ath10k-firmware = fetchFromGitHub {
@ -13,12 +13,6 @@
sha256 = "16a67baxlga8vb43zbby2s7kpp4488vczg3manmr9g3wxnhhb9n3"; sha256 = "16a67baxlga8vb43zbby2s7kpp4488vczg3manmr9g3wxnhhb9n3";
}; };
surface-go-ath10k-firmware_upstream = fetchurl {
url = "https://support.killernetworking.com/K1535_Debian/board.bin";
# url="https://www.killernetworking.com/support/K1535_Debian/board.bin";
sha256 = "0l8wfj8z4jbb31nzqkaxisby0n6061ix01c5di9bq66iby59j8py";
};
surface-go-ath10k-firmware_backup = fetchFromGitHub { surface-go-ath10k-firmware_backup = fetchFromGitHub {
owner = "mexisme"; owner = "mexisme";
repo = "linux-surface_ath10k-firmware"; repo = "linux-surface_ath10k-firmware";