diff options
author | aszlig <aszlig@redmoonstudios.org> | 2016-02-23 11:43:01 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2016-02-23 11:43:01 +0100 |
commit | 1cc76f5b17353f1f1aceb6c1f79d7a250a8c8d63 (patch) | |
tree | acc60e7a6915de286b38a8f21aeca451fc5fe276 /modules/hardware/t100ha/default.nix | |
parent | 3f8a602aeacc03e94bb163f8586b8a831861cb88 (diff) |
hardware/t100ha: Add custom kernel + patches
The custom kernel has built in modules for the MMC storage and a small patch which is essentially diff of the merge of the "drm-intel-fixes" branch from git://anongit.freedesktop.org/drm-intel against 4.5-rc5. This is the HEAD of what I have merged: https://cgit.freedesktop.org/drm-intel/commit/?h=drm-intel-fixes&id=9b18572e83bfd5378b3fcff3acf123f7bddf558a Eventually these fixes will hit mainline so we can drop them very soon. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'modules/hardware/t100ha/default.nix')
-rw-r--r-- | modules/hardware/t100ha/default.nix | 44 |
1 files changed, 38 insertions, 6 deletions
diff --git a/modules/hardware/t100ha/default.nix b/modules/hardware/t100ha/default.nix index f0beea65..c55a1acc 100644 --- a/modules/hardware/t100ha/default.nix +++ b/modules/hardware/t100ha/default.nix @@ -8,13 +8,45 @@ in { options.vuizvui.hardware.t100ha.enable = lib.mkEnableOption desc; config = lib.mkIf cfg.enable { - # Needed for booting from MMC: - boot.initrd.availableKernelModules = [ - "xhci_pci" "sdhci_acpi" "mmc_block" - ]; + # It's a CherryTrail SoC, so we want to have the latest and greatest with a + # few additional patches: + boot.kernelPackages = let + nixpkgs = import ../../../nixpkgs-path.nix; + mkKernel = import "${nixpkgs}/pkgs/os-specific/linux/kernel/generic.nix"; + t100haKernel = mkKernel rec { + version = "4.5-rc5"; + modDirVersion = "4.5.0-rc5"; + extraMeta.branch = "4.5"; - # It's a CherryTrail SoC, so we want to have the latest and greatest: - boot.kernelPackages = pkgs.linuxPackages_latest; + src = pkgs.fetchurl { + url = "mirror://kernel/linux/kernel/v4.x/testing/" + + "linux-${version}.tar.xz"; + sha256 = "06qlypnrlkckxhf3clq6l2d3kps7rwfw811sxapjbnhzjd75fcx8"; + }; + + kernelPatches = lib.singleton { + name = "drm-fixes.patch"; + patch = ./drm-fixes.patch; + }; + + extraConfig = '' + MMC y + MMC_BLOCK y + MMC_SDHCI y + MMC_SDHCI_ACPI y + PINCTRL_CHERRYVIEW y + ''; + + features.iwlwifi = true; + features.efiBootStub = true; + features.needsCifsUtils = true; + features.canDisableNetfilterConntrackHelpers = true; + features.netfilterRPFilter = true; + + inherit (pkgs) stdenv perl buildLinux; + }; + self = pkgs.linuxPackagesFor t100haKernel self; + in self; # By default the console is rotated by 90 degrees to the right. boot.kernelParams = [ "fbcon=rotate:3" ]; |