From eb7e0d42dbe44a452dcbf9afea979ac9591c2fd1 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Thu, 30 Nov 2017 05:09:00 +0900 Subject: [PATCH] doc: Explain how to hack on kernel Presents the options available (linuxManualConfig versus overriding extraConfig, ignoreConfigErrors, autoModules, kernelPreferBuiltin. For advanced hostPlatform customization refer to the commands shared by ericson1234 at https://github.com/NixOS/nixpkgs/pull/33813 but it is too advanced to put in the doc. --- .../doc/manual/configuration/linux-kernel.xml | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/nixos/doc/manual/configuration/linux-kernel.xml b/nixos/doc/manual/configuration/linux-kernel.xml index 6502aaec83e..f4d697c42db 100644 --- a/nixos/doc/manual/configuration/linux-kernel.xml +++ b/nixos/doc/manual/configuration/linux-kernel.xml @@ -66,6 +66,57 @@ nixpkgs.config.packageOverrides = pkgs: sets the kernel’s TCP keepalive time to 120 seconds. To see the available parameters, run sysctl -a. +
+ Customize your kernel + + + The first step before compiling the kernel is to generate an appropriate + .config configuration. Either you pass your own config via + the configfile setting of linuxManualConfig: + + +You can edit the config with this snippet (by default make menuconfig won't work + out of the box on nixos): + {}; kernelToOverride.overrideAttrs (o: {nativeBuildInputs=o.nativeBuildInputs ++ [ pkgconfig ncurses ];})' + ]]> + + + or you can let nixpkgs generate the configuration. + Nixpkgs generates it via answering the interactive kernel utility make config. + The answers depend on parameters passed to pkgs/os-specific/linux/kernel/generic.nix + (which you can influence by overriding extraConfig, autoModules, modDirVersion, preferBuiltin, extraConfig). + + +
Developing kernel modules