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
make
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".
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: AzPainter 2.1.0, Pale Moon 27.4.2, Liquorix kernel 4.12-6, mpv 0.26.0, Kodi 17.3, 0ad 0.0.22, Mesa 13.0.6
User avatar
stevepusser
 
Posts: 8681
Joined: 2009-10-06 05:53

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable