How to recompile just a single kernel module?
问题 Usually kernel source are stored in /usr/src/linux-2.6.x/ . To avoid to recompile the entire kernel if I modify a module's source, how can I recompile just that module? 回答1: Switch to the root directory of your source tree and run the following command: $ make modules SUBDIRS=drivers/the_module_directory And to install the compiled module: $ make modules_install SUBDIRS=drivers/the_module_directory Note: As lunakid mentions, the latter command might not build the module first, so be careful.