module-assistant is an extremely powerful, but underdocumented Tool to build Debian kernel modules.

This page is intended demonstrate how to use it.

Using Module-Assistant

module-assistant (often abbreviated as m-a) can be used in command line or in interactive mode.


module assistant's command-line mode


module-assistant interactive mode

To keep it simple, we run all the commands as root, so open a terminal as root

Step 1 : Installing m-a

First we need to install module-assistant (you can re-run that command if you aren't sure).

apt-get install module-assistant

Then we get module-assistant to download the headers corresponding to the current kernel, and other 'build-essential' tools.. simply run :

m-a prepare

Step 2 : Update the list of modules

That's as easy as running

m-a update

Step 3 : Build and Install the module

Finally, assuming you want the "sl-modem" module, simply run :

m-a a-i sl-modem

The "a-i" stands for "auto-install" which means "download the module source, compile it for the current kernel and install it".

Interactive mode

If you don't like typing commands, you can run module-assistant in interactive mode. simply type :

m-a

FAQ

Where can i find more help ?

reading the manpage is a good start (run man module-assistant), some other documentation are available in /usr/share/doc/module-assistant/.

An installed module package does not show up in 'm-a list'
This might be caused by the module package not creating or containing a control script in /usr/share/modass/packages. After creating one there (possibly by linking default.sh or generic.sh), m-a update needs to be called for the change to show up in m-a li.
How can i get a list of available package ?

use  m-a -t list | grep -E '^[^ ].*\(' | cut -d " " -f 1 | sort
If you want the package description, use:

for x in $( m-a -t list | grep -E '^[^ ].*\(' | cut -d " " -f 1 | sort ) ; do  echo Package: $x ; (apt-cache show $x  | grep -E '^(Description|Package| )' ) 2>&1  ; echo  ; done | uniq  > /tmp/m-a

ModuleAssistant (last edited 2007-09-30 19:28:14 by FranklinPiat)