HOWTO: Easily set up a driver build environment

Share your own howto's etc. Not for support questions!

HOWTO: Easily set up a driver build environment

Postby stevepusser » 2016-12-08 20:14

Sometimes a user has to manually build and install a driver from a hardware vendor or from some other source.
Debian does not install what's needed by default, so the compiler and header packages must be added.

This will install build tools and the kernel headers for your currently running kernel. Open a terminal and as root or with sudo, run

Code: Select all
apt-get install module-assistant
m-a prepare

Tips for building the driver source:

Make sure the path to the source folder has no spaces. Building in a folder called "My Build Projects" will cause a error, for example.

Make sure to read any README or INSTALL instructions that come with the source.

The general rule is to build the driver as the regular user, then install it as root or with sudo. Example:

Code: Select all
sudo make install

If you want to know the name of the driver, it will be in the Makefile as the name of the .ko file that gets installed. If "foo.ko" is installed, the driver will then be "foo".
MX Linux packager and developer
User avatar
Posts: 12233
Joined: 2009-10-06 05:53

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 9 guests