From db63ed890f7342ea0c0a434b47830cbf8b973b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 12 Dec 2023 11:10:33 +0100 Subject: [PATCH] upgrade zfs on aarch64 --- nix/installer.nix | 5 ++++- nix/noninteractive.nix | 13 ++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/nix/installer.nix b/nix/installer.nix index 10274f1..8ed8989 100644 --- a/nix/installer.nix +++ b/nix/installer.nix @@ -3,7 +3,10 @@ system.stateVersion = config.system.nixos.version; # use latest kernel we can support to get more hardware support - boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; + boot.kernelPackages = lib.mkDefault (pkgs.zfs.override { + removeLinuxDRM = pkgs.hostPlatform.isAarch64; + }).latestCompatibleLinuxPackages; + boot.zfs.removeLinuxDRM = lib.mkDefault pkgs.hostPlatform.isAarch64; # IPMI SOL console redirection stuff boot.kernelParams = diff --git a/nix/noninteractive.nix b/nix/noninteractive.nix index ad95b58..d775beb 100644 --- a/nix/noninteractive.nix +++ b/nix/noninteractive.nix @@ -50,9 +50,20 @@ "dm-raid" ]; extraModulePackages = [ - config.boot.kernelPackages.zfs + (config.boot.kernelPackages.zfs.override { + inherit (config.boot.zfs) removeLinuxDRM; + }) ]; }; + boot.kernelPatches = lib.optional (config.boot.zfs.removeLinuxDRM && pkgs.stdenv.hostPlatform.system == "aarch64-linux") { + name = "export-neon-symbols-as-gpl"; + patch = pkgs.fetchpatch { + url = "https://github.com/torvalds/linux/commit/aaeca98456431a8d9382ecf48ac4843e252c07b3.patch"; + hash = "sha256-L2g4G1tlWPIi/QRckMuHDcdWBcKpObSWSRTvbHRIwIk="; + revert = true; + }; + }; + networking.hostId = lib.mkDefault "8425e349"; }