Linux kernel

From NixOS Wiki
Revision as of 14:19, 7 November 2017 by imported>Makefu (Created page with "== Configuring the Linux Kernel == see [https://nixos.org/nixos/manual/index.html#sec-kernel-config NixOS Manual "Linux Kernel"]. == Developing Kernel Modules == see [https:/...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Configuring the Linux Kernel

see NixOS Manual "Linux Kernel".

Developing Kernel Modules

see NixOS Manual "Developing kernel modules"

make menuconfig

It is (currently) not possible to run make menuconfig in the checked out linux kernel sources. This is because ncurses is not part of your working environment when you start it with nix-shell '<nixpkgs>' -A linuxPackages.kernel.

This nix-shell hack adds ncurses as a build dependency to the kernel:

$ nix-shell -E 'with import <nixpkgs> {}; linux.overrideAttrs (o: {nativeBuildInputs=o.nativeBuildInputs ++ [ pkgconfig ncurses ];})'
[nix-shell] $ unpackPhase && cd linux-*
[nix-shell] $ make menuconfig

(thanks to sphalerite)