New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
linux-libre: init #45411
linux-libre: init #45411
Conversation
`version` doesn't include .0 patch versions, or suffixes (eg -gnu). For .0 patch versions, this isn't a problem, since the glob takes care of everything after a `.`. It does, however, prevent openafs installing for suffixed kernels.
linuxPackages-libre = recurseIntoAttrs (linuxPackagesFor linux-libre); | ||
linux-libre = callPackage ../os-specific/linux/kernel/linux-libre.nix {}; | ||
linuxPackages_latest-libre = recurseIntoAttrs (linuxPackagesFor linux_latest-libre); | ||
linux_latest-libre = linux-libre.override { linux = linux_latest; }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need both latest and stable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did this for consistency with other kernels – hardened and xen_dom0 both have latest and stable. I can definitely see both having an audience.
minor = lib.versions.minor linux.modDirVersion; | ||
patch = lib.versions.patch linux.modDirVersion; | ||
|
||
in linux.override { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For things like kernels, I would like to see a maintainer.
Building a system with boot.kernelPackages = pkgs.linuxPackages-libre failed because the expression is called with extra arguments, See linux-4.14.nix.
Pushed a trivial fix so we can actually build a system with this kernel. LGTM now. |
I suppose non-gpl third-party modules should be blacklisted for this kernel? https://hydra.nixos.org/eval/1476119?filter=linuxPackages-libre&compare=1476064&full=#tabs-new |
The linux-libre patches have the same license as the kernel (GPL2), so the licensing situation regarding modules doesn't change by appying them. But I agree that users of linux-libre probably don't want to use non-gpl modules, so not building them on Hydra makes sense. |
Motivation for this change
GNU Linux-libre is a linux kernel distribution that has all non-free binary blobs stripped. The project distributes both deblobbed kernel sources, and scripts for each kernel version that perform the deblobbing. Here, I have used the scripts rather than the pre-deblobbed sources, because this allows an arbitrary kernel to be passed in and deblobbed with no extra effort, which seems more in the spirit of Nix and allows deblobbing to be composed with other kernel customisations.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)With the small fix to openafs included in this PR,
linuxPackages-libre
andlinuxPackages_latest-libre
can build all kernel modules that the corresponding non-deblobbed kernels can build. (This does not mean thatnox-review
will pass, because some kernel modules are currently broken on non-deblobbed Linux 4.18 anyway. See #45410.) The fix to openafs does not break any existing kernels where it was previously able to build. I have booted and used a deblobbed kernel successfully, with the exception of some of my laptop's hardware not working, which is to be expected with a deblobbed kernel.