Linux vs. Windows device driver model: architecture, APIs and build environment comparison

Device drivers are parts of the operating system that facilitate usage of hardware devices via certain programming interface so that software applications can control and operate the devices. As each driver is specific to a particular operating system, you need separate Linux, Windows, or Unix device drivers to enable the use of your device on […]
Continue reading…

 

How to build a kernel module with DKMS on Linux

Suppose you wanted to install a device driver for a new graphics card, a WiFi dongle, or a network interface card that you purchased, and for whatever reason (e.g., missing prebuilt driver, outdated driver version, non-common build options), you decided to compile and install the driver module from the source. So you went ahead and […]
Continue reading…

 

How to check kernel module dependencies on Linux

Similar to software packages, many Linux kernel modules are not self-contained, but rather rely on other modules to load and operate successfully. It is useful to know kernel module dependencies under various circumstances. For example, you may want to know which other modules a particular misbehaving kernel module relies on, so that you can find […]
Continue reading…

 

How to build a custom kernel module or device driver for XenServer

Citrix allows one to build any custom kernel module or hardware driver for XenServer, by offering Driver Development Kit (DDK). A DDK is essentially a virtual machine with all the kernel headers and development tools needed to extend the XenServer kernel. The following guide is on how to use DDK to compile a custom kernel […]
Continue reading…

 

How to load a kernel module at boot time

Loadable kernel modules are a convenient way to modify the running kernel without rebuilding the kernel from scratch. You can also free up memory resources by unloading any unnecessary kernel module. A kernel module can be loaded or unloaded on the fly by modprobe command. When loading a kernel module with modprobe, the command will […]
Continue reading…