Skip to content

Commit

Permalink
nixos: add a small section about kernel module dev
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed May 20, 2016
1 parent c2ee8e1 commit 2d6d731
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions nixos/doc/manual/configuration/linux-kernel.xml
Expand Up @@ -66,4 +66,25 @@ boot.kernel.sysctl."net.ipv4.tcp_keepalive_time" = 120;
sets the kernel’s TCP keepalive time to 120 seconds. To see the
available parameters, run <command>sysctl -a</command>.</para>

<section>
<title>Developing kernel modules</title>

<para>When developing kernel modules it's often convenient to run
edit-compile-run loop as quickly as possible.

See below snippet as an example of developing <literal>mellanix</literal>

This comment has been minimized.

Copy link
@danbst

danbst May 20, 2016

Contributor

you mentioned mellanix but you use mellanox below. Isn't this a typo?

This comment has been minimized.

Copy link
@domenkozar

domenkozar May 20, 2016

Author Member

Thanks, fixed in 9d745c6

drivers.
</para>

<screen><![CDATA[
$ nix-build '<nixpkgs>' -A linuxPackages.kernel.dev
$ nix-shell '<nixpkgs>' -A linuxPackages.kernel
$ unpackPhase
$ cd linux-*
$ make -C $dev/lib/modules/*/build M=$(pwd)/drivers/net/ethernet/mellanox modules
$ sudo insmod ./drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko
]]></screen>

</section>

</chapter>

0 comments on commit 2d6d731

Please sign in to comment.