Linux kernel: Difference between revisions
imported>Artturin Restructure |
imported>Artturin m formatting |
||
Line 203: | Line 203: | ||
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. | ||
== Developing out-of-tree kernel modules == | === Developing out-of-tree kernel modules === | ||
See also: {{manual:nixos|sec=#sec-linux-config-developing-modules|chapter=12.2. Developing kernel modules}} | See also: {{manual:nixos|sec=#sec-linux-config-developing-modules|chapter=12.2. Developing kernel modules}} | ||
Line 235: | Line 235: | ||
</syntaxHighlight> | </syntaxHighlight> | ||
== Loading out-of-tree kernel modules == | === Loading out-of-tree kernel modules === | ||
As far as I understand, if you developed a kernel module, you should end up with having some <code>.ko</code> files inside a subfolder inside <code>$out/lib/modules/${kernel.modDirVersion}</code>. Now, if you want to make your module loadable inside the kernel by <code>modprobe</code>, you should do: | As far as I understand, if you developed a kernel module, you should end up with having some <code>.ko</code> files inside a subfolder inside <code>$out/lib/modules/${kernel.modDirVersion}</code>. Now, if you want to make your module loadable inside the kernel by <code>modprobe</code>, you should do: |