![Gabriel Arazas](/assets/img/avatar_default.png)
Now, it's all under the notebook umbrella. Seems to be appropriate as it is just my notes after all. I also updated some notes from there. I didn't keep track of what it is this time. Something about more learning notes extracted from my "Learning how to learn" course notes and then some. Lack of time and hurriness just makes it difficult to track but it should be under version control already.
1.8 KiB
Installing Linux kernel with DKMS
Dynamic kernel module support (DKMS) is a feature that allows installation of kernel modules while reinstalling the kernel. This is preferable if you don't want to build and install kernel modules every kernel update.
Oftentimes to build the kernel module, it is required to install Linux-related headers.
Here's an example scenario where I want to install Veikk tablet driver that is not available out-of-the-box. The following list is the summarized version of what should happen.
- Download the source code of the kernel module.
- Check if the Linux headers are available otherwise the kernel module cannot be built.
- Place the kernel module source into the kernel source tree (e.g.,
/usr/src
). - Create
dkms.conf
to tell where the module is to be built. - Install the module with
dkms
.
The most difficult out of the steps is configuring with dkms.conf
.
You can see the format and the available options from dkms.8
manual page.
For now, let's see the example configuration.
PACKAGE_NAME="input-veikk"
PACKAGE_VERSION="git"
BUILT_MODULE_NAME[0]="veikk" # (ref:module-name)
DEST_MODULE_LOCATION[0]="/extra/"
AUTOINSTALL="yes"
This tells dkms
to install the Veikk driver, packaged as input-veikk
with version git
, in extra/
(e.g., /lib/modules/@LINUX_KERNEL_VERSION@/extra
).
When installed, you should see a module named veikk
— e.g., see the module list with lsmod
.
With the setup complete, run dkms install -m input-veikk -v git
and it should be effective immediately.