Repository navigation
linuxPackages.system76{,-io}: install modules through modules_install - #575724
Merged
Merged
Conversation
The install phase copied system76.ko into the output by hand, bypassing the Kbuild module installation. Since NixOS#571181, kernelModuleMakeFlags makes Kbuild sign each module with kmodigest during modules_install, which also writes a certificate next to the module, and aggregateModules merges the certificates of all external modules into modules.cer. The hand-copied module has neither, so building a NixOS system with hardware.system76.enableAll fails: cat: misc/system76.ko.cer: No such file or directory The upstream Makefile has no install target, so call the Kbuild modules_install target directly, as suggested for zenpower in NixOS#575192. It strips, signs, and compresses the module and writes its certificate. Keep the module under misc and leave depmod to aggregateModules. Set INSTALL_MOD_STRIP=1, as compression now happens before the strip phase, which used to remove the debug information. The hwdb file moves to postInstall. Assisted-by: Claude (claude-opus-5-5)
The install phase copied system76-io.ko and system76-thelio-io.ko into the output by hand, bypassing the Kbuild module installation. Since NixOS#571181, kernelModuleMakeFlags makes Kbuild sign each module with kmodigest during modules_install, which also writes a certificate next to the module, and aggregateModules merges the certificates of all external modules into modules.cer. The hand-copied modules have neither, so building a NixOS system with hardware.system76.enableAll fails: cat: misc/system76-thelio-io.ko.cer: No such file or directory cat: misc/system76-io.ko.cer: No such file or directory The upstream Makefile has no install target, so call the Kbuild modules_install target directly, as suggested for zenpower in NixOS#575192. It strips, signs, and compresses the modules and writes their certificates. Keep the modules under misc and leave depmod to aggregateModules. Set INSTALL_MOD_STRIP=1, as compression now happens before the strip phase, which used to remove the debug information. Assisted-by: Claude (claude-opus-5-5)
yzhou216
force-pushed
the
system76-modules-install
branch
from
October 18, 2026 19:32
9da9b3c to
8043407
Compare
Contributor
|
@yzhou216 can you share the steps that you used for testing this? I'm on 26.05 currently with whatever kernel is from the latest tag. |
4 of 13 tasks
Member
|
The failure only happens on unstable because of changes in the general kernel module infrastructure to support reproducible signing. |
SuperSandro2000
approved these changes
Oct 20, 2026
Member
|
@yzhou216 please don't spam with review requests, Sandro (a commiter) already reviewed and approved the PR, be patient |
iamanaws
removed their request for review
October 20, 2026 20:32
ahoneybun
approved these changes
Oct 20, 2026
ahoneybun
left a comment
Contributor
There was a problem hiding this comment.
Always good to see less manual steps and some automation!
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
linuxPackages.system76andlinuxPackages.system76-iocopy their modules into$outby hand, bypassing the Kbuild module installation. Since #571181,kernelModuleMakeFlagsmakes Kbuild sign each module with kmodigest duringmodules_install, which also writes<module>.ko.cernext to it, andaggregateModulesmerges the certificates of all external modules intomodules.cer. The hand-copied modules have no certificates, so building a NixOS system withhardware.system76.enableAllfails:Neither upstream Makefile has an install target, so both packages now call the Kbuild
modules_installtarget directly, as @emilazy suggested forzenpowerin #575192 (comment). Kbuild strips, signs, and compresses the modules and writes their certificates. The modules stay undermisc/, andDEPMOD=trueleaves depmod toaggregateModules.INSTALL_MOD_STRIP=1keeps the modules stripped. They used to be installed uncompressed, so the stdenv strip phase removed their debug information, but they are now compressed during installation, before that phase runs. Without it,system76.ko.xzgrows from about 15 KB to 131 KB on 7.3-rc7.Ref #575192
Testing
On x86_64-linux, I built
config.system.modulesTreeof a minimal NixOS configuration withhardware.system76.enableAll = trueforlinuxPackages(6.18.57) andlinuxPackages_latest(7.2.11):modules.cer.The same change, applied as an override in my own configuration, also fixes its module tree build with
linuxPackages_testing(7.3-rc7).cc @ahoneybun
This PR was prepared with Claude (claude-opus-5-5); I reviewed and tested the changes myself.
Things done
./result/bin/.nixpkgs-reviewon this PR. See nixpkgs-review usage.passthru.tests.