-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
[RDY] kernel doc: explain how to configure custom kernel #29944
Conversation
1fab0f1
to
57b35b1
Compare
My intent is to document the current way of customizing kernels but I would rather improve the situation. @Ericson2314 I am very eager to ease kernel customization. My main question that remains unanswered (#2296): nixos generates first the config and then restarts the process (unpacking/patching) for the kernel compilation. Would it be ok to generate the config on the go instead ? Or does that break some workflow ? |
@teto I haven't really looked at it, but I'm rather found of the idea of configuring in a separate step. Configuring is rarely as deterministic as we want it to be, and this silos it off from the rest. That would especially be good in a future with the intensional store. But do feel free to improve before documenting :) |
I prepare a patch that makes kernel overrides easier (i.e., moves fields out of platform), yet I lose my way when it comes to override
In nix-repl: |
@teto don't override |
@Ericson2314 I pushed an update that I hope to be ok. I dropped the references to hostPlaform overriding since there are not necessary anymore. I am not that familiar with docbook so I might have used wrong tags. |
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.
@@ -66,6 +66,58 @@ nixpkgs.config.packageOverrides = pkgs: | |||
sets the kernel’s TCP keepalive time to 120 seconds. To see the available | |||
parameters, run <command>sysctl -a</command>. | |||
</para> | |||
<section> | |||
<title>Configure your kernel</title> |
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 would title this Building a customized kernel
or something like that.
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.
is Customize your kernel
ok ?
|
||
or you can let nixpkgs generate the configuration. | ||
Nixpkgs generates it via answering the interactive kernel utility <command>make config</command>. | ||
The answers depend on parameters passed to pkgs/os-specific/linux/kernel/generic.nix |
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.
<filename>pkgs/os-specific/linux/kernel/generic.nix</filename>
mptcp93.override ({ | ||
name="mptcp-local"; | ||
|
||
ignoreConfigErrors=true; |
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.
There are various places missing spaces around the =
in this example.
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.
should be fixed
Seems good overall. I gave some minor comments. |
Presents the options available (linuxManualConfig versus overriding extraConfig, ignoreConfigErrors, autoModules, kernelPreferBuiltin. For advanced hostPlatform customization refer to the commands shared by ericson1234 at NixOS#33813 but it is too advanced to put in the doc.
i pushed an update that should address the comments. |
Does that seem ok :> ? |
Yes, looks good. Sorry this fell through the cracks. |
sure no problem. If I can get around to complete/merge #41393 I'll update the doc accordingly. |
Motivation for this change
compiling kernel is currently hard, hopefully it will improve overtime. (for instance:
)
Until then here is some doc.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)