On Wed, Nov 05, 2003 at 12:46:05AM +0800, Holden Hao wrote: > On Tue, 2003-11-04 at 12:27, Winelfred G. Pasamba wrote: > > Holden Hao said: > > > Is it possible to just compile a kernel module? How is it done? Or do you > > > really need to recompile the kernel since you were not able to specify > > > support (said N) for that module? > > > > just guessing. why not compile the whole kernel and copy the module to the > > modules directory. ewan kung aaaaaaaaandar. > > Because compiling a module (if possible) is faster than compiling the > kernel and modules. > > I just wanted to know if I can do a shortcut.
Yes, you can. You must have the current kernel source, at least the headers, installed. For example, I build my nvidia drivers, broadcomm ethernet, and alsa sound drivers from source after I've built the kernel. Here's an example gcc line for building the tulip driver: gcc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -I/lib/modules/2.4.21/build/include -pipe -fno-strength-reduce -DMODVERSIONS -c -o tulip.o tulip.c After you build a module, you copy it into /lib/modules/version/wherever, run depmod -a, and load it in with modprobe. If you want, you can also just insmod the .o file, as long as there are no dependencies. Michael -- Michael Darrin Chaney [EMAIL PROTECTED] http://www.michaelchaney.com/ -- Philippine Linux Users' Group (PLUG) Mailing List [EMAIL PROTECTED] (#PLUG @ irc.free.net.ph) Official Website: http://plug.linux.org.ph Searchable Archives: http://marc.free.net.ph . To leave, go to http://lists.q-linux.com/mailman/listinfo/plug . Are you a Linux newbie? To join the newbie list, go to http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie
