Building Kernel Modules With Module-Assistant On Debian Lenny
Building Kernel Modules With Module-Assistant On Debian LennyVersion 1.0 module-assistant is a tool for building Debian kernel modules from source, without having to rebuild the whole kernel. It fetches module-source packages that have been prepared for the Debian distribution via apt and produces .deb packages. This tutorial shows how to use module-assistant in command-line mode and in interactive mode. I do not issue any guarantee that this will work for you!
1 Preliminary NoteIn this tutorial I will demonstrate how to build the ndiswrapper kernel module for Debian Lenny. The procedure is the same for any other kernel module that module-assistant knows.
2 Using Module-Assistant In Command-Line ModeInstall module-assistant as follows: aptitude install module-assistant Next we must make module-assistant download the headers of the current kernel, and some tools that are needed to build packages from source (such as build-essential, etc.). This can be achieved with the following command: m-a prepare Now we update the list of available kernel modules by running: m-a update server1:~# m-a update Updated infos about 85 packages The command m-a list shows a list of available kernel modules in detailed form, and m-a -t list | grep -E '^[^ ].*\(' | cut -d " " -f 1 | sort shows the same list in short form, e.g. as follows: server1:~# m-a -t list | grep -E '^[^ ].*\(' | cut -d " " -f 1 | sort Before we pick a module to build, we should make sure that our /etc/apt/sources.list includes the contrib and non-free repositories because otherwise module-assistant might not be able to install required dependencies for the kernel module that we want to build: vi /etc/apt/sources.list
Run aptitude update if you had to modify /etc/apt/sources.list. Now we can build the kernel module. I want to build the ndiswrapper kernel module, so I run: m-a a-i ndiswrapper (Please note that m-a list appends the string -source to all available modules, but we leave that string out when we build the module with m-a a-i!) This will not only build the kernel module .deb package, but also automatically install it. Now that the module is installed, we can load it into our kernel as follows: modprobe ndiswrapper To check if it really got loaded, run: lsmod | grep ndiswrapper The output should be similar to this one: server1:~# lsmod | grep ndiswrapper To make sure that the module gets loaded automatically whenever you boot the system, you can add it to /etc/modules: vi /etc/modules
That's it!
|




Recent comments
12 hours 17 min ago
15 hours 12 min ago
16 hours 26 min ago
17 hours 49 min ago
19 hours 27 min ago
20 hours 56 min ago
22 hours 10 min ago
1 day 14 hours ago
1 day 14 hours ago
1 day 18 hours ago