about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kernel/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/linux/kernel/README.md')
-rw-r--r--pkgs/os-specific/linux/kernel/README.md36
1 files changed, 25 insertions, 11 deletions
diff --git a/pkgs/os-specific/linux/kernel/README.md b/pkgs/os-specific/linux/kernel/README.md
index 92d5308e1c05..84fb05fc07a2 100644
--- a/pkgs/os-specific/linux/kernel/README.md
+++ b/pkgs/os-specific/linux/kernel/README.md
@@ -4,23 +4,37 @@
 
 2.  Add the new kernel to the `kernels` attribute set in [`linux-kernels.nix`](./linux-kernels.nix) (e.g., create an attribute `kernel_2_6_22`).
 
-3.  Update the kernel configuration. First unpack the kernel. Then for each supported platform (`i686`, `x86_64`, `uml`) do the following:
+3.  Update the kernel configuration:
 
-    1.  Make a copy from the old config (e.g., `config-2.6.21-i686-smp`) to the new one (e.g., `config-2.6.22-i686-smp`).
+    1. While in the Nixpkgs repository, enter the development shell for that kernel:
 
-    2.  Copy the config file for this platform (e.g., `config-2.6.22-i686-smp`) to `.config` in the kernel source tree.
+       ```console
+       $ nix-shell -A linuxKernel.kernels.linux_2_6_22
+       ```
 
-    3.  Run `make oldconfig ARCH={i386,x86_64,um}` and answer all questions. (For the uml configuration, also add `SHELL=bash`.) Make sure to keep the configuration consistent between platforms (i.e., don’t enable some feature on `i686` and disable it on `x86_64`).
+    2. Unpack the kernel:
 
-    4.  If needed, you can also run `make menuconfig`:
+       ```console
+       [nix-shell]$ pushd $(mktemp -d)
+       [nix-shell]$ unpackPhase
+       ```
 
-        ```ShellSession
-        $ nix-env -f "<nixpkgs>" -iA ncurses
-        $ export NIX_CFLAGS_LINK=-lncurses
-        $ make menuconfig ARCH=arch
-        ```
+    3. For each supported platform (`i686`, `x86_64`, `uml`) do the following:
 
-    5.  Copy `.config` over the new config file (e.g., `config-2.6.22-i686-smp`).
+       1. Make a copy from the old config (e.g., `config-2.6.21-i686-smp`) to the new one (e.g., `config-2.6.22-i686-smp`).
+
+       2. Copy the config file for this platform (e.g., `config-2.6.22-i686-smp`) to `.config` in the unpacked kernel source tree.
+
+       3. Run `make oldconfig ARCH={i386,x86_64,um}` and answer all questions. (For the uml configuration, also add `SHELL=bash`.) Make sure to keep the configuration consistent between platforms (i.e., don’t enable some feature on `i686` and disable it on `x86_64`).
+
+       4. If needed, you can also run `make menuconfig`:
+
+          ```ShellSession
+          $ nix-shell -p ncurses pkg-config
+          $ make menuconfig ARCH=arch
+          ```
+
+       5. Copy `.config` over the new config file (e.g., `config-2.6.22-i686-smp`).
 
 4.  Test building the kernel: