Linux kernel: Difference between revisions
imported>Toraritte m (Add NixOS category) |
imported>Tobias.bora |
||
Line 238: | Line 238: | ||
5. Lastly it is required to give the kernel build system the right location where to install the kernel module. This is done by setting <code>INSTALL_MOD_PATH</code> to <code>$out</code> Otherwise an error like <code>mkdir: cannot create directory '/lib': Permission denied</code> is generated. | 5. Lastly it is required to give the kernel build system the right location where to install the kernel module. This is done by setting <code>INSTALL_MOD_PATH</code> to <code>$out</code> Otherwise an error like <code>mkdir: cannot create directory '/lib': Permission denied</code> is generated. | ||
You can then call your program using something like <code>let yourprogram = config.boot.kernelPackages.callPackage ./your-derivation.nix {}; in …</code> and install the module in the kernel using <code>boot.extraModulePackages = [ yourprogram ];</code>. | |||
=== Developing out-of-tree kernel modules === | === Developing out-of-tree kernel modules === |