HOWTO: Easily set up a driver build environment

Share your own howto's etc. Not for support questions!
Post Reply
User avatar
Posts: 12430
Joined: 2009-10-06 05:53
Has thanked: 8 times
Been thanked: 6 times

HOWTO: Easily set up a driver build environment

#1 Post by stevepusser »

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

Post Reply