diff options
author | Adam Joseph <adam@westernsemico.com> | 2022-09-23 14:23:31 -0700 |
---|---|---|
committer | Rick van Schijndel <Mindavi@users.noreply.github.com> | 2023-01-06 15:59:38 +0100 |
commit | 88e32095e196a3baee6189bb87024a60b03072e5 (patch) | |
tree | 89d418c0356905f0d27adbe627a13267b4db9637 /pkgs/os-specific | |
parent | 61ca853b1ebd83022155dbfba2f33ce3d41f22d7 (diff) |
linux/kernel: backport symbol GPLification fix from 5.19
Linux has a few PowerPC-specific symbols which are marked as GPL exports; these symbols wound up being exposed in Linux 5.12 and are needed by OpenZFS. The symbol licensing was fixed in mainline 5.19; this commit backports the fix to all previous affected kernels. This commit is required in order to build the NixOS ISO for PowerPC64.
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r-- | pkgs/os-specific/linux/kernel/manual-config.nix | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 45281d5d3bdb4..310178b9a1fd3 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -1,5 +1,6 @@ { lib, stdenv, buildPackages, runCommand, nettools, bc, bison, flex, perl, rsync, gmp, libmpc, mpfr, openssl , libelf, cpio, elfutils, zstd, python3Minimal, zlib, pahole +, fetchpatch }: let @@ -103,7 +104,17 @@ let ++ optional (lib.versionOlder version "5.19") ./randstruct-provide-seed.patch ++ optional (lib.versionAtLeast version "5.19") ./randstruct-provide-seed-5.19.patch # Fixes determinism by normalizing metadata for the archive of kheaders - ++ optional (lib.versionAtLeast version "5.2" && lib.versionOlder version "5.4") ./gen-kheaders-metadata.patch; + ++ optional (lib.versionAtLeast version "5.2" && lib.versionOlder version "5.4") ./gen-kheaders-metadata.patch + # Linux 5.12 marked certain PowerPC-only symbols as GPL, which breaks + # OpenZFS; this was fixed in Linux 5.19 so we backport the fix + # https://github.com/openzfs/zfs/pull/13367 + ++ optional (lib.versionAtLeast version "5.12" && + lib.versionOlder version "5.19" && + stdenv.hostPlatform.isPower) + (fetchpatch { + url = "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/patch/?id=d9e5c3e9e75162f845880535957b7fd0b4637d23"; + hash = "sha256-bBOyJcP6jUvozFJU0SPTOf3cmnTQ6ZZ4PlHjiniHXLU="; + }); postPatch = '' sed -i Makefile -e 's|= depmod|= ${buildPackages.kmod}/bin/depmod|' |